ECHO
Top  Previous  Next

Operating Condition

Syntax: SET ECHO ON/OFF

Default: OFF

SET ECHO displays or suppresses commands as they are processed from the current ASCII input device. Specify on or ECHO to display commands; specify ECHO off or NOECHO to turn off the command display.

Use SET ECHO as a debugging technique as you develop a command file. With ECHO set on, you can see the commands as they are processed when you run a command file. SET ECHO works only when the command file is an ASCII file; it will not display commands that were run from a binary procedure file.

Enter a SET ECHO ON command at the beginning of the program. Then, when the program runs, R:BASE displays each command as it is interpreted and, if needed, runs it. Sometimes the commands scroll on the screen faster than you can read, especially if they are read by R:BASE but not run. You can temporarily stop the display by pressing [Ctrl]+[Break], which stops the file from running, and restart it by pressing [Enter], or stop completely by pressing [Esc]. Set ECHO off to suppress command display.

Even more useful, you can direct output to a printer or a file before you set ECHO to on. Then, when the command file runs, the commands and any errors are saved either in printed form or in a file you can look at.

When R:BASE runs the commands below in an ASCII file, you see the commands on lines two, three, and four displayed at the top of the screen and the message displayed on line 10 beginning at column 20.
 
CLS  
SET ECHO ON  
WRITE 'This is a message' at 10 20  
SET ECHO OFF