System Variables

From CometWiki

(Difference between revisions)
Jump to: navigation, search
 
(One intermediate revision not shown)
Line 2: Line 2:
   
   
Comet includes a number of system variables that may be used in an Internet Basic program without being defined in the Data Division.<br> Take care to not define your own variables with any of the following names:
Comet includes a number of system variables that may be used in an Internet Basic program without being defined in the Data Division.<br> Take care to not define your own variables with any of the following names:
 +
 +
{| Border=1
 +
|-
 +
|Variable 
 +
|Length 
 +
|Format 
 +
|Description
 +
|- 
 +
|[[CURPOS$]] 
 +
|2 
 +
|hex-encoded 
 +
|current position of cursor
 +
byte 1 = row
 +
byte 2 = column 
 +
|-
 +
|[[DATE]] 
 +
|6.0 
 +
|MMDDYY 
 +
|system date 
 +
|-
 +
|[[DATE$]] 
 +
|6 
 +
|"MMDDYY" 
 +
system date 
 +
|-
 +
|[[DAY$]] 
 +
|8 
 +
|"MM/DD/YY" 
 +
|system date 
 +
|-
 +
|[[ENTERLEVEL]] 
 +
|2.0 
 +
|nn 
 +
|subprogram level number 
 +
|-
 +
|[[EXCP]] 
 +
|2.0 
 +
|nn 
 +
|last Comet exception 
 +
|-
 +
|[[HELPKEY$]] 
 +
|4 
 +
|user-defined 
 +
|user-defined value for Comet Help System 
 +
|-
 +
|[[ITERM$]] 
 +
|3 
 +
|"Tnn" or "nnn" 
 +
|initiating terminal number 
 +
|-
 +
|[[LONGYEAR]] 
 +
|4.0 
 +
|YYYY 
 +
|current year in long format 
 +
|-
 +
|[[LONGYEAR$]] 
 +
|4 
 +
|"YYYY" 
 +
|current year in long format 
 +
|-
 +
|[[MESSAGE$]] 
 +
|32 
 +
|user-defined 
 +
|user-defined string for passing messages to overlays 
 +
|-
 +
|[[PARTITION$]] 
 +
|3 
 +
|"Pnn" or "nnn" 
 +
|current partition number 
 +
|-
 +
|[[PRIORITY$]] 
 +
|1 
 +
|hex 
 +
|partition scheduling priority 
 +
|-
 +
|[[RUNSTATE]] 
 +
|1.0 
 +
|n 
 +
|security value for current partition 
 +
|-
 +
|[[SYSPART$]] 
 +
|3 
 +
|"Pnn" or "nnn" 
 +
|name of most recently activated background partition 
 +
|-
 +
|[[TERM$]] 
 +
|3 
 +
|"Tnn" or "nnn" 
 +
|current terminal number 
 +
|-
 +
|[[TIME$]] 
 +
|11 
 +
|"HH:MM:SS.DD" 
 +
|system time 
 +
|-
 +
|[[VERSION$ ]]
 +
|7 
 +
|"XXX.XXX" 
 +
|current Comet system version number 
 +
|-
 +
|}

Latest revision as of 04:17, 1 June 2009

Comet System Variables

Comet includes a number of system variables that may be used in an Internet Basic program without being defined in the Data Division.
Take care to not define your own variables with any of the following names:

Variable Length Format Description
CURPOS$ 2 hex-encoded current position of cursor

byte 1 = row byte 2 = column

DATE 6.0 MMDDYY system date
DATE$ 6 "MMDDYY"

system date

DAY$ 8 "MM/DD/YY" system date
ENTERLEVEL 2.0 nn subprogram level number
EXCP 2.0 nn last Comet exception
HELPKEY$ 4 user-defined user-defined value for Comet Help System
ITERM$ 3 "Tnn" or "nnn" initiating terminal number
LONGYEAR 4.0 YYYY current year in long format
LONGYEAR$ 4 "YYYY" current year in long format
MESSAGE$ 32 user-defined user-defined string for passing messages to overlays
PARTITION$ 3 "Pnn" or "nnn" current partition number
PRIORITY$ 1 hex partition scheduling priority
RUNSTATE 1.0 n security value for current partition
SYSPART$ 3 "Pnn" or "nnn" name of most recently activated background partition
TERM$ 3 "Tnn" or "nnn" current terminal number
TIME$ 11 "HH:MM:SS.DD" system time
VERSION$ 7 "XXX.XXX" current Comet system version number
Personal tools