Programming
265
the
Ot
combination (press and hold
O
, then
press
t
, then release both keys). Pressing
O
stops the interaction with the terminal.
There are also commands for outputting data in the
Graphics section. In particular, the commands
TEXTOUT
and
TEXTOUT_P
can be used for test output.
This example prompts the user to enter a value for the
radius of a circle, and prints the area of the circle on the
terminal.
EXPORT AREACALC()
BEGIN
LOCAL radius;
INPUT(radius, "Radius of Circle",:"r =
","Enter radius",1);
PRINT("The area is "
+ *radius^2);
END;
Notice the use of the
LOCAL
variable for the radius, and
the naming convention that uses lower case letters for the
local variable. Adhering to such a convention will
improve the readability of your programs.
GETKEY
Syntax:
GETKEY
Returns the ID of the first key in the keyboard buffer, or -1
if no key was pressed since the last call to
GETKEY
. Key
IDs are integers from 0 to 50, numbered from top left (key
0) to bottom right (key 50) as shown on the following
page.
π
Summary of Contents for 39gII
Page 1: ...HP 39gII graphing calculator user s guide Edition1 Part Number NW249 90001 ...
Page 2: ...Printing History Edition 1 November 201 1 ...
Page 32: ...22 Getting started ...
Page 58: ...48 Apps and their views ...
Page 70: ...60 Function app ...
Page 80: ...70 Solve app ...
Page 136: ...126 Polar app ...
Page 140: ...130 Sequence app ...
Page 148: ...138 Finance app ...
Page 152: ...142 Linear Solver app ...
Page 218: ...208 Matrices ...
Page 226: ...216 Notes and Info ...
Page 238: ...228 Variables and memory management ...
Page 318: ...308 Programming ...
Page 340: ...330 Reference information ...
Page 346: ...vi Product Regulatory Information ...