VMS Help  —  PASCAL  Input Output, Seq Access Output, WRITE
  The WRITE procedure assigns data to an output file.

  Syntax:

     WRITE( [[file_variable, ]]{expression},...
            [[,ERROR := error-recovery]] )

  The 'file_variable' is the name of the file variable  associated
  with  the  output  file.   If you omit the name of the file, the
  default is OUTPUT.

  The 'expression' is an expression whose value is to be  written;
  multiple output values must be separated with commas.  An output
  value must have the same type as the file  components;  however,
  values  written  to  a  TEXT file can also be expressions of any
  ordinal, real, or string type.

  The 'error-recovery' specifies the action  to  be  taken  if  an
  error occurs during execution of the routine.  By default, after
  the first error, the error message is printed and  execution  is
  stopped.

  The file (unless it is a random-access by key file) must  be  in
  generation  mode before WRITE is called; it remains in that mode
  after WRITE has executed.

  By definition, a WRITE statement to a nontext file  performs  an
  assignment  to  the file buffer variable and a PUT statement for
  each output value.  For nontext files, the types of  the  output
  values  must be assignment compatible with the component type of
  the file.

  See the "HP Pascal Language Reference  Manual"  for  a  complete
  description of the WRITE procedure.
Close Help