@CreateTask
Syntax
@CreateTask(TEXTGLOBALFUNCTIONNAME[;PARAMETER1;PARAMETER2;...;PARAMETERN]);
@CreateTask(TEXTLISTGLOBALFUNCTIONNAME[;PARAMETER1;PARAMETER2;...;PARAMETERN]);
Description
Creates a new Engine task the the GLOBAL function named TEXT/TEXTLIST TEXTGLOBALFUNCTIONNAME/TEXTLISTGLOBALFUNCTIONNAME executes.
If @CreateTask with a TEXTLIST is called as the first parameter, the first element must contain the name of the GLOBAL function to be executed, and an alternative name for the new Engine task can optionally be specified in the second element.
The default name for the new Engine task is the name of the called GLOBALen Funktion.
On success, a FLOATLIST with 2 elements is returned; otherwise @ERROR.
The FLOATLIST contains the OS thread ID in the first element and the Engine task ID in the second element.
Example: @CreateTask(TEXTGLOBALFUNCTIONNAME[;PARAMETER1;PARAMETER2;…;PARAMETERN]);
TEXTGLOBALFUNCTIONNAME:="TestFunktion[GLOBAL]";
TESTTEXT:="Einfach ein Text zum Ausgeben";
REPEAT:=100;
Ret:=@CreateTask(TEXTGLOBALFUNCTIONNAME;TESTTEXT;REPEAT);
@LogReport(Ret);
DELFN:TestFunktion[GLOBAL]();
DEFFN:TestFunktion[GLOBAL](StringOut;Repeat)
{
n1:=1;
WHILE(n1<=Repeat)
{
@LogReport(StringOut);
@Increment(n1);
}
}
A new task is started that outputs 100 the text "Einfach ein Text zum Ausgeben" im APILog.
The new task is named "TestFunktion[GLOBAL]".
Example: @CreateTask(TEXTLISTGLOBALFUNCTIONNAME[;PARAMETER1;PARAMETER2;…;PARAMETERN]);
TEXTLISTGLOBALFUNCTIONNAME:="TestFunktion[GLOBAL]":"Alternativer Task Name";
TESTTEXT:="Einfach ein Text zum Ausgeben";
REPEAT:=100;
Ret:=@CreateTask(TEXTLISTGLOBALFUNCTIONNAME;TESTTEXT;REPEAT);
@LogReport(Ret);
DELFN:TestFunktion[GLOBAL]();
DEFFN:TestFunktion[GLOBAL](StringOut;Repeat)
{
n1:=1;
WHILE(n1<=Repeat)
{
@LogReport(StringOut);
@Increment(n1);
}
}
A new task is started that outputs 100 the text "Einfach ein Text zum Ausgeben" im APILog.
The new task is named "Alternativer Task Name".
Note : This text was machine-translated and may contain inaccuracies.
