# _CP_print_on

_CP_print_on is equivalent to the `print on *expression*` BASIC statement.

## Syntax

```
int _CP_print_on(int expression)
```

## Description

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

Note: The environment must be set to _CP_pick_env() for this function to work properly.

## Example(s)

```
/* Prints "hi" to print job 1. */

CPSTR * s = _CP_mkstr("hi");

_CP_print_on(1);
_CP_print(s);
```

## See also

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

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