TASK

Name

TASK -- 

Function

<nTaskID>   START(<vTask>, [<vPar1>,,, <vParN>]) 	
<vMsg>      TASKGETMSG() 	
<nTaskID>   TASKID() 	
<vMsg>      TASKPEEKMSG() 	
<lResult>   TASKSENDMSG(<nReceiverID>, <vMsg>[, <lWait>]) 	
NIL         TASKSTART() 	
NIL         TASKSTOP() 	

Description

Function START()

 START(<vTask>, [<vPar1>,,, <vParN>]) 	--> <nTaskID>

START() starts task in parallel mode and passes it some parameters <vPar1>,,, <vParN>.

Function TASKGETMSG()

 TASKGETMSG() 	--> <vMsg>

TASKGETMSG() gets message from task input queue and returns it. If no message available, waits forever.

Function TASKID()

 TASKID() 	--> <nTaskID>

TASKID() returns current task identifier <nTaskID> as numeric value.

Function TASKPEEKMSG()

 TASKPEEKMSG() 	--> <vMsg>

TASKPEEKMSG() gets message from task input queue and returns it. If no message available, immediatly returns NIL.

Function TASKSENDMSG()

 TASKSENDMSG(<nReceiverID>, <vMsg>[, <lWait>]) 	--> <lResult>

TASKSENDMSG() sends var <vMsg> to task with identifier <nReceiverID> and returns returns TRUE if operation successfully.

Function TASKSTART()

 TASKSTART() 	--> NIL

TASKSTART() resumes all tasks what was stopped of function TASKSTOP().

Function TASKSTOP()

 TASKSTOP() 	--> NIL

TASKSTOP() stopeds all tasks with the exclusion current task.