MPE/iX - CI Programming for Stability
July 18, 2008 HP World '01 69
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 “escape” the meaning of “!”, multiple
“!’s” are folded 2 into 1
• even number of “!” --> don’t reference variable’s value
• odd number of “!” --> reference the variable’s 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