hp40g+.book Page 18 Friday, December 9, 2005 1:03 AM
IF... THEN... ELSE...
END
CASE...END
IFERR...
THEN...
ELSE…
END...
Example
1XA : IF A==1
THEN MSGBOX " A EQUALS 1" : END:
Executes the
IF
THEN
1XA :
IF A==1 THEN
MSGBOX "A EQUALS 1" :
ELSE
MSGBOX "A IS NOT EQUAL TO 1" : A+1XA :
END:
Executes a series of
CASE
IF
IF
.
.
.
IF
END:
When CASE is executed,
Many conditions are automatically recognized by the HP 40gs as error conditions and are automatically treated as errors in programs.
|
| Programming | |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|