next up previous contents
Next: Decode String into Up: String Scanning and Previous: Decode String into

Decode String into Octal Set Member

This Subprogram will attempt to decode the specified text string into a Member of the specified Octal Set.

Short Name Calling Sequence

STATUS = UIDCOM(STRING,SETVAL,SETSIZ,VALUE[,INDEX])

Long Name Calling Sequence

STATUS = UI_DECODE_OCT_MEMBER(...)

Input Arguments

STRING (Character) Text String SETVAL (Integer Array) Array of Octal Set Members SETSIZ (Integer) Size of 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 Octal) Note:

  1. The SETVAL Array should be setup to contain the allowed Octal Values, being SETSIZ entries long. An illegal SETSIZ (zero or negative) will cause the UI__EMPTY_SET Function Value to be returned.
  2. The VALUE Argument will not be modified if STRING does not correspond to an Octal value that is present in the Set. Function Value UI__NOT_MEMBER will be returned in this case.
  3. 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.
  4. The UI__ILLEGAL_SYNTAX Function Value will be returned if the text string does not conform to the correct Octal syntax. No modification will be made to the default value in this case.
  5. Any leading or trailing spaces or tabs within STRING will be ignored.
  6. All Errors are informational only, no Error Message will be issued.


Liz Buckle
Fri Jan 13 17:28:23 CST 1995