The following subprograms are available for scanning text strings to pickup individual words from within them and for decoding words into numeric values. They allow an Application Program to cope with the situation where the detailed format of a response is variable (e.g. it could be either a text word or Integer value). By attempting to decode the string into an Integer variable via the appropriate decoding Subprogram and noting the Error Code returned, the Application Program can determine which format was used.
UI_NEXT_WORD ) Get next Word from UINXWD ) Text String
UI_USED_LENGTH ) Return Used Length UIUSLE ) of Text String
UI_DECODE_DECIMAL ) Decode Decimal Integer UIDCDE ) Value
UI_DECODE_DEC_BOUNDS ) Decode Decimal Integer UIDCDB ) Upper and Lower Bounds
UI_DECODE_DEC_LIST ) Decode Decimal Integer UIDCDL ) List of Values
UI_DECODE_DEC_MEMBER ) Decode Decimal Integer UIDCDM ) Set Member
UI_DECODE_DEC_SET ) Decode Decimal Integer UIDCDS ) Set of Values
UI_DECODE_DOUBLE ) Decode Double Precision UIDCDP ) (Real*8) Value
UI_DECODE_DOUBLE_BOUNDS ) Decode Double Precision UIDCPB ) Upper and Lower Bounds
UI_DECODE_DOUBLE_LIST ) Decode Double Precision UIDCPL ) List of Values
UI_DECODE_DOUBLE_MEMBER ) Decode Double Precision UIDCPM ) Set Member
UI_DECODE_DOUBLE_SET ) Decode Double Precision UIDCPS ) Set of Values
UI_DECODE_FILENAME ) Decode Filename UIDCFI )
UI_DECODE_HEX ) Decode Hexadecimal Value UIDCHX )
UI_DECODE_HEX_BOUNDS ) Decode Hexadecimal Upper UIDCHB ) and Lower Bounds
UI_DECODE_HEX_LIST ) Decode Hexadecimal List UIDCHL ) of Values
UI_DECODE_HEX_MEMBER ) Decode Hexadecimal UIDCHM ) Set Member
UI_DECODE_HEX_SET ) Decode Hexadecimal Set UIDCHS ) of Values
UI_DECODE_INTEGER ) Decode Integer Value UIDCIN )
UI_DECODE_INT_BOUNDS ) Decode Integer Upper and UIDCIB ) Lower Bounds
UI_DECODE_INT_LIST ) Decode Integer List UIDCIL ) of Values
UI_DECODE_INT_MEMBER ) Decode Integer UIDCIM ) Set Member
UI_DECODE_INT_SET ) Decode Integer Set UIDCIS ) of Values
UI_DECODE_LOGICAL ) Decode Logical UIDCLO ) (True/False) Value
UI_DECODE_LOGSET ) Decode Logical UIDCLS ) (True/False) Set
UI_DECODE_OCTAL ) Decode Octal Value UIDCOC )
UI_DECODE_OCT_BOUNDS ) Decode Octal Upper and UIDCOB ) Lower Bounds
UI_DECODE_OCT_LIST ) Decode Octal List UIDCOL ) of Values
UI_DECODE_OCT_MEMBER ) Decode Octal UIDCOM ) Set Member
UI_DECODE_OCT_SET ) Decode Octal Set UIDCOS ) of Values
UI_DECODE_ONOFF ) Decode Logical (On/Off) UIDCON ) Value
UI_DECODE_REAL ) Decode Floating (Real) UIDCRE ) Value
UI_DECODE_REAL_BOUNDS ) Decode Real Upper and UIDCRB ) Lower Bounds
UI_DECODE_REAL_LIST ) Decode Real List UIDCRL ) of Values
UI_DECODE_REAL_MEMBER ) Decode Real UIDCRM ) Set Member
UI_DECODE_REAL_SET ) Decode Real Set UIDCRS ) of Values
UI_DECODE_TEXT_LIST ) Decode Text List UIDCRL ) of Values
UI_DECODE_TEXT_MEMBER ) Decode Text UIDCTM ) Set Member
UI_DECODE_VERB ) Decode Text String into UIDCVB ) Verb
UI_DECODE_YESNO ) Decode Logical (Yes/No) UIDCYE ) Value
This Subprogram returns the next Word encountered during the Scan of a Text String. Sequential calls to this Subprogram will return sequential words within the text string. The Word Terminator Characters as specified by this call will be used in order to separate individual words from each other.
Short Name Calling Sequence
STATUS = UINXWD(LINE,LININD,TERMLS,WORD,WRDLEN,TERMCH)
Long Name Calling Sequence
STATUS = UI_NEXT_WORD(...)
Input Arguments
LINE (Character) Line of Text LININD (Integer) Initial Line Index TERMLS (Character) List of Terminator Chars
Output Arguments
LININD (Integer) Initial Line Index WORD (Character) Extracted Word WRDLEN (Integer) Length of Extracted Word TERMCH (Character*1) Terminator Character
Function Value
UI__SUCCESS ) Success UISUCC )
UI__TRUNCATED ) Word Truncated UITRUN )
UI__EMPTY ) Scan exhausted UIMPTY )
Note:
SILLY = 10 ,, DAFT = 20
Given the same list of terminator characters as above, then the words returned by calls to UI_NEXT_WORD will be ``SILLY" (terminated by ``="), ``10" (terminated by ``,"), `` " (terminated by ``,"), ``DAFT" (terminated by ``=") and ``20" (terminated by `` ").