Parse - F$ELEMENT()
$ vbl = F$ELEMENT( index, delim, string )
delim - the delimiter character
string - the string to parse
F$ELEMENT() returns the delimiter
character when no more elements exist.
$ ELEM = F$ELEMENT( 0, “,”, P1 )
Notes:
Moving on to some more advanced lexical functions, we start with F$ELEMENT. Use this to parse strings by searching for specific characters, such as comma, pipe symbol, space, etc.
The “index” starts at zero. The “delim” parameter can be any single character.
If the value of “index” points to an element beyond the end of the string, the function returns the delimiter character.