# echo statement

The echo statement toggles terminal
echo on or off.

## Syntax

```
echo {off|on|num.exp}
```

## Parameter(s)

| off | Turns terminal echoing off. Characters entered at the terminal are not seen on the screen. However, the characters are sent to the computer and processed as usual. Furthermore, any output that originates within the computer displays on the screen. |
| --- | --- |
| on | Turns the normal mode of full duplex echoing on. |
| num.exp | An expression that returns zero is equivalent to echo off. Any other value returned is equivalent to echo on. |

## Description

Typically, terminals attached
to the system operate in echoplex or full duplex mode. Characters
typed at a terminal are sent directly to the computer and must be
echoed back to the terminal before they are displayed on the screen.

The echo off statement also turns off echo
in the FlashBASIC or BASIC debugger.

The echo statement is not reset when returning to TCL.

## Example(s)

The password does not display
as it is being typed in. Once the password is accepted, echo is enabled.

```
crt "enter password " :
echo off
input password
echo on
```
The echo statement is disabled if the `secure` variable is 5 or less. echo is
enabled for 6 or more.

```
secure = userrec<5>
echo secure >= 6
```
On systems running in half duplex, there is no need to
echo the character to the terminal display. The terminal has already
taken care of the display. This proves invaluable when terminals are
connected through networks or complicated multiplexing.

```
echo off
...
input string
```

## See also

- [echo command](https://d3codex.com/tcl/echo-command/)
- [Full duplex](https://d3codex.com/definitions/full-duplex/)
- [get statement](https://d3codex.com/pickbasic-flashbasic/get-statement/)
- [Half duplex](https://d3codex.com/definitions/half-duplex/)
- [p command (FlashBASIC Debugger)](https://d3codex.com/flashbasicdebugger/p-command-flashbasic-debugger/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)

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