EasyManuals Logo

HP 33S User Manual

HP 33S
388 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #186 background imageLoading...
Page #186 background image
13–2 Programming Techniques
File name 33s-English-Manual-040130-Publication(Edition 2).doc Page : 388
Printed Date : 2004/1/30 Size : 13.7 x 21.2 cm
Calling Subroutines (XEQ, RTN)
A subroutine is a routine that is called from (executed by) another routine and
returns to that same routine when the subroutine is finished. The subroutine must
start with a LBL and end with a RTN. A subroutine is itself a routine, and it can call
other subroutines.
XEQ must branch to a label (LBL) for the subroutine. (It cannot branch to a line
number.)
At the very next RTN encountered, program execution returns to the line after
the originating XEQ.
For example, routine Q in the "Normal and Inverse–Normal Distributions"
program in chapter 16 is a subroutine (to calculate
Q(x)) that is called from routine
D by line


. Routine Q ends with a RTN instruction that sends
program execution back to routine D (to store and display the result) at line D0004.
See the flow diagrams below.
The flow diagrams in this chapter use this notation:


1
Program execution branches from this line to
the line marked
1
("from 1").


1
Program execution branches from a line
marked
1
("to 1") to this line.


Starts here.




1
Calls subroutine Q.


2
Returns here.




Starts D again.


1
Starts subroutine.
.
.
.


2
Returns to routine D.

Table of Contents

Other manuals for HP 33S

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 33S and is the answer not in the manual?

HP 33S Specifications

General IconGeneral
TypeScientific
Form factorPocket
Product colorSilver
Digits10 digits
Display number of lines2 lines
Keyboard typeAlphanumeric
Menus and promptsYes
Weight and Dimensions IconWeight and Dimensions
Dimensions (WxDxH)157 x 16 x 81 mm

Related product manuals