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?

COL1 and COL2


These functions can be used in conjunction with the FIELD function to determine the character positions 1 position before and 1 position after the location of the last field. It takes the general form: 

COL1() / COL2()

When a field has been located in a string, it is sometimes useful to know its exact position within the string to manipulate either it, or the rest of the string. COL1() will return the position of the character immediately before the last field located. COL2() will return the position of the character immediately after the end of the last field located. Use them to manipulate the string. 

An example of use is as: 

A = "A,B,C,D,E"
Fld = FIELD(A, ",", 2)

Displays the values 2 and 4

Go back to jBASE BASIC.

Was this article helpful?