Introduction

Language Structure

IB Statements

File System

Comet 32 Runtime

Index

(Switch Session)

Mnemonic: (Switch Session=numeric-argument)
Hex equivalent: "@0E0Cxx@"

where:
xx = session (hex)

Discussion: This mnemonic switches to another avtive Comet session. The numeric-argument (a constant or variable) determines what action will be taken, based on the following values:
Value   Action
==============================
0       switch to next session
1       switch to session 1
2       switch to session 2
3       switch to session 3
4       switch to session 4
5       switch to session 5
6       switch to session 6
7       switch to session 7
8       switch to session 8
Use the following statement to determine the session number associated with the partition where your program is running (PARTITION$):
SessionNum = ASC(SUB(PSTAT(PARTITION$), 60, 1))
Session numbers are base 1 (1 added) for foreground partitions. If PSTAT returns a session number of 0, it is a background partition. Otherwise the actual session number is SessionNum-1.
Example:
a. 100 FORMAT (Switch Session=0)
   .
   PRINT (0,100)                 ! switch to next Comet session

b. PRINT (0) (Switch Session=0)  ! switch to next Comet session