Previous: prsgtc Up: ../plot79_p.html Next: prsgtt


PRSGTH

       INTEGER FUNCTION  PRSGTH (A1CHAR,STDHMS,HLPSTR,LENHLP,
      X     DEFSTR,LENDEF,FIRST)
 C$    (Parse Internal - Get Character with Help and Recognition)
 C$    Get the next character from PRSGET and return it in  A1CHAR
 C$    with the same function value.  However, if the character is
 C$    a help character (query) or a recognition character (EDFULL
 C$    or EDPART), or end-of-line, special action is taken:
 C$
 C$    Help character:
 C$    Help is offered, first  any user-supplied help string,  and
 C$    then a standard help message, according to the field  type.
 C$    If either help  string is  printed, the  default value,  if
 C$    any, will also be displayed.   If an alternate parse is  in
 C$    progress, and a help message has already been issued for  a
 C$    previous field, the help message is preceded on a new  line
 C$    by the  string "or",  and  return occurs  immediately  with
 C$    function value set to EDHELP (distinct from QUERY, which is
 C$    an  ordinary  character)  and   A1CHAR  set  to  the   help
 C$    character.  If a  KEYWORD or SWITCH  parse is in  progress,
 C$    return occurs immediately  to allow the  caller to  display
 C$    the word alternatives.  If the standard help is  suppressed
 C$    and no  user  help message  is  provided, then  nothing  is
 C$    output.
 C$
 C$    Recognition character:
 C$    If FIRST is  .TRUE., the  parse is  at the  beginning of  a
 C$    field, so if LENDEF > 0, the contents of the default string
 C$    is inserted in the input buffer,  as if the user had  typed
 C$    it.  If LENDEF = 0 and recognition is requested with  FIRST
 C$    set .TRUE.,  a BEL  character  will be  typed to  ring  the
 C$    terminal bell, reminding the  user that the request  cannot
 C$    be honored.  If FIRST is .FALSE., the recognition character
 C$    will be returned intact, so that the user can take  further
 C$    action to provide recognition on a partial field.
 C$
 C$    End-of-line character:
 C$    If a default  string is  provided, insert it  in the  input
 C$    buffer  before  the  end-of-line   and  return  the   first
 C$    character  of  the  default.   Otherwise  just  return  the
 C$    end-of-line character.
 C$
 C$    If an  alternate parse  is  not in  progress, then  if  the
 C$    recognition  character  (if  FIRST  is  .TRUE.)   or   help
 C$    character is then  deleted from the  input buffer, and  the
 C$    next character is obtained (which might have come from  the
 C$    newly-inserted default string).  The code then loops  until
 C$    a character is finally obtained  which is neither help  nor
 C$    recognition.
 C$    (03-MAR-83)