HP 3000 Manuals

<VAR> [ HP DeskManager Customization ] MPE/iX 5.0 Documentation


HP DeskManager Customization

<VAR> 

Syntax 

<VAR {varname} [index] [count] >

where:

varname               quoted string, unquoted string, numeric value or
                      parenthetical string
index                 numeric value in the range 1 to 256
count                 numeric value in the range 1 to 256

Description 

<VAR> returns the contents of the stored variable varname.  If the
variable contents are a string (quoted, unquoted or parenthetic), the
optional parameters index and count can be used to extract substrings.
The index parameter gives the start position in the string and count 
gives the number of characters to return.  If the start position is after
the end of the string, a null string is returned.  If the finish position
goes beyond the length of the string, a substring from the start position
to the end of the string is returned.  If the variable contents are
numeric, then index and count (if provided) are ignored.

See also:  &SAVE, <STR>.

Example 

     &SAVE x 15
     &PRINT The variable x contains the value <VAR x>

This will print:

     The variable x contains the value 15.

And:

     &SAVE ch <VAR qip 1 1>

will save the first character stored in the variable qip in ch.  In other
words, if qip has read in it then ch contains r.



MPE/iX 5.0 Documentation