cfunc.col1

C Function/C Functions, Releases: AP 6.1

Pick/BASIC 'col1' functionality from C.

Syntax

int _CP_col1(int* result)

Description

equivalent to the Pick/BASIC statement: result = col1.

This function returns -1 if an error occurs. The error code is contained in _CP_errno.

Example

/* The following example prints 'ab 2 5' */

CPSTR * s = _CP_mkstr('zdabdz');
CPSTR * t = _CP_mkstr('d');
int i,j;

_CP_field(&s,s,t,2);
_CP_col1(&i);
_CP_col1(&j);
_CP_TERM(s);
_CP_unix_env();
printf('%s %d %d\n',_CP_SADDR(s),i,j);

See Also

Command Name Type Description
cfunc.introduction Introductory Overview

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.