Programming
229
21
Programming
Introduction
This chapter describes how to program the HP 39gII. In
this chapter you’ll learn about:
•
programming commands
•
writing functions in programs
•
using variables in programs
•
executing programs
•
debugging programs
•
creating programs for building custom apps
•
sending a program to another HP39gII
HP 39gII
Programs
An HP 39gII program contains a sequence of commands
that execute automatically to perform a task.
Command
Structure
Commands are separated by a semicolon ( ; ).
Commands that take multiple arguments have those
arguments enclosed in parentheses and separated by a
comma( , ). For example,
PIXON
(
xposition
,
yposition
);
Sometimes, arguments to a command are optional. If an
argument is omitted, a default value is used in its place.
In the case of the PIXON command, a third argument
could be used that specifies the color of the pixel:
PIXON
(
xposition
,
yposition
[ ,
color
]);
The last argument indicates which of four colors to use
when lighting up the pixel. Here, the default value is 0
(black). In this manual, optional arguments to commands
appear inside square brackets, as shown above. In the
PIXON
example, a graphic variable (G) could be
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 ...