|
Contents | Previous | Next | Subchapters |
| Syntax |
; , |
| See Also | Default Printing Of An Expression |
omatrix
x = 0
while x < 3 begin
x = x + 1; x = x + 1
print "x =", x
end
O-Matrix will respond
x = 2
x = 4
If you continue by entering
mlmode
x = 0;
while x < 3
x = x + 1, x = x + 1
end
O-Matrix will reply
x = 1
x = 2
x = 3
x = 4
Note that the loop is executed twice
and there are two assignments for each execution of the loop.
If you enter
mlmode
x = 0;
while x < 3
x = x + 1; x = x + 1
end
O-Matrix will reply
x = 2
x = 4
Only the result of the second assignment is printed
each time through the loop because the first assignment
statement ends in a semicolon.