source: SH_SHM/trunk/help/IF.HLP @ 1237

Revision 16, 2.0 KB checked in by marcus, 15 years ago (diff)

r1 | svn | 2007-12-13 11:10:29 +0100 (Do, 13 Dez 2007) | 2 lines

Initial import

Line 
1command IF <operand1> <cmp-op> <operand2> <command> [<label>]
2==========
3
4key: conditional execution
5
6Valid only in command procedures.  Evaluates the condition
7"<operand1> <cmp-op> <operand2>" and executes the command <command>
8if the result is TRUE.
9
10
11parameters:
12
13<operand1>, <operand2>  ---  parameter type: depends on <cmp-op> (see below)
14   Operands to be compared.
15
16<cmp-op>  ---  parameter type: string
17   Compare operation which determines the manner of comparison and data
18   type of both operands.  Valid operators are listed below:
19
20   integer operations
21   EQI     <operand1> is equal to <operand2>
22   NEI     <operand1> is not equal to <operand2>
23   GTI     <operand1> is greater than <operand2>
24   GEI     <operand1> is greater than or equal to <operand2>
25   LTI     <operand1> is less than <operand2>
26   LEI     <operand1> is less than or equal to <operand2>
27
28   real operations
29   EQR     <operand1> is equal to <operand2>
30   NER     <operand1> is not equal to <operand2>
31   GTR     <operand1> is greater than <operand2>
32   GER     <operand1> is greater than or equal to <operand2>
33   LTR     <operand1> is less than <operand2>
34   LER     <operand1> is less than or equal to <operand2>
35
36   string operations
37   EQS     <operand1> is equal to <operand2>
38   NES     <operand1> is not equal to <operand2>
39
40<command>  ---  parameter type: string
41   Command to be executed if the compare operation results TRUE.  Possible
42   choices are:
43      GOTO   (<label> must be passed as 5-th parameter)
44      RETURN (returns to parent command level, see RETURN command)
45
46<label>  ---  parameter type: string
47   If <command> equals GOTO this is the destination label.
48
49
50qualifiers
51
52/FORWARD
53   Only valid if <command> is GOTO, forward jump (see GOTO command).
54
55
56examples:
57
58   IF  "TRCCNT GTI $DSPTRCS  GOTO/FORWARD LOOP_EXIT:
59           if symbol "TRCCNT" is greater than the number of traces
60           on display jump forward to label LOOP_EXIT:
61
62   IF  $STATUS NEI 0  RETURN
63           if previous command created an error return from command procedure
64
Note: See TracBrowser for help on using the repository browser.