Difference between revisions of "MC-Basic:PROGRAMCONTEXT"
m (1 revision) |
|||
Line 67: | Line 67: | ||
* [[Axystems:MC-Basic:PROGRAMNAME|PROGRAMNAME]] | * [[Axystems:MC-Basic:PROGRAMNAME|PROGRAMNAME]] | ||
− | + | [[Category:Axystems:MC-Basic:Task Control|PROGRAMCONTEXT]] | |
}} | }} |
Revision as of 13:34, 11 March 2014
This query returns a Long value, indicating the context of the querying task. ProgramContext can only be used for the querying task, and cannot refer to another task
1: Terminal
2: Configuration file
3: User task block (with “PRG” extension)
4: Event block
5: Event condition 6: OnSystemError block 7: OnError block 8: Recorder
Syntax
?PROGRAMCONTEXT
Availability
Version 3.3 and above.
Type
Long
Range
1 to 8
Scope
Configuration, Task or Terminal
Limitations
Read Only.
Examples
From Terminal:
-->?ProgramContext ‘ Should return 1
Or within Task1.prg :
Program
? ProgramContext ‘ Should return 3
Onevent Event1 ProgramContext = 5
? ProgramContext ‘ Should return 4
End Onevent
Eventon Event1
End Program