COL1 and COL2


These functions are used in conjunction with the FIELD function to determine the character positions 1 position before and 1 position after the last field that was located.

 

COMMAND SYNTAX

COL1()
COL2()

 

NOTES

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. They can then be used to manipulate the string.

 

EXAMPLES

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

Displays the values 2 and 4


jBC