TatScriptInfo Class
Provides information about a compiled script, including its declared routines and global variables.
Remarks
Information is populated when the script is compiled via Compile or SilentCompile.
Routines are available through the Routines property and global variables through Globals.
Syntax
Unit: atScript
TatScriptInfo = class(TComponent);
Methods
| Name | Description |
|---|---|
| Clear | Erases all available information. To populate the information again, you will need to recompile the script. Note that calling Clear method does not set the TatScript.Compiled flag to false. |
| DeclareRoutine | Adds a new routine to the script info Routines collection. Do not call this method directly; it is used internally by the compiler. |
| RoutineByName | Retrieves the TatRoutineInfo object associated with the script routine specified by AName. If the routine doesn't exist in the script, RoutineByName returns nil. |
Properties
| Name | Description |
|---|---|
| Behavior | Indicates how the current script behaves, based on the TatScriptBehavior type. |
| CodeSize | Retrieves the number of p-code instructions generated after compilation -- the size of the compiled "executable". |
| FormResource | Holds the DFM resource content for a form script, loaded during compilation. |
| Globals | Provides access to the TatVariablesInfo collection which holds information about all global variables declared in the script. |
| IsClass | Indicates whether the current script is a class script. |
| IsForm | IsForm property indicates if the current script is a regular script (IsForm is false) or a form script (IsForm is true). A script is a form script when it contains the $FORM directive. |
| MainRoutine | Retrieves the TatRoutineInfo object associated with the script main block, which is treated similarly to any other routine in the script. |
| MainRoutineName | Used only for streaming (saving of compiled code) purposes. Do not use this property. |
| Routines | Provides access to the TatRoutinesInfo collection which holds information about all routines declared in the script. |
| Script | Provides access to the TatScript object that owns this script info. |
| ScriptClassName | Holds the class name used when the script is a form or class script. |
| UnitName | The unit name used when this script is registered as a script-based library. |