Previous: prsget Up: ../plot79_p.html Next: prsgth


PRSGTC

       INTEGER FUNCTION  PRSGTC (UNITNO)
 C$    (Parse Internal - Get Character)
 C$    Get the  next character  from the  file with  FORTRAN  unit
 C$    number UNITNO.  The  function value returned  is the  ASCII
 C$    ordinal value of the character,  or one of EOFCHR,  EOLCHR,
 C$    or NEQASC.  EOFCHR is returned when end-of-file is  reached
 C$    or when there is no buffer space available to accomodate  a
 C$    new open input  unit, EOLCHR when  end-of-line is  reached,
 C$    and  NEQASC  when   the  input  character   has  no   ASCII
 C$    equivalent.
 C$
 C$    Since the  support of  multiple  input files  requires  the
 C$    management of several input buffers, whenever the EOFCHR or
 C$    EOLCHR characters are removed from a buffer, the buffer  is
 C$    disconnected  from  the  current  unit  number,  making  it
 C$    available for use by other units.
 C$
 C$    Although  this  routine  makes  the  input  appear  as   an
 C$    unlimited and continuous stream of characters from  records
 C$    separated by an EOLCHR character, the use of FORTRAN  input
 C$    in this version actually limits the input record length  to
 C$    MAXLIN (usually 133) characters.  Characters beyond  column
 C$    MAXLIN-1 will simply be discarded without warning.
 C$
 C$    Consecutive attempts to read beyond end-of-file will always
 C$    return EOFCHR, provided  that the host  FORTRAN I/O  system
 C$    permits multiple read attempts at end-of-file.  Every  line
 C$    will always be terminated by  EOLCHR, and thus EOFCHR  will
 C$    always be preceded by EOLCHR, unless the file is empty.
 C$    (28-NOV-82)