Difference between revisions of "MC-Basic:TaskStatus"
m (in construction) |
m (in construction) |
||
Line 11: | Line 11: | ||
|DESCRIPTION= | |DESCRIPTION= | ||
+ | This property is Similar to 'task.STATUS' but the difference is that the task name is referred to as a string, therefor could be manipulated for any need.<br> | ||
This query returns the status of a task that is loaded in memory. The information returned will be in the following format: | This query returns the status of a task that is loaded in memory. The information returned will be in the following format: | ||
Line 17: | Line 18: | ||
From 0.4.15.4 returns "Main program" line number, which represents the first frame in the function call stack<br> | From 0.4.15.4 returns "Main program" line number, which represents the first frame in the function call stack<br> | ||
State ''<state>'': ''<description>'' Error ''<last error number>'' Source ''<line of source code>'' Main program ''<line of source code>''<br> | State ''<state>'': ''<description>'' Error ''<last error number>'' Source ''<line of source code>'' Main program ''<line of source code>''<br> | ||
− | + | ||
where ''<state>'' is one of the following:<br> | where ''<state>'' is one of the following:<br> | ||
Latest revision as of 12:32, 13 August 2019
Language: | English |
---|
This property is Similar to 'task.STATUS' but the difference is that the task name is referred to as a string, therefor could be manipulated for any need.
This query returns the status of a task that is loaded in memory. The information returned will be in the following format:
State <state>: <description> Error <last error number> Source <line of source code>
From 0.4.15.4 returns "Main program" line number, which represents the first frame in the function call stack
State <state>: <description> Error <last error number> Source <line of source code> Main program <line of source code>
where <state> is one of the following:
1: Running
2: Stopped (due to IDLETASK)
4: Stopped due to run-time error
5: Terminated.
- It can be seen momentary that state at:
- 1. Terminate program
- 2. Unload
7: Ready (after LOAD)
9: Task Kill Start .
10: Killed (after KILLTASK or END PROGRAM)
Syntax
- ?TaskStatus("<Task Name>.<File Type>")
Availability
- 0.4.20.1 and newer
Type
- String
Range
- Returned value: 1, 2, 4, 5, 7, 9, 10
Scope
- Read/Write, Configuration, Task, Terminal
Limitations
- The task must be loaded in memory.
- task name and type (PRG/UPG) defined as a type of string.
Examples
Dim Shared MyTask as string = "<TaskName.PRG>"
- ?TaskStatus(MyTask)