BTRON MicroScript Reference Manual

Input


I Reference Section

INPUT
Syntax
Function
_____The INPUT statement puts a character segment in input state. The cursor will be displayed on the character segment that has turned to input state, and it will become possible to input characters from the keyboard and edit the contents of the character segment.
_____In a case where the cursor's X coordinate expression and the cursor's Y coordinate expression have been specified, the cursor will be displayed in the specified location. The coordinate values are the values of when we have made the upper left corner of the window work area (0,0). In a case where a cursor X coordinate expression and a cursor Y coordinate expression have not been specified, in a case where the value of a coordinate expression is negative, or in a case where the value of a coordinate expression specifies a location outside the target character segment, the cursor will be displayed in the character segment's end location. In a case where we execute the INPUT statement by means of event generation, normally we specify as is the event generated X coordinate and Y coordinate as the cursor X coordinate expression and the cursor Y coordinate expression.
_____In a case where the character segment has been omitted, if there is a character segment in input state, it will turn to non-input state, and the cursor display will disappear.
_____The INPUT statement immediately executes the next statement without waiting for input from the keyboard. Accordingly, it is necessary to describe the processing of character strings input by the user in a procedure that will execute by means of the generation of a CLICK event or KEY event, and not after an INPUT statement. Please refer to ACTION (p. 58) for procedures that are executed by means of the generation of an event.
_____When we put a character segment in input state, the KEY event generates only in a case where a key other than a character key, Back Space, or Delete (the Tab key, the Enter key, etc.) has been pressed.
_____Only one character segment in input state can exist inside a window. In a case where a certain character segment has been put into input state by means of the INPUT statement, the character segment that was in input state up to that point will come not to be in input state.
_____When the display of a character segment in input state disappears as a result of the DISAPPEAR statement or the SCENE statement, it will come not to be in input state. Also, a character segment that is not being displayed cannot be turned to input state.
_____Character strings the user has input are reflected immediately in .V and .TX.
_____As differs with the case of the KINPUT statement, the cursor does not move even if insert/deletion takes place. In a case where you have inserted characters, the character string slides in a left direction (the direction of the beginning of the character string), and the beginning character is lost. In a case where you have deleted characters, the character string slides in the right direction (the direction of the end of the character string), and a space is inserted at the beginning. In other words, the contents of the character string change, but the number of characters does not change.
_____Because the INPUT statement does not let kana-to-kanji conversion pass, it is suitable to the input of numbers, etc. To input arbitrary characters that pass through kana-to-kanji conversion, use the KINPUT statement, and not the INPUT statement.
Errors that Occur at Startup Time
Please specify the character segment
Please confirm whether the character segment has been properly specified.
An item has not been defined
Please confirm whether the character segment has been properly specified.
This is an illegal item cannot be interpreted
Please confirm whether the character segment has been properly specified.
Please specify the integer item
Please confirm whether the cursor coordinates expressions have been properly specified.
Errors that Are Stored into $ERR (refer to p. 170 concerning $ERR)
0_____ When we execute this statement, 0 gets loaded.

135, 136

I Reference Section

KINPUT
Syntax
Function
_____The KINPUT statement puts a character segment in input state. The cursor will be displayed on the character segment that has turned to input state, and it will become possible to input characters from the keyboard and edit the contents of the character segment.
_____In a case where the cursor's X coordinate expression and the cursor's Y coordinate expression have been specified, the cursor will be displayed in the specified location. The coordinate values are the values of when we have made the upper left corner of the window work area (0,0). In a case where a cursor X coordinate expression has not been specified, in a case where the value of a coordinate expression is negative, or in a case where the value of a coordinate expression specifies a location outside the target character segment, the cursor will be displayed in the character segment's beginning location. In a case where we execute the INPUT statement by means of event generation, normally we specify as is the event generated X coordinate value and Y coordinate value as the cursor X coordinate expression and the cursor Y coordinate expression.
_____In a case where the character segment has been omitted, if there is a character segment in input state, it will turn to non-input state, and the cursor display will disappear.
_____The KINPUT statement immediately executes the next statement without waiting for input from the keyboard. Accordingly, it is necessary to describe the processing of character strings input by the user in a procedure that will execute by means of the generation of a CLICK event or KEY event, and not after an KINPUT statement. Please refer to ACTION (p. 58) for procedures that are executed by means the generation of an event.
_____When we put a character segment in input state, the KEY event generates only in a case where a key other than a character key, Back Space, or Delete (the Tab key, the Enter key, etc.) has been pressed.
_____Only one character segment in input state can exist inside a window. In a case where a certain character segment has been put into input state by means of the KINPUT statement, the character segment that was in input state up to that point will come not to be in input state.
_____When the display of a character segment in input state disappears as a result of the DISAPPEAR statement or the SCENE statement, it will come not to be in input state. Also, a character segment that is not being displayed cannot be turned to input state.
_____Character strings the user has input are reflected immediately in .V and .TX.
_____In regard to a segment that that has come into input state by means of the KINPUT statement, the user can input characters and edit contents by means of a software keyboard, etc. By means of the cursor keys, the user can also move the cursor and insert/delete characters.
_____As differs with the case of the INPUT statement, the cursor moves in keeping with insert/deletion. In a case where you have inserted characters, the character string slides in a right direction (the direction of the end of the character string). In a case where you have exceeded the number of characters that can be input into a character segment by means of insertion, the characters at the end will be lost. In a case where you have deleted characters, the character string will slide in a left direction (the direction of the beginning of the character string).
_____The KINPUT statement can input arbitrary characters after passing them through kana-to-kanji conversion. To input such things as numerical values that do not pass through kana-to-kanji conversion, use the INPUT statement, and not the KINPUT statement.
_____The number of characters that can be input into a character segment is the maximum number of characters between the number of characters originally entered into the character string, or the number of characters set with the TEXT statement.
Errors that Occur at Startup Time
Please specify the character segment
Please confirm whether the character segment has been properly specified.
An item has not been defined
Please confirm whether the character segment has been properly specified.
This is an illegal item cannot be interpreted
Please confirm whether the character segment has been properly specified.
Please specify the integer item
Please confirm whether the cursor coordinates expressions have been properly specified.
Errors that Are Stored into $ERR (refer to p. 170 concerning $ERR)
0_____ When we execute this statement, 0 gets loaded.

