The contents of a program, Using the program catalog, The contents of a program -1 – HP 38g Graphing Calculator User Manual
Page 153: Using the program catalog -1, Structured programming
Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".
8
Programmiiig
This chapter describes how to program using the HP 38G. In
this chapter you’ll learn about
• Using the Program catalog to create and edit programs.
• Programming commands.
® Storing and retrieving variables in programs,
• Programming variables.
The Contents of a Program
An HP 38G program contains a sequence of numbers,
mathematical expressions, and commands that execute
automatically to perform a task.
These items are separated by a colon (: ). Commands that take
multiple arguments, have those arguments separated by a
semicolon ( ;). For example,
PIXON
xposition
;
yposition
Structured Programming
Inside a program you can use branching structures to control
the execution flow. You can take advantage of structured
programming by creating “building-block" programs. Each
building-block program stands alone—and it can be called in
other programs.
Example
run
getvalue
:
run
calculate
:
run
showanswer
This program is separated into three main tasks, each an
individual program. Within each program, the task can be
simple—or it can be divided further into other programs that
perform smaller tasks.
Using the Program Catalog
The Program catalog is where you create, edit, delete, send,
receive, or run programs. This section describes how to
Programming 8-1