ECHO [ MPE/iX Commands Reference Manual Volume I ] MPE/iX 5.0 Documentation
MPE/iX Commands Reference Manual Volume I
ECHO
Displays a message on the standard list device. (Native Mode)
Syntax
ECHO [message]
Parameters
message The message to be displayed to the $STDLIST.
Operation Notes
Displays its argument, message, on the standard list device ($STDLIST).
The command ignores delimiters. Quotation marks are not required around
message. The ECHO command does not perform dereferencing of any kind.
If you want variable dereferencing you must use explicit dereferencing
(!) in the argument. A null message ( Return ) displays a linefeed.
The ECHO command is not suppressed by OPTION NOLIST in a UDC or command
file, or by any setting of the HPMSGLEVEL variable.
Use
This command is available in a session, job, program, or in BREAK.
Pressing Break has no effect on this command.
Examples
In the following example, although there is a variable named a that has a
string value, ECHO simply displays the character a because no
dereferencing has been specified.
SETVAR a, 'hi there'
ECHO a
a
This time ECHO is given the value of the variable a argument. Explicit
dereferencing has been specified and the dereferencing is done before
ECHO is executed.
ECHO !a
hi there
Two exclamation points are resolved to one exclamation point by string
substitution, and MPE/iX is prohibited from making the value substitution
(even number rule).
ECHO !!a
!a
Triple (or any odd number of) exclamation points treat the argument as
!!!a, which resolves to ! and !a, giving !hi there (odd number rule).
ECHO !!!a
!hi there
If you entered the following command line in a user command, you would
see a message when an error occurred:
IF CIERROR <> 0 THEN
ECHO ** A CIERROR OCCURRED!: (CIERR !CIERROR) **
The first instance of CIERROR has no dereferencing, and so ECHO treats it
literally. The second instance, !CIERROR, contains explicit
dereferencing, and so MPE/iX substitutes a value for the system variable
CIERROR before the message is displayed to $STDLIST. So, for example, if
the program generated error 975, you would see this message:
** A CIERROR OCCURRED!: (CIERR 975) **
Related Information
Commands CALC, SET, SETVAR, COMMENT, TELL, WARN
Manuals Appendix A, "Predefined Variables in MPE/iX"
MPE/iX 5.0 Documentation