Introduction

Language Structure

IB Statements

File System

Comet 32 Runtime

Index

(Get Session ID)

Mnemonic: (Get Session ID)
Discussion: The (GetSessionID) mnemonic returns the 32 byte ClientID and 5 byte SessionInstance (<= 99,999).
History: This mnemonic was added in REL Version 02.04 and Comet Build 312.
Example:
If (Num(Sub(Version$, 5, 3), Err) LT 312) Then_
  Return    ! Error; not supported

! New COSW Version check (Comet 309)
Work$ = Sts(0)
CoswMajVer = Asc(Sub(Work$, 17, 1))
CoswMinVer = Asc(Sub(Work$, 18, 1))

If (CoswMinVer < 24)
  Return    ! Error; not supported

Print (GetSessionID)
Input SessionID$        ! Length 37

! Uniquely identifies computer (Never changes)
ClientID$ = Sub(SessionID$, 1, 32)

! Uniquely identifies COSW session
! (Incremented each time COSW is started)
SessInstance = Num(Sub(SessionID$, 33, 5), Err)