# col1() function

The col1() function returns the numeric
column position of the character immediately preceding the substring
retrieved in the most recently executed field() function.

## Syntax

```
col1()
```

## Description

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

col1() allows nonsystem delimited strings to be handled like dynamic arrays.

If the search value does not exist in the string being searched
by the field() function, 0 is returned for the col1() function.

## Example(s)

This example removes red from colors.

```
colors = "blue*green*red*yellow*orange"
name = field(colors,"*",3)
start.pos = col1() ;* start.pos is 11
end.pos = col2() ;* end.pos is 15
colors = colors[1,start.pos]:colors[end.pos+1,100]
```

## See also

- [field() function](https://d3codex.com/pickbasic-flashbasic/field-function/)
- [BASIC functions](https://d3codex.com/pickbasic-flashbasic/basic-functions/)
- [occurs() function](https://d3codex.com/pickbasic-flashbasic/occurs-function/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)

---
Source: https://d3codex.com/pickbasic-flashbasic/col1-function/ - part of the D3Codex reference.
