fork download
  1. |c number|
  2. [
  3. number:=0.
  4. [ (c := stdin next) asciiValue ~= 10 ]
  5. whileTrue:
  6. [number := (number * 10) + (c asciiValue) - 48.].
  7. number ~= 42
  8. ]
  9. whileTrue:
  10. [Transcript show: number printString; cr.]
  11. !
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
2
10
42
11
compilation info
Mozart Compiler 1.4.0 (20080704) playing Oz 3

%%% feeding file prog.oz

%*************************** parse error ************************
%**
%** syntax error, unexpected '|'
%**
%** in file "./prog.oz", line 1, column 0
%** ------------------ rejected (1 error)
stdout
Standard output is empty