Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Fortran Compiler for HP-UX: HP Fortran Programmer's Reference > Chapter 10 HP Fortran statements

SELECT CASE

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Begins CASE construct.

Syntax

[construct-name :] SELECT CASE (case-expr)
construct-name

is the name given to the CASE construct.

case-expr

is a scalar expression of type integer, character, or logical.

Description

The SELECT CASE statement, the first statement of a CASE construct, causes case-expr to be evaluated, resulting in the case index. The CASE construct uses the case index to determine which of its statement blocks to execute.

If construct-name is specified, it must also appear in the END SELECT statement.

Examples

For an example of the SELECT CASE statement, see CASE.

Related statements

CASE and END (construct)

Related concepts

For information about the CASE construct, see “CASE construct”.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.