{"action":"created","issue":{"url":"https://api.github.com/repos/bmx-ng/bcc/issues/149","labels_url":"https://api.github.com/repos/bmx-ng/bcc/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/bmx-ng/bcc/issues/149/comments","events_url":"https://api.github.com/repos/bmx-ng/bcc/issues/149/events","html_url":"https://github.com/bmx-ng/bcc/issues/149","id":127258906,"number":149,"title":"For-Loop conditions evaluated multiple times","user":{"login":"GWRon","id":2625226,"avatar_url":"https://avatars.githubusercontent.com/u/2625226?v=3","gravatar_id":"","url":"https://api.github.com/users/GWRon","html_url":"https://github.com/GWRon","followers_url":"https://api.github.com/users/GWRon/followers","following_url":"https://api.github.com/users/GWRon/following{/other_user}","gists_url":"https://api.github.com/users/GWRon/gists{/gist_id}","starred_url":"https://api.github.com/users/GWRon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GWRon/subscriptions","organizations_url":"https://api.github.com/users/GWRon/orgs","repos_url":"https://api.github.com/users/GWRon/repos","events_url":"https://api.github.com/users/GWRon/events{/privacy}","received_events_url":"https://api.github.com/users/GWRon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bmx-ng/bcc/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"woollybah","id":95883,"avatar_url":"https://avatars.githubusercontent.com/u/95883?v=3","gravatar_id":"","url":"https://api.github.com/users/woollybah","html_url":"https://github.com/woollybah","followers_url":"https://api.github.com/users/woollybah/followers","following_url":"https://api.github.com/users/woollybah/following{/other_user}","gists_url":"https://api.github.com/users/woollybah/gists{/gist_id}","starred_url":"https://api.github.com/users/woollybah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woollybah/subscriptions","organizations_url":"https://api.github.com/users/woollybah/orgs","repos_url":"https://api.github.com/users/woollybah/repos","events_url":"https://api.github.com/users/woollybah/events{/privacy}","received_events_url":"https://api.github.com/users/woollybah/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-01-18T16:13:05Z","updated_at":"2016-01-19T12:16:04Z","closed_at":null,"body":"The conditions of a for loop (`for x = y to z`) are evaluated \"per step\"\r\n```BlitzMax\r\nSuperStrict\r\nFramework Brl.Standardio\r\n\r\nFor Local i:Int = 0 To get()\r\n\tPrint i\r\nNext\r\n\r\nFunction get:Int()\r\n\tPrint \"get called\"\r\n\tReturn 3\r\nEnd Function\r\n```\r\n\r\nNG outputs:\r\n```\r\nget called\r\n0\r\nget called\r\n1\r\nget called\r\n2\r\nget called\r\n3\r\nget called\r\n```\r\n\r\nVanilla outputs:\r\n```\r\nget called\r\n0\r\n1\r\n2\r\n3\r\n```"},"comment":{"url":"https://api.github.com/repos/bmx-ng/bcc/issues/comments/172834765","html_url":"https://github.com/bmx-ng/bcc/issues/149#issuecomment-172834765","issue_url":"https://api.github.com/repos/bmx-ng/bcc/issues/149","id":172834765,"user":{"login":"GWRon","id":2625226,"avatar_url":"https://avatars.githubusercontent.com/u/2625226?v=3","gravatar_id":"","url":"https://api.github.com/users/GWRon","html_url":"https://github.com/GWRon","followers_url":"https://api.github.com/users/GWRon/followers","following_url":"https://api.github.com/users/GWRon/following{/other_user}","gists_url":"https://api.github.com/users/GWRon/gists{/gist_id}","starred_url":"https://api.github.com/users/GWRon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GWRon/subscriptions","organizations_url":"https://api.github.com/users/GWRon/orgs","repos_url":"https://api.github.com/users/GWRon/repos","events_url":"https://api.github.com/users/GWRon/events{/privacy}","received_events_url":"https://api.github.com/users/GWRon/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T12:16:04Z","updated_at":"2016-01-19T12:16:04Z","body":"Maybe it would be a good idea to introduce a new keyword... \"dynamic\". \n\nFor i = 0 to x step 1 dynamic\n\nMeans that \"x\" is re-evaluated on each loop cycle. This is the current behaviour...and might be intended (as it is possible with c).\n\nI fully understand that this could be achieved with \"while\" or \"repeat\" and a custom condition.\n\nWhat do you think?"}}