Introduction | Language Structure | IB Statements | File System | Comet 32 Runtime | Index |
| Syntax: | INTERRUPT partition [,EXCP=statement-label] |
| Discussion: |
The INTERRUPT statement forces the named partition to branch to
the MESSAGESUB path in the program.
When INTERRUPT is executed, the contents of the system variable named MESSAGE$ for the interrupting partition is passed to MESSAGE$ in the interrupted partition. If the partition to be interrupted does not have a MESSAGESUB path set, an exception 70 is returned to the interrupting partition. INTERRUPT works for both background and foreground partitions. Application note: Because INTERRUPT passes the contents of MESSAGE$, true inter-partition communications can occur under Comet. The INTERRUPT statement can be used in conjunction with PAUSE and WAKEUP to dynamically control the system job stream. |
| Example 1: |
INTERRUPT "P01",EXCP=2000In this example, the partition named "P01" is interrupted and forced to branch to the MESSAGESUB address (if it contains one). The value of the system variable MESSAGE$ is passed from the current partition to the interrupted partition. |
| Example 2: |
INTERRUPT P$, EXCP=2000In this example, the partition name is specified with a string variable. For this statement to function correctly, the variable will have to contain a valid partition name -- one that is to be interrupted. |