# _CP_ascii

_CP_ascii is equivalent to the `*result* = ascii(*string*)` BASIC statement.

## Syntax

```
int _CP_ascii(CPSTR** result, CPSTR* string)
```

## Description

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

## Example(s)

```
CPSTR * s = _CP_mkstr("a");
_CP_unix_env();
_CP_ascii(&s,s);
printf("%c\n",*(_CP_SADDR(s)));
```

## See also

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

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