# print on statement

The print on statement directs output
to one of 32,767 open print files.

## Syntax

```
print on print.file.num print.exp
```

## Parameter(s)

| print.file.num | Specifies the print file (from 0-31,999) to which the input is sent. Up to 32,000 print files can be opened at one time. |
| --- | --- |
| print.exp | Expression whose output is sent to the printer. Multiple expressions can be specified. |

## Description

The print file number has no
connection to spooler print file numbers. This number is logical and
local to the current program and is used to group output.

Each
logical print file number is assigned the next available spool job
number. Therefore, it is possible to have the statement print
on 1 answer output to job #3 and print on 2 string output to job #30.

## Example(s)

```
print on 0 oconv(chk.dt,"d2/") "l#9":amt "r2*20"
```

## See also

- [, reserved character](https://d3codex.com/pickbasic-flashbasic/comma-reserved-character/)
- [.pfile command](https://d3codex.com/runoff/dot-pfile-command/)
- [crt statement](https://d3codex.com/pickbasic-flashbasic/crt-statement/)
- [print statement](https://d3codex.com/pickbasic-flashbasic/print-statement/)
- [printer statement](https://d3codex.com/pickbasic-flashbasic/printer-statement/)
- [sp-assign command](https://d3codex.com/tcl/sp-assign-command/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)

---
Source: https://d3codex.com/pickbasic-flashbasic/print-on-statement/ - part of the D3Codex reference.
