This is part of the HicEst documentation
XEQ: Compile and Execute a Character String
This allows to execute an interactively built character string under script control. Currently available variables can be used and changed this way.
⇾Home
⇾Contents
⇾more Programming
⇾ Examples
result = XEQ(string [, *error_label] )
executes string under script control
string must be a
⇾ valid expression
*error_label is an optional label to jump to if an error occurs. Without this label an error message is shown in the error case.
string is translated and executed only when XEQ is called
variables of the current script procedure can be used. Non existent variables are allocated while the string is executed and deallocated then
XEQ
will not execute
GOTO
or multiline constructs like
DO
,
CALL
,
IF
..
THEN
string can be generated by the script, it can be stored in a file to be recalled later
the toolbar tool 1+1 is an example how XEQ works and what it can do. Copy (Ctrl+C) and paste (Ctrl+V) to script i you like.
examples:
result = XEQ( "a = b + c" )
a is set only if it is available in the calling procedure, else "b + c" is stored in result
x = XEQ( "
CALL
my_subroutine", *999)
! will jump to
⇾ label
999
execute 1 command out of a filed list:
OPEN
(FIle="my_list.txt")
READ
(FIle="my_list.txt", Row=6) string
XEQ(string)
! executes row 6 of file my_list.txt
⇾
Support HicEst
⇾
Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.