Function: HERINP Purpose: Decodes a string of characters into reals, integers, logicals, characters or bytes. Category: MATH, UTILITY, USER-INTERFACE File: herinp.c Author: K.G. Begeman Use: CALL HERINP( EXPR , Input CHARACTER*(*) TYPE , Input CHARACTER*(*) LENT , Input INTEGER OUTV , Output ARRAY of BYTES NOUT , Input INTEGER NRET , Output INTEGER IERH ) Output INTEGER EXPR Character string containing the expressions to be evaluated. TYPE Character denoting type of conversion wanted. See the notes for a list of possible types. LENT Length of type in bytes. See the notes for a list of possibilities. OUTV Array of bytes containing the decoded values. NOUT Maximum number of values of type TYPE to be returned. NRET Number of values actual decoded. IERH Error return code. A list of error codes is given in the notes. Notes: 1. The syntax of the input for this routine is described in document INPUT.DC2 2. List of possible types and allowed lengths: TYPE LENT type 'F' 4,8 reals 'I' 2,4 integers 'L' 1,2,4 logicals 'A' any plain bytes 'C' any bytes with separator recognition 3. List of error returns: IERH explanation 0 no error -11 bad call -12 unknown function -13 syntax error -14 illegal character -15 wrong repeat argument -16 wrong number of arguments -17 arithmetic error -18 not enough internal memory -19 conversion error -20 unequal list length -21 empty list -22 nested lists -23 output buffer overflow (not for 'A' type of input) -24 floating overflow/underflow in conversion Updates: Dec 16, 1987: KGB, Type C implemented . Jan 25, 1988: KGB, Document created. Feb 16, 1988: KGB, In GENLIB. Mar 23, 1988: KGB, Added argument NCHR. Apr 11, 1988: KGB, Disabled check of buffer overflow for type 'A' Apr 14, 1988: KGB, Error if no value after a ',' May 5, 1988: KGB, Small but important change in document Oct 13, 1988: KGB, Implemented ANSI F77 calls to DCDCHAR, DCDINT, DCDLOG, DCDREAL, DCDDBLE Nov 23, 1988: KGB, Handles now BLANKS Dec 5, 1988: KGB, Bug in UNIX version removed Mar 1, 1989: KGB, Bug in decoding logicals removed Jul 27, 1989: KGB, FtoC interface implemented. Jul 22, 1994: JPT, Call Hermes for decoding numbers.