VariableDefinition object
A class describing the characteristics of a variable, property, or
argument. VariableDefinition is used as a property in the ClassDefinition
and ScriptDefinition objects. It has no events.
You cannot start with a variable in your application and get a
VariableDefinition object for it. Instead, you access the
VariableDefinition instances that are elements of the VariableList array
of a ClassDefinition instance or the ArgumentList array of a
ScriptDefinition instance.
The VariableDefinition object has information about:
-
The variable’s name and type
-
Whether the variable is a scalar or an array and information
about the array -
The variable’s initial value, whether the value overrides an
ancestor’s value, and whether the variable is a constant -
The read and write access levels for the variable
-
The scope of the variable (global, shared, instance, local,
argument), including whether the variable is an argument and how the
argument is passed
Properties
|
VariableDefinition property |
Datatype |
Description |
|---|---|---|
|
CallingConvention |
ArgCallingConvention |
The way an argument is passed when Kind is ByReferenceArgument! ByValueArgument! ReadOnlyArgument! VarListArgument! VarListArgument! |
|
Cardinality |
VariableCardinalityDefinition |
Cardinality information for the |
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
|
InitialValue |
Any |
The initial value of the variable. Not valid when |
|
IsConstant |
Boolean |
Indicates whether the variable is a constant. Not |
|
IsControl |
Boolean |
Indicates whether the variable is a control defined |
|
IsUserDefined |
Boolean |
Indicates whether the variable is a user-defined Always true for local variables. True |
|
Kind |
VariableKind |
The scope of the variable. Values VariableGlobal! VariableShared! VariableInstance! VariableArgument! VariableLocal! Global |
|
Name |
String |
The name of the variable. |
|
OverridesAncestorValue |
Boolean |
Indicates whether the current initial value |
|
ReadAccess |
VarAccess |
The read access to the variable. Values Private! Public! Protected! System! Not |
|
TypeInfo |
TypeDefinition |
Type information for the variable. |
|
WriteAccess |
VarAccess |
The write access to the variable. Values Private! Public! Protected! System! Not |
Functions
|
VariableDefinition function |
Datatype returned |
Description |
|---|---|---|
|
String |
Returns the name assigned to the |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Object |
Returns the type of the object |