Probabally a dumb question...i am wondering if AGI has any type of looping like a |
You get the picture....
The interpreter of course is constantly running in a loop, but if you want to loop during a cycle, you'll have to use labels and gotos for now (until the language is extended to add more stuff).|
The above code is equivalent to this C-like code:
I'm working on it. (switches, fors, whiles.. that stuff)|
Isn't that the same as:|
Why do you use the WhileBody? Just because then you can see what the test is, what the body is and what the loop is, or is there another reason?
|Joel||yeah, I think it is the same. no, there's no particular reason why I chose to write it like that other than to be as clear as possible about what's going on. Also, probably a little left over from a compiler's course I took where an if-else structure was implemented as a comparison and two jump instructions.|