<IF> <ELSE> <END>

<< Click to Display Table of Contents >>

Navigation:  Special tags (USER, <#PAGES>, <TIME-OUT>, <BUTTON>... >

<IF> <ELSE> <END>

One level only tags to control the .xpr processing:  <IF> <ELSE> <END>

 

Syntax:

 

<IF condition>   .........xpr tags ......

                 ... ...

 

[ <ELSE>........ .xpr tags ...... ]

                 ... ...

<END>

 

Different operands can be used in the condition of the <IF> statement:

 

NEWPAGE (reserved)

set if a frame overflow has occurred (<CHAIN...PAGE...>)

PAGE (reserved)

the current page number

".....string value....."

...string_value...

"12345.20"

a string value

a string value that does not contain spaces

a numeric value

12345

a numeric value

...logical_value...

something that results to true or false like: "true", "false", "yes", "no"...

[=@....]

any preprocessed value

 

Operators:

 

=

equal to

!=

<)

different

<

less than

)

greater than

)=

greater or equal to

<=

less or equal to

 

Note: > is replaced by a ) to avoid confusion with the end of the tag.

 

Examples:

<IF NEWPAGE>... if a new page has been generated by vpxPrint... <END>

<IF PAGE = 3>...... <END>

<IF PAGE )= 2> .. if current page is >= to 2 ... <END>

<IF [=@AMOUNT] ) 1000> <FGCOLOR=RED> <ELSE> <FGCOLOR=YELLOW> <END>