TatVariableInfo Class
Holds information about a variable declared in the script.
Remarks
Not only local and global variables, but also routine input parameters and function result values have an associated TatVariableInfo object.
Syntax
Unit: atScript
TatVariableInfo = class(TCollectionItem);
Methods
| Name | Description |
|---|---|
| Internal | Indicates if the variable is an internal variable, like for-loops variable. Ignore variables that are declared as internal. |
| SameDeclaration | Returns True if this variable has the same declaration as AVariable. |
| ScriptInfo | Provides a reference to the TatScriptInfo object that holds information about this variable. |
| SetTypeFromString | Used by compiler. Do not use this function. |
| VarIndex | Returns the position of the variable in the execution stack, relative to the current stack base. |
Properties
| Name | Description |
|---|---|
| ArgIndex | Returns the zero-based position of the variable in the input parameter list, or -1 if it is not an input parameter. |
| DeclarationSourcePos | Contains the position in the source code where the variable was declared. |
| DeclaredClass | Retrieves the TatClass object associated with the declared type of variable. If the variable type is not a class, DeclaredClass will contain nil. |
| DeclaredClassName | Retrieves the name of the declared variable class. If the variable type is not a class type, but a scalar type (string, integer, etc.), DeclaredClassName value will be an empty string. |
| Global | Indicates if the variable is a global variable or not. |
| Modifier | If it is an input parameter, Modifier will hold the modifier used in routine declaration ("var", "const", none, etc.). |
| SystemType | For internal use only. SystemType contains the TVarType value of the declared variable. This value is extracted and calculated by the compiler based on the value of TypeDecl property. |
| TypeDecl | Contains the textual name of the declared type of the variable. |
| Value | Gets or sets the effective runtime value of this variable. |
| VarName | Holds the name of the declared variable. |
| Visibility | Indicates the visibility of the variable (private or public). |