Programmer Guide/Command Reference/INTERPRET: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
==INTERPRET==
INTERPRET <var>variable</var>
 
The <code>INTERPRET</code> command interpretes the contents of the supplied variable as an S_TOOLS-STx command, and executes the respective command. <code>INTEPRET</code> returns the empty string on success, otherwise it will return an error message.
<code>INTERPRET [ <var>cmdVar</var>=ICMD <var>resVar</var>=IRES [ <var>historyTable</var> ]]</code>
 
Interpret the contents of a variable as a command. The command returns <code>0;</code> on success, <code>1;errorMessage</code> if there was a parsing error, otherwise it returns <code>2;</code>.
 
;<var>cmdVar</var>
 
:The id of a variable. If neither <var>cmdVar</var> nor <var>resVar</var> are specified, the variable <code>ICMD</code> is used.
 
;<var>resVar</var>
 
:The id of a variable to store the executed command's result in. If neither <var>cmdVar</var> nor <var>resVar</var> are specified, the variable <code>IRES</code> is used.
 
;<var>historyTable</var>
 
:A simple table to which the command should be appended. If the command is already in the history, moved to the end.

Revision as of 12:55, 5 April 2011

INTERPRET variable

The INTERPRET command interpretes the contents of the supplied variable as an S_TOOLS-STx command, and executes the respective command. INTEPRET returns the empty string on success, otherwise it will return an error message.

Navigation menu

Personal tools