Difference between revisions of "MC-Basic:PROGRAMCONTEXT"

From SoftMC-Wiki
Jump to: navigation, search
m (Miborich moved page Axystems:MC-Basic:PROGRAMCONTEXT to MC-Basic:PROGRAMCONTEXT: Global renaming of Axystems: namespace into (Main):)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{Languages|MC-Basic:PROGRAMCONTEXT}}
 
{{MC-Basic
 
{{MC-Basic
 
|SHORT FORM=
 
|SHORT FORM=
Line 64: Line 65:
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[Axystems:MC-Basic:PROGRAM ... END PROGRAM|PROGRAM ... END PROGRAM]]
+
* [[MC-Basic:PROGRAM ... END PROGRAM|PROGRAM ... END PROGRAM]]
* [[Axystems:MC-Basic:PROGRAMNAME|PROGRAMNAME]]
+
* [[MC-Basic:PROGRAMNAME|PROGRAMNAME]]
  
[[Category:Axystems:MC-Basic:Task Control|PROGRAMCONTEXT]]
+
[[Category:MC-Basic:Task Control|PROGRAMCONTEXT]]
 
}}
 
}}

Latest revision as of 08:25, 10 April 2017

Language: English  • 中文(简体)‎

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

See Also