Class TCasScriptProgram

Unit

Declaration

type TCasScriptProgram = class(TObject)

Description

This item has no description.

Source: src/castlescript/castlescript.pas (line 883).

Hierarchy

  • TObject
  • TCasScriptProgram

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public procedure ExecuteFunction(const FunctionName: string; const Parameters: array of TCasScriptValue; const IgnoreMissingFunction: boolean = false);

Properties

Public property Functions: TCasScriptUserFunctionList read FFunctions;
Public property Environment: TCasScriptEnvironment read FEnvironment write FEnvironment;

Description

Methods

Public constructor Create;

This item has no description.

Source: src/castlescript/castlescript.pas (line 888).

Public destructor Destroy; override;

This item has no description.

Source: src/castlescript/castlescript.pas (line 889).

Public 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.

Source: src/castlescript/castlescript.pas (line 912).

Properties

Public property Functions: TCasScriptUserFunctionList read FFunctions;

This item has no description.

Source: src/castlescript/castlescript.pas (line 891).

Public 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.

Source: src/castlescript/castlescript.pas (line 922).


Generated by PasDoc 0.17.0.snapshot.