This function will parse a comma delimited string and return the nth field.
GetStringField was previously required for text character fields, and GetNumberField was required for number fields before GetField was created to handle both data types.
Returns a string, which will be converted to a number if necessary.
This function is often used in conjunction with the file manager's ReadLine function to read comma delimited files, and with the GetFieldCount function to discover how many fields are available.
Syntax: |
---|
returnString = GetField( stringValue, fieldIndex ) |
Parameter: |
Description: |
---|---|
stringValue |
comma delimited string |
fieldIndex |
number of the field to extract |
returnString |
string value of the extracted field |
Note: |
---|
The GetField function replaced both the GetStringField and the GetNumberField functions from prior versions. This new function will return a string or a number as necessary. |
Example: |
---|
stringValue = "S,10,20,30,40"
Results:See example comments. |
Links: |
---|
GetFieldCount, ReadLines, RemoveCommasBetweenQuote, RemoveNonDigits |
See Also: |
Edit Time: 9/18/2020 1:43:12 PM |
Topic ID#: 352 |