Difference between revisions of "MC-Basic:task.STATUS"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with '{{MC-Basic |SHORT FORM= |SYNTAX= ?''<task>''.Status |AVAILABILITY= All versions |DESCRIPTION= This query returns the status of a task that is loaded in memory. The informatio…')
 
m (in construction)
 
(13 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
{{Languages|MC-Basic:task.STATUS}}
 
{{MC-Basic
 
{{MC-Basic
 
|SHORT FORM=
 
|SHORT FORM=
Line 4: Line 5:
  
 
|SYNTAX=
 
|SYNTAX=
?''<task>''.Status
+
?<''task''>.Status
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Line 12: Line 13:
 
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:
  
State ''<state>'': ''<description>'' Error ''<last error number>'' Source ''<line of source code>''
+
State ''<state>'': ''<description>'' Error ''<last error number>'' Source ''<line of source code>''<br>
 
+
<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>
 
where ''<state>'' is one of the following:<br>
 
where ''<state>'' is one of the following:<br>
  
Line 21: Line 24:
  
 
4: Stopped due to run-time error<br>
 
4: Stopped due to run-time error<br>
 +
 +
5: Terminated .
 +
'' It can be seen momentary that state at:
 +
'' 1. Terminate program
 +
'' 2. Unload
 +
  
 
7: Ready (after LOAD)
 
7: Ready (after LOAD)
Line 32: Line 41:
  
 
|RANGE=
 
|RANGE=
Returned value: 1, 2, 4, 7, 9, 10
+
Returned value: 1, 2, 4, 5, 7, 9, 10
  
 
|UNITS=
 
|UNITS=
Line 50: Line 59:
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[Axystems:MC-Basic:task.STATE|task.STATE]]
+
* [[MC-Basic:TaskStatus|TaskStatus]]
 
+
* [[MC-Basic:task.STATE|task.STATE]]
 +
* [[MC-Basic:element.ELEMENTSTATUS| ELEMENTSTATUS]]
  
 +
[[Category:MC-Basic:Task Control|task.STATUS]]
 
}}
 
}}

Latest revision as of 12:37, 13 August 2019

Language: English  • 中文(简体)‎

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

?<task>.Status

Availability

All versions

Type

String

Range

Returned value: 1, 2, 4, 5, 7, 9, 10

Scope

Terminal

Limitations

Task must be loaded in memory

Examples

?MyTask.prg.Status

See Also