Next: Decode String into
Up: String Scanning and
Previous: Decode String into
This Subprogram will attempt to decode the specified text string into
a Member of the specified Decimal Integer Set. No alternative syntaxes are
allowed and thus Octal and Hexadecimal representations are not valid, unlike
the case of UI_DECODE_INT_MEMBER.
Short Name Calling Sequence
STATUS = UIDCDM(STRING,SETVAL,SETSIZ,VALUE[,INDEX])
Long Name Calling Sequence
STATUS = UI_DECODE_DEC_MEMBER(...)
Input Arguments
STRING (Character) Text String
SETVAL (Integer Array) Array of Decimal Set Members
SETSIZ (Integer) Size of Decimal Set Array
VALUE (Integer) Default Member Value
Output Arguments
VALUE (Integer) Decoded Member Value
INDEX (Integer) Member Index (Optional)
Function Value
UI__SUCCESS ) Success
UISUCC )
UI__EMPTY_SET ) Empty Set
UIEMST )
UI__NOT_MEMBER ) Decoded Value is not
UINTME ) a Member of the Set
UI__ILLEGAL_SYNTAX ) Illegal Syntax
UIILSY ) (not Decimal Integer)
Note:
- The SETVAL Array should be setup to contain the allowed Decimal Integer
Values, being SETSIZ entries long. An illegal SETSIZ (zero or negative) will
cause the UI__EMPTY_SET Function Value to be returned.
- The VALUE Argument will not be modified if STRING does not correspond
to a Decimal Integer value that is present in the Set. Function Value
UI__NOT_MEMBER will be returned in this case.
- The INDEX Argument is optional and may be omitted. If present, it will
be returned as the index into the Set (in the range 1-SETSIZ) corresponding
to the Set Member which was matched. If more than one Set Member has the
same value, INDEX will be set to the index of the first one encountered.
- The UI__ILLEGAL_SYNTAX Function Value will be returned if the
text string does not conform to the correct Decimal Integer syntax.
No modification will be made to the default value in this case.
- Any leading or trailing spaces or tabs within STRING will be ignored.
- All Errors are informational only, no Error Message will be issued.
Next: Decode String into
Up: String Scanning and
Previous: Decode String into
Liz Buckle
Fri Jan 13 17:28:23 CST 1995