COL1()

COL1()


CLOSE Index Level COL2()
Syntax COL1()  
Category BASIC
Type Function
Description returns the numeric column position of the character immediately preceding the substring retrieved in the most recently executed "field" function.

The parentheses following the function are required, and contain no arguments.

"col1()" and "col2()" allow non-system delimited strings to be handled like dynamic arrays.  

If the "search" value does not appear in the string being searched by the "field" function, 0 (zero) is returned for the col1() function.
Options
See Also OCCURS FIELD statements & functions functions
Example beatles = "john*paul*pete*ringo*george"
name = field(beatles,"*",3)
start.pos = col1()    ;*  start.pos is 10
end.pos = col2()      ;*  end.pos is 15
beatles = beatles[1,start.pos]:beatles[end.pos+1,100]

This example removes "pete" from "beatles".
Warnings
Compatibility D3 7.0 AP R83
CLOSE Index Level COL2()