![HP 50G User Manual Download Page 651](http://html.mh-extra.com/html/hp/50g/50g_user-manual_156571651.webp)
Page 21-4
Global Variable Scope
Any variable that you define in the HOME directory or any other directory or
sub-directory will be considered a
global variable
from the point of view of
program development. However, the
scope
of such variable, i.e.,
the location
in the directory tree where the variable is accessible
, will depend on the
location of the variable within the tree (see Chapter 2).
The rule to determine a variable’s scope is the following
: a global variable is
accessible to the directory where it is defined and to any sub-directory attached
to that directory, unless a variable with the same name exists in the sub-
directory under consideration
. Consequences of this rule are the following:
Θ
A global variable defined in the HOME directory will be accessible from
any directory within HOME, unless redefined within a directory or sub-
directory.
Θ
If you re-define the variable within a directory or sub-directory this
definition takes precedence over any other definition in directories above
the current one.
Θ
When running a program that references a given global variable, the
program will use the value of the global variable in the directory from
which the program is invoked. If no variable with that name exist in the
invoking directory, the program will search the directories above the current
one, up to the HOME directory, and use the value corresponding to the
variable name under consideration in the closest directory above the
current one.
A program defined in a given directory can be accessed from that directory or
any of its sub-directories.
«
→
x
«
x SINH 1 x SQ ADD /
» »
.
When done editing the program press
`
. The modified program is stored
back into variable
@@g@@
.
Summary of Contents for 50G
Page 1: ...HP g graphing calculator user s guide H Edition 1 HP part number F2229AA 90006 ...
Page 130: ...Page 2 70 The CMDS CoMmanDS menu activated within the Equation Writer i e O L CMDS ...
Page 206: ...Page 5 29 LIN LNCOLLECT POWEREXPAND SIMPLIFY ...
Page 257: ...Page 7 20 ...
Page 383: ...Page 11 56 Function KER Function MKISOM ...
Page 715: ...Page 21 68 Whereas using RPL there is no problem when loading this program in algebraic mode ...
Page 858: ...Page L 5 ...