20060301
1-7-11
Variables and Folders
Rule
s
Governing Variable Acce
ss
Normally, you access a variable by specifying its variable name. The rules in this section
apply when you need to reference a variable that is not located in the current folder or to
access a variable that has the same name as one or more variables located in other folders.
I
Variable Search Priority Sequence
Specifying a variable name to access a variable, searches variables in the following
sequence.
(1)
Local
Variables
(2) Current Folder Variables
(3) “library” Folder Variables
• Multiple variables with the same name can exist simultaneously as a local variable, as
a variable in the current folder, and as a variable in the “library” folder. In this case, the
ClassPad searches folders according to the sequence shown above and accesses the first
instance of the variable that it finds. If you want to access such a variable when it occurs
lower in the above priority sequence, you need to specify the folder name along with the
variable name as shown in “Specifying a Variable in a Particular Folder” below.
• If a variable you specify cannot be found, it is treated as an “undefined variable”.
• Note that the “system” folder is not included in the above variable search. When accessing
a variable in the system folder, you need to specify the variable name only, without
specifying the folder name.
Tip
• Local variables exist only as long as the program or user-defined function for which it was created
in being executed.
• When a variable search is required during a subroutine called by a program or user-defined
function, the local variable search range includes only the local variables of the subroutine
currently being executed.
• For information about programs and user-defined functions, see Chapter 12.
• Only local variables and current folder variables are searched in the case of an operation that
stores variable data or a command that performs an operation on a variable (like “DelVar”).
Normally, “library” folder variables are not searched. If you want to include “library” folders in the
search, you need to specify the “library” folder as the variable location as explained below.
I
Specifying a Variable in a Particular Folder
You can access a variable located inside the “main” folder, “library” folder, or a particular
user folder by specifying the folder name along with the variable name. Use the following
syntax when specifying a folder name:
<folder name>\<variable name>
Example:
To specify variable “abc” located in the “main” folder
main\abc
Summary of Contents for ClassPad 330
Page 11: ...20060301 20090601 ClassPad 330 ClassPad OS Version 3 04 ...
Page 277: ...20060301 3 3 10 Storing Functions 3 Tap AND Plot OR Plot ...
Page 779: ...20090601 S Graph Line Clustered C S Graph Line Stacked E 13 9 2 Graphing ...
Page 780: ...20090601 S Graph Line 100 Stacked F S Graph Column Clustered G 13 9 3 Graphing ...
Page 781: ...20090601 S Graph Column Stacked I S Graph Column 100 Stacked J 13 9 4 Graphing ...
Page 782: ...20090601 S Graph Bar Clustered K S Graph Bar Stacked 9 13 9 5 Graphing ...