HP Pascal/iX Reference Manual (31502-90022)
Table Of Contents
- Top of Document
- Preface
- Chapter 1 Introduction
- Chapter 2 Language Elements
- Chapter 3 Data Types
- Chapter 4 Expressions
- Chapter 5 The Declaration Section
- Chapter 6 Statements
- Chapter 7 Program Structure
- Chapter 8 Procedures and Functions
- Chapter 9 Standard Routines
- Chapter 10 Input and Output
- Chapter 11 System Programming Extensions
- Chapter 12 Compiler Options
12- 24
[ . ]
[ . ]
[ . ]
$ENDIF$
In this example, the code following $ELSE is compiled because group1 is
set to FALSE.
Example 2
$SET 'group3=true,group2=false;group1=false'$
.
.
.
$IF 'group1'$
[
source_line
]
[ . ]{group1}
[ . ]
[ . ]
$ELSE$
$IF 'group2'$
[
source_line
]
[ . ]{group2}
[ . ]
[ . ]
$ELSE$
$IF 'group3'$
[
source_line
]
[ . ] {group3}
[ . ]
[ . ]
$ENDIF$
$ENDIF$
$ENDIF$
In this example, only group3 is compiled because it is set to true and
group1 and group2 are set to false.
ENDIF
ENDIF is an HP Pascal Option.
The ENDIF compiler option ends the code to be conditionally compiled.
See the IF compiler option for more information.
Syntax
$ENDIF$
Default Not applicable.
Location Anywhere.
Example
$SET 'group1=true, group2=false'$
.
.
.
$IF 'group1 AND (NOT group2)'$
[
source_line
]
[ . ]