HP HP48G hp 49g_user's manual_English_E_F1633-90001.pdf - Page 197
Trapping errors
![]() |
UPC - 088698587195
View all HP HP48G manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 197 highlights
« @ Local variable S is used @ to store the step number. @ Step from 1 to the size of the list. FOR(S,1,SIZE(MARKS)) @ Extracts the element from the list GET(MARKS,S) → E @ Compares it to the pass mark, amends and @ replaces with the new value. « IF E≥50 THEN E+" Pass" E ELSE E+" Fail" E END ; REPL(MARKS,S,{E}) MARKS » ; NEXT » Trapping errors Introduction to programming Introduction to programming Page 10-15
![](/manual_guide/products/hewlettpackard-hp49g-hp-49gusers-manualenglishef163390001pdf-15937b8/197.png)
Introduction to programming
Page 10-15
Introduction to programming
« @ Local variable S is used
@ to store the step number.
@ Step from 1 to the size of the list.
FOR(S,1,SIZE(MARKS))
@ Extracts the element from the list
GET(MARKS,S)
→
±
E
@ Compares it to the pass mark, amends and
@ replaces with the new value.
« IF E
≥
50 THEN
E+" Pass"
±
±
E
ELSE
E+" Fail"
±
±
E
END ;
REPL(MARKS,S,{E})
MARKS
» ;
NEXT
»
Trapping errors
%\±GHIDXOW·±D±SURJUDP±KDOWV±ZKHQ±LW±HQFRXQWHUV±DQ±HUURU²±,I±\RX±ZDQW±
VHFWLRQV±RI±\RXU±SURJUDP±WR±GHDO±ZLWK±HUURUV±UDWKHU±WKDQ±KDOW±WKH±SURJUDP·±
\RX±QHHG±WR±LQFOXGH±WKH±VHFWLRQV±LQVLGH±HUURU±WUDSSLQJ±VWUXFWXUHV²±<RX±FDQ±
WKHQ±VSHFLI\±DFWLRQV±WR±WDNH±ZKHQ±\RXU±SURJUDP±HQFRXQWHUV±HUURUV·±UDWKHU±
WKDQ±KDOWLQJ±WKH±SURJUDP²±7KH±IROORZLQJ±HUURU±WUDSSLQJ±VWUXFWXUHV±DUH±
DYDLODEOH²
Â
,)(55²
FRGH±
7+(1²
HUURU²FRGH±
(1’
,I±WKH±SURJUDP±HQFRXQWHUV±DQ±HUURU±ZKLOH±LW±LV±UXQQLQJ±
FRGH
·±WKH±UHPDLQµ
LQJ±FRGH±LV±VNLSSHG±DQG±
HUURU²FRGH±
LV±UXQ²±,I±QR±HUURUV±DUH±HQFRXQWHUHG±
LQ±
FRGH
·±
HUURU²FRGH±
LV±QRW±UXQ²
Â
,)(55²
FRGH±
7+(1²
HUURU²FRGH±
(/6(
±QRHUURU²FRGH±
(1’
,I±WKH±SURJUDP±HQFRXQWHUV±DQ±HUURU±ZKLOH±LW±LV±UXQQLQJ±
FRGH
·±WKH±UHPDLQµ
LQJ±FRGH±LV±VNLSSHG±DQG±
HUURU²FRGH±
LV±UXQ²±,I±QR±HUURUV±DUH±HQFRXQWHUHG±
LQ±
FRGH
·±
QRHUURU²FRGH±
LV±UXQ²