HP 35s Scientific Calculator Manuel d'utilisateur Page 212

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 382
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 211
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.
Vue de la page 211
1 2 ... 207 208 209 210 211 212 213 214 215 216 217 ... 381 382

Commentaires sur ces manuels

Pas de commentaire