# _CP_ebcdic

_CP_ebcdic is equivalent to the `*result* = ebcdic(*string*)` BASIC statement.

## Syntax

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

## Description

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

## Example(s)

```
/* Prints "a". */

CPSTR * s = _CP_mkstr("/");
_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-ebcdic/ - part of the D3Codex reference.
