basic.col2 Function/BASIC Program

basic.col2

Command basic.col2 Function/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description returns the numeric column position of the character following the substring retrieved in the most recently executed field function.

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

"col1()" and "col2()" allows 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, and the field requested is "1", then col2() returns the length of the string. If the same situation occurs, but the field requested is "2" or higher, then the col2() returns 0.
Syntax
Options
Example
beatles = "john*paul*ringo*george"
name = field(beatles,"*",2)
startpos = col1()    ;*  start.pos is 5
endpos = col2()      ;*  end.pos is 10
beatles = beatles[1,startpos]:beatles[endpos+1,100]

This example has Paul splitting from the Beatles. (To do a solo album).
Purpose
Related basic.statements
basic.functions
basic.field