Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > S > SET

ECHO

Scroll Prev Top Next More

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 to display commands; specify OFF 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.

 

Echoing output can optionally be suppressed if a command starts with the "@" character, to improve the readability of an echoed output stream, for example, the echoing of the SET ECHO OFF command. Do not put any spaces in front of this character to make the output appear correctly.

 

When R:BASE runs the commands below in an ASCII file, you see the WRITE command display along with the message.

 

CLS

SET ECHO ON

WRITE 'This is a message'

SET ECHO OFF

 

To display the WRITE command along with the message, and without the SET ECHO OFF echo output, use the following:

 

CLS

SET ECHO ON

WRITE 'This is a message'

@SET ECHO OFF