EasyManuals Logo

HP 35s User Manual

HP 35s
382 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 #212 background imageLoading...
Page #212 background image
14-2 Programming Techniques
If you plan to have only one program in the calculator memory, you can
separate the routine in various labels. If you plan to have more than one
program in the calculator memory, it is better to have routines part of the
main program label, starting at a specific line number.
A subroutine can itself call other subroutines.
The flow diagrams in this chapter use this notation:
The example below show you to call a subroutine to change the sign of the number
you input. Subroutine E that is called from routine D by line   
changes sign of the number. Subroutine E ends with a RTN instruction that sends
program execution back to routine D (to store and display the result) at line D004.
See the flow diagrams below.
Nested Subroutines
A subroutine can call another subroutine, and that subroutine can call yet another
subroutine. This "nesting" of subroutines — the calling of a subroutine within
another subroutine — is limited to a stack of subroutines 20 levels deep (not
counting the topmost program level). The operation of nested subroutines is as
shown below:
   1 Program execution branches from this line to the
line number marked 1 ("from 1").
  1 Program execution branches from a line number
marked 1 ("to 1") to this line.
  Starts here.
 
   1 Calls subroutine E.
  2 Returns here.
 
 
 
1
Starts subroutine.
  Change sign of the number
 
2
Returns to routine D.

Table of Contents

Other manuals for HP 35s

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 35s and is the answer not in the manual?

HP 35s Specifications

General IconGeneral
TypeScientific
Form factorPocket
Product colorBlack
Digits14 digits
Display number of lines2 lines
Keyboard typeAlphanumeric
Menus and promptsYes
Weight and Dimensions IconWeight and Dimensions
Dimensions (WxDxH)157.9 x 18 x 82 mm

Related product manuals