|
![]() |
![]() |
version 2003
PA_ExecuteMethod (toExecute; len)
Parameter | Type | Description | |
toExecute | char * | → | Text of the statement to execute |
len | long | → | Length of toExecute |
Description
The routine
PA_ExecuteMethod
executes the expression
toExecute
, given its length in
len
.
This works exactly like the 4th Dimension command
EXECUTE
. See the 4th Dimension Language Reference manual (one line of code, etc.).
Any valid expression can be executed, provided that it is a command (4D command, project method, statement). For statements that return a result, use
PA_ExecuteFunction
.
Examples of 4D statements
1. This line of code is a valid statement, calling a valid 4D command, passing a valid parameter :
ALERT ("I've been called from an Extension")
2. The line of code below is a valid 4D statement as well:
` This will call the 4D project Method provided that it exists
TheProjectMethod (1;"abc")
3. The line of code below is not a valid 4D statement:
TheProjectMethod (1,"abc")
The line contains a syntax error: a comma instead of a semi-colon. In this case, the 4D syntax error code will be returned by
PA_GetLastError
.
When to use
PA_ExecuteMethod