Kernighans large earthquake problem: Difference between revisions

Content added Content deleted
(Added XPL0 example.)
Line 1,802:
 
=={{header|XPL0}}==
\Usage: quake <data.txt
<lang XPL0>int C;
[loop [OpenO(8); \get line from input file
Line 1,810:
until C = $0A\LF\;
OpenI(8);
repeat C:=until ChIn(8); <= $20\skip to whitespacespace\;
untilrepeat until ChIn(8) C> <= $20\space\;
repeat C:=until ChIn(8); <= $20\skip whitespacespace\;
until C > $20\space\;
repeat C:= ChIn(8); \skip to whitespace
until C <= $20\space\;
if RlIn(8) > 6.0 then
[OpenI(8); \output saved line to console