137, 138

I Reference Section

EVENT
Syntax
Function
_____The EVENT statement generates a specified event.
_____What we call an event refers to matters such as the pen (mouse, touch panel) being pressed/released, or a key being pressed/released. When we generate an event by means of the EVENT statement, the pen or key becomes pressed, even if the pen or key hasn't actually been pressed. By pressing a switch displayed on the screen, an application such as generating an event in which a key has been pressed, and inputting characters in a character segment is possible.
_____KEYD generates an event in which a key has been pressed, KEYU an event in which a key has been released, and KEYC and event in which a key has been pressed and released (KEYC corresponds to executing KEYD and KEYU in succession). We specify by means of a character code expression which key will be pressed/released.
_____BUTD generates an event in which the pen has been pressed, BUTU an event in which the pen has been released, and BUTC and event in which the pen has been pressed and released (BUTC corresponds to executing BUTD and BUTU in succession).
_____The state expression specifies the state at the time the event is generated. In a case where it has been omitted, the same contents as $KSTAT will be set. Things to which we have added the values below become state expressions.
0x01: Main button of the pointing device (PD)
0x02: Menu button of the pointing device (PD)
0x04: English input mode
0x08: English capital letter (katakana) input mode
0x10: Left shift key
0x20: Right shift key
0x40: Alt (left)
0x80: Ctrl (left)
This specification is particularly important in the case of a key event; for example, when we specify 4 in the state expression, it becomes an input in English mode, and there will be input without kana-to-kanji conversion being carried out.
_____The X coordinate expression and the Y coordinate expression specify the location of the event generation. In a case where these are omitted, $PDX and $PDY will be set. This specification is particularly important in the case of a pen event; the press/release location will be determined by it.
_____Furthermore, there is a limit to the number of events that can be generated simultaneously. When you generate a large number of events faster than the speed at which they can be received, events that cannot be received are generated.
Errors that Occur at Startup Time
The event name is illegal
The specification of KEYD, KEYU, KEYC, BUTD, BUTU, BUTC is incorrect.
A necessary item is lacking
Please confirm whether there is a character code expression in the case of a key event, and whether there is also a Y coordinate expression in a case where there is an X coordinate expression.
This is an illegal item that cannot be interpreted
Please confirm whether you have specified a character code expression in the case of a key event. Also, please confirm whether you haven't specified a character code expression in the case of a pen event. Please confirm also whether the punctuation before the X coordinate expression is made up as 'F'.
Errors that Are Stored into $ERR (refer to p. 170 concerning $ERR)
0_____ When we execute this statement, 0 gets loaded.

139, 140

I Reference Section

BUTC
Syntax
Function
_____BUTC is an event type used in the EVENT statement. BUTC means generating an event in which the pen has been pressed and then released. Concerning the details, please refer to the EVENT statement (p. 139).

141

_____
BUTD
Syntax
Function
_____BUTD is an event type used in the EVENT statement. BUTD means generating an event in which the pen has been pressed. Concerning the details, please refer to the EVENT statement (p. 139).
142

I Reference Section

BUTU
Syntax
Function
_____BUTU is an event type used in the EVENT statement. BUTU means generating an event in which the pen has been released. Concerning the details, please refer to the EVENT statement (p. 139).

143

_____
KEYC
Syntax
Function
_____KEYC is an event type used in the EVENT statement. KEYC means generating an event in which a key has been pressed and then released. Concerning the details, please refer to the EVENT statement (p. 139).
144

I Reference Section

KEYD
Syntax
Function
_____KEYD is an event type used in the EVENT statement. KEYD means generating an event in which a key has been pressed. Concerning the details, please refer to the EVENT statement (p. 139).

145

_____
KEYU
Syntax
Function
_____KEYU is an event type used in the EVENT statement. KEYU means generating an event in which a key has been released. Concerning the details, please refer to the EVENT statement (p. 139).
146


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