Difference between revisions of "MC-Basic:PROGRAMCONTEXT"
m (Miborich moved page Axystems:MC-Basic:PROGRAMCONTEXT to MC-Basic:PROGRAMCONTEXT: Global renaming of Axystems: namespace into (Main):) |
|
(No difference)
|
Revision as of 08:39, 22 May 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