Download  Print this page

Example - HP 49g User Manual

Graphing calculator.
Hide thumbs

Advertisement

Example

«
@ Set numeric mode so that error trap works
SF(-3) ;
@ Create an empty list
{} MARKS ;
@ Set up a loop for 20 entries.
WHILE SIZE(MARKS)<20 REPEAT
@ Start error-checking routine.
IFERR INPUT("Enter a number","")
@ Attempt to convert the entry to a number.
@ This generates an error if non-numeric
« OBJ (N)+1-1
@ If no error, append the entry to the list.
« MARKS+N
"
"
THEN
@This appears if entry is non-numeric.
MSGBOX("INVALID ENTRY, TRY AGAIN")
END ;
END
"
Page 10-16
N
MARKS
N
Introduction to programming

Advertisement

Table of Contents

   Also See for HP 49g

   Related Manuals for HP 49g

Comments to this Manuals

Symbols: 0
Latest comments: