ExecScript Function | |
Enables you to run multiple lines of code from variables, tables, and other text at runtime.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION ExecScript(
cExpression,
eParameter1,
eParameter2,
eParameterN
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static Usual ExecScript(
Usual cExpression = default,
Usual eParameter1 = default,
Usual eParameter2 = default,
Usual eParameterN = default
)
Request Example
View SourceParameters
- cExpression (Optional)
- Type: Usual
Represents the text, a variable, type string, or memo to be executed as code.
- eParameter1 (Optional)
- Type: Usual
Optional. Specify parameters passed to a script that has a PARAMETERS or LPARAMETERS statement in first line.
- eParameter2 (Optional)
- Type: Usual
Optional. Specify parameters passed to a script that has a PARAMETERS or LPARAMETERS statement in first line.
- eParameterN (Optional)
- Type: Usual
Optional. Specify parameters passed to a script that has a PARAMETERS or LPARAMETERS statement in first line.
Return Value
Type:
Usual
The return value is the value returned by the script in cExpression. If the script returns no value, X# returns NIL.
Remarks
ExecScript(), allows you to execute a block of code without compiling first.
You can use all allowed statements inside the script and create objects,
set their properties, call the methods and call functions.
Examples 1?ExecScript("? 'Hello world from X# ExecScript'")
See Also