# tclread statement

The tclread statement loads the TCL
command used to activate the program into a variable.

## Syntax

```
tclread var
```

## Parameter(s)

| var | Variable in which the TCL command used to activate the program is loaded. |
| --- | --- |

## Description

The program must be the program
called from TCL. The tclread statement does not
work when called from a subroutine or from enter or tcl statements. This statement allows parameters
to be passed from TCL to a program directly without processing. Individual
parameters can be extracted using the field() function.

Note: This statement is only valid when called from a main program.
Calling this statement from a subroutine will return unpredictable
results.

## Example(s)

tclread is
used to extract the file name and item-ID from the TCL command line.
Here is a sample TCL command using the show program:

## See also

- [error() function](https://d3codex.com/pickbasic-flashbasic/error-function/)
- [field() function](https://d3codex.com/pickbasic-flashbasic/field-function/)
- [procread statement](https://d3codex.com/pickbasic-flashbasic/procread-statement/)
- [procwrite statement](https://d3codex.com/pickbasic-flashbasic/procwrite-statement/)
- [sentence() function](https://d3codex.com/pickbasic-flashbasic/sentence-function/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [u0003 user exit](https://d3codex.com/pickbasic-flashbasic/u0003-user-exit/)

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