Castle Game Engine: CastleScript: Class TCasScriptProgram

# Class TCasScriptProgram
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleScript ## Declaration `type TCasScriptProgram = class(TObject)` ## Description ## Hierarchy TObject TCasScriptProgram ## Overview ### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `procedure ExecuteFunction(const FunctionName: string; const Parameters: array of TCasScriptValue; const IgnoreMissingFunction: boolean = false);`
### Properties
| `property Functions: TCasScriptUserFunctionList read FFunctions;`
| `property Environment: TCasScriptEnvironment read FEnvironment write FEnvironment;`
## Description ### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `procedure ExecuteFunction(const FunctionName: string; const Parameters: array of TCasScriptValue; const IgnoreMissingFunction: boolean = false);`
Execute a user-defined function (from Functions list of this program). Looks for given FunctionName. IgnoreMissingFunction says what to do in case of missing function: if true, it will be simply ignored (`ExecuteFunction` will silently do nothng). If false (default) then we will raise exception ECasScriptMissingFunction. Sets function parameters to given values (number of parameters must match, otherwise ECasScriptError). Values from your parameters are set as our parameters TCasScriptParameterValue.SourceValue, so script can read and write your values. Finally executes function body.
### Properties
| `property Functions: TCasScriptUserFunctionList read FFunctions;`
| `property Environment: TCasScriptEnvironment read FEnvironment write FEnvironment;`
Environment (outside information) for this program. This will be created and is owned by this TCasScriptProgram instance. You should take care to copy this reference to all expressions within this program (for example ParseProgram does this), this way all expressions share the same Environment instance.
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:13