Makestring – HP XP P9500 Storage User Manual

Page 118

Advertising
background image

be met. You must end an If statement with an IF/EndIf statement. The execution statement cannot
be defined on the same line as the If statement. The If statement must contain one conditional
decision statement within parentheses. The string values must be compared as ASCII character
codes (see

Table 56 (page 118)

). The format for an IF/EndIf statement is:

If expression one compared with expression two (see

Table 57 (page 118)

for comparison

expressions)
Macro statement, either internal or functional.

IF/EndIf

For example, to start a pair only if the pair was created successfully (result value of CreateHrcPair
command is 0), use the IF/EndIf command as shown in the following example.

Example 14 If/Endif format

If (_Result==0)
StartHrcPair
EndIf

Table 56 ASCII character codes

Code

Character

0x30

0

0x31

1

0x39

9

0x41

A

0x5a

Z

0x61

a

0x7a

z

Table 57 (page 118)

shows the symbols for the allowed comparison expressions, and their meanings.

Table 57 If/EndIf comparison symbols

Meaning

Symbol

Expression 1 is equal to Expression 2.

= =

Expression 1 is less than Expression 2.

<

Expression 1 is less than or equal to Exp 2.

<=

Expression 1 is greater than Expression 2.

>

Expression 1 is greater than or equal to Exp 2.

>=

Expression 1 is not equal to Expression 2.

!=

MakeString

The MakeString allows you to edit a string and/or convert numeric values to string characters.
When using the MakeString statement several conditions must be met. For each format control
string statement there must be an $Item statement. The format control string of expression 1 must
be enclosed in quotation marks (““). If you set a value exceeding the maximum length of a string,
the extraneous portion of the value will be not set.

Table 58 (page 119)

defines the two expression statement in the MakeString command. The

following example shows the format for the MakeString command.

118

Continuous Access Synchronous Z scripting

Advertising