I implemented the while loop statement today. It functions the same way as the C while statement. Again braces are required for the code block and within the code block is a temporary scope for variable declaration. I tested it with this bit of code using nested 'whiles' and an 'if' statement.
int x = 0;
while(x < 3)
{
int y = 0;
while(y < 2)
{
y = y + 1;
print x;
if(x == 1)
{
print "One";
}
}
x = x + 1;
}
Output: 0 0 1 One 1 One 2 2
Next up...
Arnold tells Willis that he knows Mr. T but really...
Then...
I'll work on adding functions to the language. The entry point will be a main function just like C. I'm hoping to add recursive functionality. Then I'll want to be able to bind C functions to the language. After this is all working I'll finish up on the types and add structs.
Another name...
The working title for this language is Magus. That name sucks. Any ideas?
btw, I could not have come up with better options for the posed question had I tried. I despise checkers...
sorry for the off topic, to reamin on track: how about 'Y'? No? Okay, at least i tried :P.