Task

Increment a numerical string.




MODULE StringInt EXPORTS Main;
 
IMPORT IO, Fmt, Scan;
 
VAR string: TEXT := "1234";
    num: INTEGER := 0;
 
BEGIN
  num := Scan.Int(string);
  IO.Put(string & " + 1 = " & Fmt.Int(num + 1) & "\n");
END StringInt.