EasyManuals Logo

HP 50G User Manual

HP 50G
887 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 #651 background imageLoading...
Page #651 background image
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@@.

Table of Contents

Other manuals for HP 50G

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 50G and is the answer not in the manual?

HP 50G Specifications

General IconGeneral
Digits33 digits
Battery typeCR2032
TypeScientific
Form factorPocket
Weight and Dimensions IconWeight and Dimensions
Weight220 g
Dimensions (WxDxH)87 x 184 x 23.5 mm

Related product manuals