|
OCGetParamCount(p_EventId;p_ParamN)
Used to retrieve the number of parameters of the current event.
"p_EventId" is the event id and "p_ParamN""p_4DVar" is the 4D variable that will receive the number of the parameters.
The event id is sent as a parameter to the 4D method that handles the event.
The "p_4DVar" variable must be a process or interprocess of type Longint, and already declared.
Parameters
| Parameter |
Type |
|
Description |
| p_EventId |
String |
-> |
Event identifier.
This value is given as a first parameter to the 4D event handling method.
|
| p_ParamN |
Longint |
<- |
Number of the parameter which value you want to retrieve, starting from 0. |
Return Values
0 – The method call was successful.
If the method call was not successful the
return value is not zero. For more information call OCLastError.
Example
C_Longint(LongVar)
$i:=OCGetParamCount($1;LongVar)
is equivalent to the following sequence of code:
C_Longint(LongVar)
$i:=OCRunScript ("ExampleHost";"longVariable = SHost.ParamCount("+$1+")")
$i:=OCRunScript ("ExampleHost";"SHost.SetLong "+Char(34)+"LongVar"+Char(34)+", longVariable")
,which assigns to the "LongVar" 4D variable the number of the event parameters.
The "ExampleHost" script host must be already created.
|