Loops/While: Difference between revisions

Content added Content deleted
No edit summary
(Add XPL0 example)
Line 1,169: Line 1,169:
x = x \ 2
x = x \ 2
Loop While x > 0</lang>
Loop While x > 0</lang>

=={{header|XPL0}}==
<lang XPL0>code CrLf=9, IntOut=11;
int I;
[I:= 1024;
while I>0 do
[IntOut(0, I); CrLf(0);
I:= I>>1; \(same as I/2 for positive I)
];
]</lang>


{{omit from|GUISS|No loops and we cannot read values}}
{{omit from|GUISS|No loops and we cannot read values}}