next up previous contents
Next: READ Up: THE SCL COMMANDS. Previous: PRINT   Contents


WRITE

WRITE causes the list of expressions you give it to be evaluated and printed to the nominated string variable. Expressions may be any of:

Items are separated by commas or spaces, and the list is optionally enclosed in brackets.

Items may optionally be followed immediately by a colon (:) and a FORTRAN format specifier, to control the width of the output field.

Examples:

       >>  declare string c80
       >>  write string  x
       >>  write string  (x/3)
       >>  write string  '5 times x = ', 5*x:f10.4
       >>  write string  x   y(j)
       >>  write string  'This is rachael''s  output'
       >>  print string

See also the PRINT command, to write output to the terminal.



Jamie Leech 2004-08-16