Difference between revisions of "MC-Basic:PROGRAMCONTEXT"

From SoftMC-Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 +
{{Languages|MC-Basic:PROGRAMCONTEXT}}
 
{{MC-Basic
 
{{MC-Basic
 
|SHORT FORM=
 
|SHORT FORM=

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