Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?



The COUNT function returns the number of times that one string occurs in another. It is used as:

COUNT(expression1, expression2)

Where  expression1 is the character string to be searched for occurrences.


Both expression1 and expression2 may evaluate to any data type but logically they will evaluate to character strings.

The count is made on overlapping occurrences as a pattern match from each character in expression1.

This means that the string jjj occurs 3 times in the string jjjjj.

An example of use is as:

Calc = "6 * 3 / 4 * 2"
CRT "There are ":COUNT(Calc, "*"):" multiplications"

See also: DCOUNT.

Go back to jBASE BASIC.

Was this article helpful?