Updated: 10/19/2021, 9:29:48 PM
Created: 10/19/2021, 9:29:48 PM
Last Updated By: Kevin Munoz
Read Time: 1 minute(s)
This function counts the number of field elements in a string that are separated by a specified delimiter. It takes the general form:
- expression1 evaluates to a string in which fields are to be counted.
- expression2 evaluates to the delimiter string used to count the fields.
- The delimiter string may consist of more than one character.
- If expression1 is a NULL string, the function returns a value of zero.
- The delimiter string may consist of any character, including system delimiters such as field marks or value marks.
An example of use is as follows:
alphaString = "A : B : C : D" CRT "The result of DCOUNT(alphaString, ':') is " : DCOUNT(alphaString, ':') CRT "The result of COUNT(alphaString, ':') is " : COUNT(alphaString, ':')
The above code will result in the following output:
The result of DCOUNT(alphaString, ':') is 4 The result of COUNT(alphaString, ':') is 3
Note the difference in result returned by the COUNT function
See also: COUNT.
Go back to jBASE BASIC
Go back to Programmers' Reference Guide