Hp 48g Graphing Calculator Uživatelský manuál Strana 423

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 612
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 422
l HOME }
4:
3!
10
2:
6
1 =
£0
then
a creates local variable a = 20,
a b creates local variables a = 6 and b = 20.
+ a b c creates local variables a = 10, 6 = 6, and c = 20.
The defining procedure then uses the local variables to do calculations.
Local variable structures have these advantages:
The —+ command stores the values from the stack in the
corresponding variables—you don’t need to explicitly execute STO.
m
Local variables automatically disappear when the defining procedure
for which they are created has completed execution. Consequently,
local variables don’t appear in the VAR menu, and they occupy user
memory only during program execution.
m Different local variable structures can use the same variable names
without conflict.
29
Evaluating Local Names
Local names are evaluated differently from global names. When a
global name is evaluated, the object stored in the corresponding
variable is itself evaluated. (You’ve seen how? programs stored in
global variables are automatically evaluated when the name is
evaluated.)
When a local name is evaluated, the object stored in the
corresponding variable is returned to the stack but is not evaluated.
When a local variable contains a number, the effect is identical to
evaluation of a global name, since putting a number on the stack is
equivalent to evaluating it. However, if a local variable contains a
program, algebraic expression, or global variable name—and if you
Programming the HP 48 29-17
Zobrazit stránku 422
1 2 ... 418 419 420 421 422 423 424 425 426 427 428 ... 611 612

Komentáře k této Příručce

Žádné komentáře