# error() function

The error() function retrieves the TCL
command used to activate the program and loads it into a specified
variable.

## Syntax

```
error()
```
The parentheses following the function are required, and
never contain any arguments. Without the parentheses, it is a variable.

Note: This does *not* work from a Proc or from an execute statement.

D3 users are advised to use
the tclread statement instead.

## Example(s)

If the one-line, cataloged program
called test is executed as shown, it displays the command line.

```
test
001 crt error()
```

## See also

- [BASIC functions](https://d3codex.com/pickbasic-flashbasic/basic-functions/)
- [procread statement](https://d3codex.com/pickbasic-flashbasic/procread-statement/)
- [procwrite statement](https://d3codex.com/pickbasic-flashbasic/procwrite-statement/)
- [tclread statement](https://d3codex.com/pickbasic-flashbasic/tclread-statement/)

---
Source: https://d3codex.com/pickbasic-flashbasic/error-function/ - part of the D3Codex reference.
