BTRON MicroScript Reference Manual

System Variables


I Reference Section

$CNT
Syntax
Function
_____This is an integer value that shows the number of repetitions of the REPEAT statement. Normally, it becomes a value of up to 0`number of repetitions -1. Referencing and setting are both possible; they possess meaning only inside a REPEAT loop. When you have referenced outside the REPEAT loop, the value always becomes 0.
_____It is possible to forcibly change the number of repetitions by carrying out the setting of a value inside the REPEAT loop.
_____
_

Setting
Referencing
(Initial Value)
Byte

Yes
_
Character

Yes
_
Integer

Yes

Yes (0)

Floating point number

Yes
_
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.

167

_____
$DATE
Syntax
Function
_____This is an integer value that shows the present date. Only referencing is possible; a setting cannot be made. Values become the below calculation values.
_____
Year (AD - 1900) x 10000 + month (1`12) x 100 + day (1`31)
_____
_____For example, April 23, 1997 becomes the integer 970423.
_____The present time can be obtained with $TIME.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
168

I Reference Section

$DSKINS
Syntax
Function
_____This is an integer value that shows the yes/no state of automatic connection at the time disk insertion.
_____With 0, it becomes without automatic connection, and with 1, it becomes with automatic connection. The initial value is 1 (with automatic connection). In the case of with automatic connection, when you insert a PC Card or a floppy disk when the MicroScript window is active, it automatically becomes possible to use it. In a case of without automatic connection, the insertion of a PC Card or floppy disk will be ignored.
_____
_

Setting
Referencing
(Initial Value)
Byte

Yes
_
Character

Yes
_
Integer

Yes

Yes (1)

Floating point number

Yes
_
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.

169

_____
$ERR
Syntax
Function
_____This is an integer value that shows the error state of the immediately preceding statement. Only referencing is possible; a setting cannot be made.
_____The meanings of the values are as follows:
_____

0 :

Normal

1 :

Timeout

2 :

Break

16 :

Device operation error

17 :

Device operation parameter error

32 :

File operation error

33 :

File operation parameter error

48 :

Process operation error

208 :

RS-232C operation error (port number is illegal)

209 :

RS-232C operation error (initialization parameter is illegal)

210 :

RS-232C operation error (being used by something else [busy])

211 :

RS-232C operation error (initialization error)

212 :

RS-232C operation error (transmission error)
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes (0)

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
170

I Reference Section

$GV
Syntax
Function
_____This is an integer-type array variable, which is shared throughout the system. A value that a certain program has set can be referenced from other programs. At the time of system startup, everything is initialized to 0, and the contents of changes are retained until the system is restarted.
_____What can be set are integer values only, and even if a floating point numerical value is set, it will be rounded to an integer. Also, the size of an array is 50, and it cannot be modified. Because it will be shared by multiple programs, please be careful and use it in a manner that there will be no interference among programs. Because you cannot prevent interference among multiple microscripts even if you carry out successive execution by means of ' ; ', please be careful.
_____
_

Setting
Referencing
(Initial Value)
Byte

Yes
_
Character

Yes
_
Integer

Yes

Yes (0)

Floating point number

Yes
_
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You are trying to declare $GV in VARIABLE or LOCAL .
Errors that Occur During Execution (only in the case of DEBUG 1; refer to p. 39)
There was an array reference in an illegal index
An index that exceeded the range of $GV[0]`$GV[49] has been specified. Please confirm whether the index has been kept within 0`49.
Errors Where an Illegal Value Is Returned
Case of an index outside the range
Please confirm whether the index has been kept within 0`49.

171

_____
$KEY
Syntax
Function
_____This is a character-type value that shows the character code at the time the user last pressed a key. Only referencing is possible; a setting cannot be made.
_____The correct value can be referenced only when it is first used after a key has been pressed. With references from the second time, the value becomes 0. When the window is not in the forefront (active), the value always becomes 0.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _

Yes

Integer _ _
Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
172

I Reference Section

$KMODE
Syntax
Function
_____This is an integer value that shows whether or not the user will fix an unfixed character string in a case where an event other than a key event has occurred in kana-to-kanji conversion input mode. Only referencing is possible; a setting cannot be made.
_____In a case where we fix, the value becomes 0, and in a case where we do not fix, the value becomes 1.
_____Normally, this is used as is with the initial value (0), but in a case of the type where, in processing started up with a PD press event, the user will carry out kana-to-kanji conversion after generating a key event with an EVENT statement, it is necessary to set the value to 1.
_____
_

Setting
Referencing
(Initial Value)
Byte

Yes
_
Character

Yes
_
Integer

Yes

Yes (0)

Floating point number

Yes
_
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.

173

_____
$KSTAT
Syntax
Function
_____This is an integer value that shows the meta key and PD states at the time the user last pressed a key. Only referencing is possible; a setting cannot be made.
_____The correct value can be referenced only when it is first used after a key has been pressed. With references from the second time, the value becomes 0. When the window is not in the forefront (active), the value always becomes 0.
_____As for the referenced values, the individual bits as follows show the key states.
_____
0x01 : PD main button ON
0x02 : PD menu button ON
0x04 : English-language input mode
0x08 : English capital letters (katakana) input mode
0x10 : Left shift key ON
0x20 : Right shift key ON
0x40 : (Left) Alt key ON
0x80 : (Left) Ctrl key ON
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
174

I Reference Section

$MMASK
Syntax
Function
_____This is an integer value that signifies a bit mask corresponding to a message type (0`7) for the purpose of specifying a message that is received with the MRECV statement. Referencing and setting are possible. The initial value is set as 0.
_____We use this after setting a value that takes the logical sum [OR] of the type(s) of the message we would like to receive.
__ __
0x01 : Corresponds to type 0 0x10 : Corresponds to type 4
0x02 : Corresponds to type 1 0x20 : Corresponds to type 5
0x04 : Corresponds to type 2 0x40 : Corresponds to type 6
0x08 : Corresponds to type 3 0x80 : Corresponds to type 7
_____
_____As to the messages of the types specified, up to the latest 16, as far as received, are saved. By specifying this variable, received messages of types that fall outside the target will be cleared.
_____
_

Setting
Referencing
(Initial Value)
Byte

Yes
_
Character

Yes
_
Integer

Yes

Yes (0)

Floating point number

Yes
_
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.

175

_____
$MSEC
Syntax
Function
_____This is an integer value that shows the current millisecond unit counter value. Only referencing is possible; a setting cannot be made.
_____Values are in the range of 0`0x7fffffff, and anything after 0x7fffffff returns to 0. Normally, we use the difference in the results of having referenced two times. Please pay attention to the fact that there is the possibility that the referenced value on the second time will become smaller than the referenced value on the first time.
_____For example, we when perform (this time $MSEC - previous time $MSEC) & 0x7fffffff, the elapsed time can be calculated.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
176

I Reference Section

$PDB
Syntax
Function
_____This is an integer value that shows the main button state of the PD. Only referencing is possible; a setting cannot be made.
_____0 means the OFF state, and 1 the ON state.
_____
_____In a case where we had made references (successive execution by punctuating $PDX, $PDY, $PDB with ' ; ', that the values are concurrent ones is guaranteed. In a case where they are not punctuated with ' ; ', there is the possibility that the values are not concurrent ones.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

177

_____
$PDS
Syntax
Function
_____This is an integer value that shows the PD shape. Referencing and setting are possible. The values -1`15 are valid.
_____Through the setting of a value, we can set the shape of the pointer inside the window work region.
_____Even though the shape will change due to something such as movement of the pointer to the outside of the window, if you once again move the pointer inside the window work region, the pointer shape returns to the set shape.
_____
_____The meanings of the values are as follows:
_____

-1 :

No display

0 :

Finger-for-selecting

1 :

Finger-for-selecting revisions

2 :

Hand-for-moving

3 :

Hand-for moving (vertical)

4 :

Hand-for-moving (horizontal)

5 :

Grip

6 :

Grip (vertical)

7 :

Grip (horizontal)

8 :

Hand-for-resizing

9 :

Hand-for-resizing (vertical) 10 : Hand-for-resizing (horizontal)

11 :

Pinch

12 :

Pinch (vertical)

13 :

Pinch (horizontal)

14 :

Cup

15 :

Pre-menu
_____
_____In the case of an input from a touch panel, it is made up so that normally PD shapes other than the cup are not displayed. This is a special state different from the no display of -1.
_____
_

Setting
Referencing
(Initial Value)
Byte

Yes
_
Character

Yes
_
Integer

Yes

Yes (0)

Floating point number

Yes
_
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
178

I Reference Section

$PDX
Syntax
Function
_____This is an integer value that shows the pointer's X coordinate value when the upper left of the window work area has been made (0, 0). Only referencing is possible; a setting cannot be made.
_____In the case of PD input from a touch panel, a pointer outside of the cup will not be displayed, and the cup also will always be displayed in the center of the screen; the pointer coordinate values show the location where the user last pressed the touch panel.
_____Please refer to $PDB and $PDY also.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

179

_____
$PDY
Syntax
Function
_____This is an integer value that shows the pointer's Y coordinate value when the upper left of the window work area has been made (0, 0). Only referencing is possible; a setting cannot be made.
_____In the case of PD input from a touch panel, a pointer outside of the cup will not be displayed, and the cup also will always be displayed in the center of the screen; the pointer coordinate values show the location where the user last pressed the touch panel.
_____Please refer to $PDB and $PDX also.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
180

I Reference Section

$PID
Syntax
Function
_____This is an integer value that shows a self process ID. Only referencing is possible; a setting cannot be made.
_____A process ID possesses a different value in each individual application and microscript. Moreover, it becomes a different value each time it starts up. We use it also in such things as the MSEND statement and the MRECV statement.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

181

_____
$PPID
Syntax
Function
_____This is an integer that shows the self parent process ID. Only referencing is possible; a setting cannot be made.
_____A process ID possesses a different value in each individual application and microscript. Moreover, it becomes a different value each time it starts up. We use it also in such things as the MSEND statement and the MRECV statement.
_____When the parent process terminates, the $PPID becomes the parent process ID of the process that terminated.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
182

I Reference Section

$RAND
Syntax
Function
_____This can reference a pseudorandom number in the range of 0`65535. Setting is not possible.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

183

_____
$RS
Syntax
Function
_____This is a value that is set through the execution of the RSGETN statement, and the data that are taken in are set as an array. This is a byte-type array variable with a maximum element number of 512.
_____Actually, valid data, become the individual elements of 0`$RSCNT -1. However, they are a maximum of 512 elements (0`511). Because there are cases where $RSCNT becomes a value that exceeds 512, please be careful. In a case where $RSCNT has exceeded 512, the latest 512 bytes of data are set in $RS[ ].
_____Please refer also to the RSGETN statement.
_____
_

Setting
Referencing
(Initial Value)
Byte Array _

_Yes

Character _ _
Integer _
Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
Errors that Occur During Execution (only in the case of DEBUG 1; refer to p. 39)
There was an array reference in an illegal index
An index that exceeds the range of 0`$RSCNT - 1 or 511 has been specified. Please confirm whether the index has been kept within the range.
Errors Where an Illegal Value Is Returned
Case of an index outside the range
Please confirm whether the index has been kept within the range.
184

I Reference Section

$RSCNT
Syntax
Function
_____This is an integer value that is set through the execution of the RSGETN statement. It shows the number of bytes of data that have been taken in.
_____Only referencing is possible; a setting cannot be made.
_____Please refer also to the RSGET, RSGETC, and RSGETN statements.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

185

_____
$SCRH
Syntax
Function
_____This is an integer value that shows the height (number of dots) of the entire screen. Only referencing is possible; a setting cannot be made.
_____Please refer also to $SCRW, $WDH, $WDW, $WDX, and $WDY.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
186

I Reference Section

$SCRW
Syntax
Function
_____This is an integer value that shows the width (number of dots) of the entire screen. Only referencing is possible; a setting cannot be made.
_____Please refer also to $SCRH, $WDH, $WDW, $WDX, and $WDY.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

187

_____
$SV
Syntax
Function
_____This is an integer-type array variable of 50 elements in number, which is saved even if the window is closed or even if the power is cut off.
_____Because it is saved for each virtual object that references a script real object, in a case where one script that is referenced with multiple virtual objects, it becomes a separate value depending on the virtual object that starts up.
_____Differing with $GV, it cannot be shared by multiple programs.
_____
_

Setting
Referencing
(Initial Value)
Byte

Yes
_
Character

Yes
_
Integer

Yes

Yes (0)

Floating point number

Yes
_
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
Errors that Occur During Execution (only in the case of DEBUG 1; refer to p. 39)
There was an array reference in an illegal index
An index that exceeded the range of $SV[0]`$SV[49] has been specified. Please confirm whether the index has been kept within 0`49.
Errors Where an Illegal Value Is Returned
Case of an index outside the range
Please confirm whether the index has been kept within 0`49.
188

I Reference Section

$SYSTM
Syntax
Function
_____This is an integer value that shows the system time. Only referencing is possible; a setting cannot be made.
_____The value is the number of seconds up to the present from January 1, 1985 0:00:00 GMT (1985/1/1 9:00:00 JST).
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

189

_____
$TID
Syntax
Function
_____This is an integer value that shows the self procedure number. Only referencing is possible; a setting cannot be made.
_____A procedure number is a unique number that is assigned at the time of execution of a procedure, and when we utilize this, we can distinguish individual threads, even in a case where we have started one thread in multiple.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
190

I Reference Section

$TIME
Syntax
Function
_____This is an integer value that shows the present date. Only referencing is possible; a setting cannot be made. Values become the below calculation values.
_____
Hour (0`23) x 10000 + minute (0`59) x 100 + second (0`59)
_____
_____For example, 14:44:27 becomes the integer 144427.
_____The present date can be obtained with $DATE.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

191

_____
$VERS
Syntax
Function
_____This is an integer value that shows the MicroScript version. Only referencing is possible; a setting cannot be made.
_____The meaning of the value becomes as follows:
_____
0x2106: Version 2.106
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
192

I Reference Section

$WACT
Syntax
Function
_____This is an integer value that shows the self window active state (whether it is in the forefront or not). When it is in active state, it becomes 1; when it is not in active state, it becomes 0.
_____Only referencing is possible; a setting cannot be made.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

193

_____
$WDH
Syntax
Function
_____This is an integer value that shows the current value (number of dots) of the height of the window work region. Only referencing is possible; a setting cannot be made.
_____What we call the work region refers the range in which drawing can actually take place inside the window; the frame of the window is not included.
_____Please refer also to $SCRH, $SCRW, $WDW, $WDX, and $WDY. Moreover, in changing the size of a window, please use the WSIZE statement.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
194

I Reference Section

$WDW
Syntax
Function
_____This is an integer value that shows the current value (number of dots) of the width of the window work region. Only referencing is possible; a setting cannot be made.
_____What we call the work region refers the range in which drawing can actually take place inside the window; the frame of the window is not included.
_____Please refer also to $SCRH, $SCRW, $WDH, $WDX, and $WDY. Moreover, in changing the size of a window, please use the WSIZE statement.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

195

_____
$WDX
Syntax
Function
_____This is an integer value that shows the X coordinate of the upper left of the window work region when the upper left of the screen has been made the coordinate starting point (0, 0). Only referencing is possible; a setting cannot be made.
_____What we call the work region refers the range in which drawing can actually take place inside the window; the frame of the window is not included.
_____Please refer also to $SCRH, $SCRW, $WDH, $WDW, and $WDY. Moreover, in changing the size of a window, please use the WSIZE statement.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.
196

I Reference Section

$WDY
Syntax
Function
_____This is an integer value that shows the Y coordinate of the upper left of the window work region when the upper left of the screen has been made the coordinate starting point (0, 0). Only referencing is possible; a setting cannot be made.
_____What we call the work region refers the range in which drawing can actually take place inside the window; the frame of the window is not included.
_____Please refer also to $SCRH, $SCRW, $WDH, $WDW, and $WDX. Moreover, in changing the size of a window, please use the WSIZE statement.
_____
_

Setting
Referencing
(Initial Value)
Byte _ _
Character _ _
Integer _

Yes

Floating point number _ _
Symbol _ _
Segment name _ _
Variable segment variable _ _
Array variable _ _
Illegal value _ _

Valid Range
Shared in system
Shared inside program
Each thread
REPEAT`ENDREPEAT

Errors that Occur at Startup Time
The item has already been defined
You cannot define a variable with the same name as a system variable.
A value cannot be set in this item
This is a variable that can only be referenced.

197


The above contents of BTRON MicroScript Reference Manual were translated and loaded onto this Web page with the permission of Personal Media Corporation.

Copyright (c) 1997 Personal Media Corporation

Copyright (c) 2010 Sakamura Laboratory, University Museum, University of Tokyo