HPlogo MPE/iX Commands Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3  Command Definitions C-E

ENDIF

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Terminates an IF block. (Native Mode)

Syntax

ENDIF

Parameters

None.

Operation Notes

The ENDIF command is used to terminate an IF block. The IF command, the optional ELSE and ELSEIF commands, and the ENDIF command constitute an IF block. A logical expression is evaluated, and if true, the IF block is executed; if false, the ELSE block (if one exists) is executed. If false and no ELSE exists, then execution continues following the ENDIF.

Use

This command may be issued from a session, job, program, or in BREAK. Pressing Break has no effect on this command.

Example

The following examples show the IF block ending with the ENDIF command:

 IF logical_expression
ELSE logical_expression
.
.
.
ENDIF

IF logical_expression
ELSEIF logical_expression
.
.
.
ENDIF

Related Information

Commands

IF, ELSE, ELSEIF

Manuals

None

Feedback to webmaster