basic.col1 Function/BASIC Program

basic.col1

Command basic.col1 Function/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
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.
Syntax col1()
Options
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".
Purpose
Related basic.occurs
basic.field
basic.statements
basic.functions