HP Prime Graphing NW280AAABA Program Catalog, Program Structure Comments, Export Myprogam Begin

Models: Prime Graphing NW280AAABA

1 616
Download 616 pages 24.49 Kb
Page 504
Image 504

Program Structure

Comments

Some built-in commands employ an alternative syntax whereby function arguments do not appear in parentheses. Examples include RETURN and RANDOM.

Programs can contain any number of subroutines (each of which is a function or procedure). Subroutines start with a heading consisting of the name, followed by parentheses that contain a list of parameters or arguments, separated by commas. The body of a subroutine is a sequence of statements enclosed within a BEGIN–END; pair. For example, the body of a simple program, called MYPROGRAM, could look like this:

EXPORT MYPROGAM()

BEGIN

PIXON(1,1);

END;

When a line of a program begins with two forward slashes, //, the rest of the line will be ignored. This enables you to insert comments in the program:

EXPORT MYPROGAM() BEGIN PIXON(1,1);

//This line is just a comment. END;

The Program Catalog

The Program Catalog is where you run and debug programs, and send programs to another HP Prime. You can also rename and remove programs, and it is where you start the Program Editor. The Program Editor is where you create and edit programs. Programs can also be run from Home view or from other programs.

498

Programming in HP PPL

Page 504
Image 504
HP Prime Graphing NW280AAABA manual Program Catalog, Program Structure Comments, Export Myprogam Begin, End