# _CP_data

_CP_data is equivalent to the `data *string*` BASIC statement.

## Syntax

```
int _CP_data(CPSTR* string)
```

## Description

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

## Example(s)

```
/* Copies the "xx" item in the md to item "yy". */

CPSTR * s = _CP_mkstr("copy md xx");
CPSTR * t = _CP_mkstr("yy");
CPSTR * c = _CP_str_null;
CPSTR * r = _CP_str_null;

_CP_data(t);
_CP_execute(_CP_EXECUTE,s,&c,&r);
```

## See also

- [C functions overview](https://d3codex.com/cfunctions/c-functions-overview/)

---
Source: https://d3codex.com/cfunctions/cp-data/ - part of the D3Codex reference.
