Description Parses an input string based upon given delimiters and loads arrays with tokens.
Syntax n = ParseString( parsestr, delim, values, strings )
Parameters n (Long) Number of tokens found in str.
parsestr As String String to be parsed.
delim As String List of possible single-character delimiters.
values() As Double Array populated with double-precision numbers found in parsestr.
strings() As String Array populated with all tokens found in parsestr.
Remarks Parses an input string based upon given delimiters and loads arrays with tokens. A token is any group of characters. All character groups are considered Strings. Double-precision numbers are considered as strings and as a numbers.
delim is a list of concatenated single-character delimiters. For example, to look for space and tab delimiters, use the command n = ParseString ( parsestr, Chr(32) & Chr(9), values, strings)
Every token is entered as an element of the strings array. If the token is a double-precision number, its numeric value is entered into the array values. Tokens that are not a double-precision number cause the corresponding values array element to be zero.
See Also
|