HP 3000 Manuals

IF [ HP TRANSACT Quick Reference Guide ] MPE/iX 5.5 Documentation


HP TRANSACT Quick Reference Guide

IF 

     IF condition-clause THEN statement [ELSE statement];

     CONDITION CLAUSE 
     test-variable relational-operator value[,value...][{AND|OR} ...]

     TEST VARIABLES 
     (item-name[(subscript)])
     arithmetic-expression 
     EXCLAMATION  - Status of automatic null response
     FIELD        - Status of the FIELD option
     INPUT        - Last value input to INPUT
     PRINT        - Status of PRINT or TPRINT option
     REPEAT       - Status of REPEAT option
     SORT         - Status of SORT option
     STATUS       - Value of STATUS register

     RELATIONAL OPERATORS 
     =
     <>
     <
     <=
     >
     >=
     [REV BEG]
     VALUES FOR ITEM NAME TEST VARIABLE 
     (item-name[(subscript)])
     arithmetic-expression 
     "character-string"
     class-condition 
     expression 
     number 

     CLASS CONDITIONS WHEN RELATIONAL OPERATOR IS "=" OR "<>" 
     NUMERIC
     ALPHABETIC
     ALPHABETIC-LOWER
     ALPHABETIC-UPPER

     VALUES FOR ARITHMETIC EXPRESSION TEST VARIABLE 
     (item-name[(subscript)])
     arithmetic-expression 
     number 

     VALUES FOR EXCLAMATION, FIELD, PRINT, REPEAT, SORT, STATUS TEST VARIABLES 
     arithmetic-expression 
     number 

     VALUE FOR INPUT TEST VARIABLE 
     "character-string"[REV END]

Example 

     IF (QTY)>(ONHAND) THEN DISPLAY "Too many ordered!";



MPE/iX 5.5 Documentation