TASK real-valued function TASK real-valued function Syntax TASK ( select, task_num ) Function Return information about a program execution task. Parameters select Optional real-valued expression that has a value of 0, 1, or 2 and selects the category of task information returned (see below). The value 0 is assumed if the parameter is omitted. task_num Optional integer value that specifies which system program task is to be accessed (see below). Details This function returns various information about the system program execution tasks. (See the eV+ Language User's Guide for an explanation of execution tasks.) The select parameter determines the type of information that is returned as follows:
select = 0 Task number: The function returns the number of the task executing the current program. select = 1 Task run state: Returns the run state for the task specified by the task_num parameter. The value returned should be interpreted as follows: eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 524 Value Interpretation -1 Invalid task number. 0 Idle. 1 Stopped due to program completion. 2 Stopped due to program execution error (for example, undefined value).