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 Text Set.
Short Name Calling Sequence
STATUS = UIDCTM(STRING,SETVAL,SETSIZ,VALUE[,INDEX])
Long Name Calling Sequence
STATUS = UI_DECODE_TEXT_MEMBER(...)
Input Arguments
STRING (Character) Text String
SETVAL (Char Array) Array of Text Set Members
SETSIZ (Integer) Size of Set Array
VALUE (Character) Default Member Value
Output Arguments
VALUE (Character) 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
Note:
- The SETVAL Array should be setup to contain the allowed Text
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 Text 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.
- Matching is performed by converting text strings to uppercase, ignoring
trailing spaces and using only the first 32 characters.
- Any leading or trailing spaces or tabs within STRING will be ignored.
- All Errors are informational only, no Error Message will be issued.
Liz Buckle
Fri Jan 13 17:28:23 CST 1995