[ Back to the overview Matrix ]

Test case : Type "file" using Algol 68

Lines used: 4
# call as "a68g cat.a68g - file-to-be-catted #
( FILE f; STRING s;
  VOID (open (f, argv (4 #sic# ), standin channel));
  on logical file end (f, (REF FILE f) BOOL: stop);
  DO get (f, (s, newline)); print ((s, newline)) OD )
Contributed by andrew.walker at nottingham.ac.uk