Previous: utidi Up: ../plot79_u.html Next: utidr


UTIDL

       SUBROUTINE  UTIDL (LOGVAL,NEXT,ERROR,FIELD,LENGTH,FLUSH)
 C$    (Decode LOGICAL Value from Character Form)
 C$    Convert a LOGICAL value represented by one of the following
 C$    strings
 C$
 C$    T   F   TRUE   FALSE   .T.   .F.   .TRUE.   .FALSE.
 C$
 C$    in FIELD(*) to internal  format.  Unlike FORTRAN  formatted
 C$    input, blanks are significant.  To permit free-form  input,
 C$    leading blanks  and tabs  are ignored,  and the  conversion
 C$    will continue until the end of one of the above strings  is
 C$    reached,  or  else   the  end  of   FIELD(*)  is   reached.
 C$    Lower-case letters are acceptable.  A pointer is set to the
 C$    next unprocessed  character  in FIELD(*)  (which  might  be
 C$    FIELD(LENGTH+1)) so  that the  caller may  check for  valid
 C$    syntax.  The arguments are:
 C$
 C$    LOGVAL.........LOGICAL value (returned).
 C$    NEXT...........On exit, index of the character in  FIELD(*)
 C$                   which follows the last character  processed.
 C$                   On input,  it  should  point  to  the  first
 C$                   character to be processed.
 C$    ERROR.......... .TRUE. - No valid characters found.  LOGVAL
 C$                             is set .FALSE. on return.
 C$                   .FALSE. - No error occurred.
 C$    FIELD(*).......Character string to be decoded (A1 format).
 C$    LENGTH.........Number of characters in FIELD(*).
 C$    FLUSH.......... .TRUE. - Flush any leading invalid
 C$                             characters.
 C$                   .FALSE. - Do not flush leading invalid
 C$                             characters.
 C$
 C$    It is  up  to  the  caller  to  verify  that  any  trailing
 C$    characters are in fact blanks.  The FLUSH option is  useful
 C$    to  allow  successive  calls  to  retrieve  LOGICAL  values
 C$    separated by commas, spaces, etc.  The caller must realize,
 C$    however,   that    this   might    cause   skipping    over
 C$    incorrectly-coded items (e.g. "T,T,F,G,T" for "T,T,F,F,T").
 C$    (08-APR-82)