# aux statement

The aux statement enables or disables
spooling to the auxiliary port.

## Syntax

```
aux [off|on|exp]
```

## Parameter(s)

| on | Enables spooling to the auxiliary port and saves the p and h flags of the current TCL sp-assign status. |
| --- | --- |
| off | Reverses the effect of the last executed aux on statement. It turns off auxiliary port printing, and restores the previous status of the p and h flags of the current TCL sp-assign status. |
| exp | In the expression form, auxiliary printing is disabled when the expression evaluates to false. It is enabled when the expression evaluates to true. In an expression, 0 = aux off and nonzero = aux on. |

## Description

CAUTION: aux off should *never* be executed without a preceding aux on because aux off assumes that
information has been saved by aux on.

Note: The aux statement must appear before the first
output to a print job to take affect properly.

## See also

- [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/aux-statement/ - part of the D3Codex reference.
