MPE CI Programming for 7.5

July 22, 2008
Page 39
hp e3000
strategy
what is an expression?
any variable, constant or function with or without an operator, e.g:
MYVAR, “a”+”b”, x^10*y/(j mod 6), false, (x > lim) or (input() =“y”)
partial evaluation:
if true or x # “x” side not evaluated
if false and x # “x” side not evaluated
if bound(z) and z > 10 then # if “z” not defined it wont be
referenced
problems when MPEX runs the script
where can expressions be used?
5 commands that accept implicit variable references:
:calc, :if, :elseif, :setvar, :while
![ expression ] can be used in any command:
:build afile; rec=-80; disc= ![100+varX]
:build bfile; disc= ![ finfo(afile”,”eof)*3] # file b is 3 times
bigger
examples:
:print ![input(“File name? )]
:setvar reply ups(rtrim(ltrim(reply)))
CI expressions