Hp 48g Graphing Calculator Manual do Utilizador Página 424

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 612
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 423
29
want it evaluated—the program should execute EVAL after the object
is put on the stack.
Using Local Variables within Subroutines
Because a program is itself an object, it can be used in another
program as a subroutine. When program B is used by program'
A, program A calls program B, and program 5 is a subrouime in
program A.
Normally, a local variable exists only inside its defining procedure (and
not within any subroutines called by the defining procedure). Thus,
normal local variables can only be used within a subroutine if the
subroutine is embedded, or nested within the local variable’s defining
procedure.
However, the HP 48 offers a way to include local variables in
subroutines that are not nested within the local variable’s defining
procedure.
To- use a ioca! ¥sriabie In a subroutine called t// l!ie ¥ariabie’'s
■tiefining procedure:
B When defining the local variable, name it using -e as the
first character. This creates a compiled local variable.
m When calling the local variable within a subroutine, specify its name
using as the first character.
A compiled local variable is available to any subroutine called by the
defining procedure for the local variable. How^ever, compiled local
variables are still local variables and are purged when the defining
procedure is completed.
Local Variables and User-Defined Functions
The defining procedure for a local variable structure can be either an
algebraic or program object.
A user-defined function is actually a program that consists solely of
a local variable structure whose defining procedure is a an algebraic
expression. The syntax is:
name^ name2
name„ 'expression
29-18 Programming the HP 48
Vista de página 423
1 2 ... 419 420 421 422 423 424 425 426 427 428 429 ... 611 612

Comentários a estes Manuais

Sem comentários