Skip to Main Content
Introduction to Computational Modeling Using C and Open-Source Tools
book

Introduction to Computational Modeling Using C and Open-Source Tools

by Jose M. Garrido
November 2013
Intermediate to advanced content levelIntermediate to advanced
461 pages
12h 1m
English
CRC Press
Content preview from Introduction to Computational Modeling Using C and Open-Source Tools
Selection 81
case press stat of
value ’D’: msg = "Very dangerous"
value ’A’: msg = "Alert"
value ’W’: msg = "Warning"
value ’N’: msg = "Normal"
value ’B’: msg = "Below normal"
endcase
display "Pressure status: ", msg
The default option of the case statement can also be used by writing the key-
words default or otherwise in the last case of the selector variable. For example,
the previous example can be enhanced by including the default option in the case
statement:
case press stat of
value ’E’: msg = "Very dangerous"
value ’D’: msg = "Alert"
value ’H’: msg = "Warning"
value ’N’: msg = "Normal"
value ’B’: msg = "Below normal"
otherwise
msg = "Pressure rising"
endcase ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computer Fundamentals and Programming in C (RMK)

Computer Fundamentals and Programming in C (RMK)

Anita Goel, Ajay Mittal

Publisher Resources

ISBN: 9781482216783