HP 40gs hp 40gs_user's guide_English_E_HDPMSG40E07A.pdf - Page 366
If A==1, Then Msgbox A Equals 1, If A==1 Then, Msgbox A Equals 1, Msgbox A Is Not Equal To 1
UPC - 882780045217
View all HP 40gs manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 366 highlights
hp40g+.book Page 18 Friday, December 9, 2005 1:03 AM IF... THEN... ELSE... END CASE...END IFERR... THEN... ELSE... END... 21-18 Example 1XA : IF A==1 THEN MSGBOX " A EQUALS 1" : END: Executes the true-clause sequence of commands if the testclause is true, or the false-clause sequence of commands if the test-clause is false. IF test-clause THEN true-clause ELSE false-clause END Example 1XA : IF A==1 THEN MSGBOX "A EQUALS 1" : ELSE MSGBOX "A IS NOT EQUAL TO 1" : A+1XA : END: Executes a series of test-clause commands that execute the appropriate true-clause sequence of commands. Its syntax is: CASE IF test-clause1 THEN true-clause1 END IF test-clause2 THEN true-clause2 END . . . IF test-clausen THEN true-clausen END END: When CASE is executed, test-clause1 is evaluated. If the test is true, true-clause1 is executed, and execution skips to END. If test-clause1 if false, execution proceeds to testclause2. Execution with the CASE structure continues until a true-clause is executed (or until all the test-clauses evaluate to false). Many conditions are automatically recognized by the HP 40gs as error conditions and are automatically treated as errors in programs. Programming