1 :Info: if: 1982-04-21 if
2
3 Syntax as a command: if EXPR -then LINE1 -else LINE2
4
5
6 Syntax as an active function: if EXPR -then STR1 -else STR2
7
8
9 Function: conditionally executes one of two command lines depending on
10 the value of an active string. As an active function, returns one of
11 two character strings to the command processor depending on the value
12 of an active string.
13
14
15 Arguments:
16 EXPR
17 is the active string which must evaluate to either "true" or
18 "false".
19 LINE1
20 is the command line to execute if EXPR evaluates to "true". If the
21 command line contains any command processor characters, it must be
22 enclosed in quotes.
23 STR1
24 is returned as the value of the if active function if the EXPR
25 evaluates to "true".
26
27
28 LINE2
29 is the command line to execute if EXPR evaluates to "false". If
30 omitted and EXPR is "false", no additional command line is executed.
31 If the command line contains any command processor characters, it
32 must be enclosed in quotes.
33 STR2
34 is returned as the value of the if active function if the EXPR
35 evaluates to "false". If omitted and the EXPR is "false", a null
36 string is returned.
37
38
39 :hcom:
40
41
42
43 /****^ HISTORY COMMENTS:
44 1) change2020-04-26GDixon, approve2021-02-22MCR10088,
45 audit2021-05-27Swenson, install2021-05-27MR12.6g-0056:
46 A) Change "Syntax:" to "Syntax as a command:" in command info seg
47 changed after 1984.
48 END HISTORY COMMENTS */
49
50
51