MPE CI Programming for 7.5

July 22, 2008
Page 28
hp e3000
strategy
explicit referencing -
!varname
processed by the CI early, before command name is known
can cause hard-to-detect bugs in scripts - array example
lose variable type -- strings need to be quoted, e.g..
“!varName
!! (two exclamation marks) used to escapethe meaning of !, multiple !’s”
are folded 2 into 1
even number of !--> dont reference variables value
odd number of ! --> reference the variables value
useful to convert an ASCII number to an integer, e.g.
setvar int “123 or input foo, “enter a
number”
if !int > 0 then if !foo = 321 then ...
the only way to reference UDC or script parameters
the only way for most CI commands to reference variables