Programming Manual for Citizen BASIC Interpreter - MaRCo
Programming Manual for Citizen BASIC Interpreter - MaRCo
Programming Manual for Citizen BASIC Interpreter - MaRCo
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Citizen</strong> <strong>BASIC</strong> <strong>Interpreter</strong><br />
1030 INBYTE #1:A<br />
1040 LOOP UNTIL A0<br />
1050 PRINT A<br />
1060 CLOSE #1<br />
Ready<br />
>RUN<br />
(input "1")<br />
49<br />
Ready<br />
3.13.12 OUTBYTE Statement<br />
【Explanation】<br />
This statement outputs 1 byte of data <strong>for</strong> the designated device.<br />
【Format】<br />
OUTBYTE [channel number:]<strong>for</strong>mula<br />
【Parameter】<br />
Channel number: Designates in #n <strong>for</strong>mat the channel number of<br />
device to output data. When omitted, #1 is deemed<br />
designated.<br />
Formula:<br />
Gives data to output. For the integer type, its value is<br />
output as 1 byte of data. The range of the value must stay<br />
between 0 and 255. For the string type, the first 1 byte<br />
of the string is output as data.<br />
【E.g.】<br />
>LIST<br />
1000 OPEN #1:NAME "SER", ACCESS OUTPUT<br />
1010 A$=INPUT$(1)<br />
1020 OUTBYTE #1:A$<br />
1030 PRINT #1,<br />
1040 CLOSE #1<br />
Ready<br />
>RUN<br />
(input "1" )<br />
1<br />
Ready<br />
3.14 Definition Statement<br />
3.14.1 DECLARE Statement<br />
【Explanation】<br />
This statement defines the array variable.<br />
【Format】 DECLARE data type variable・・・<br />
: ={NUMERIC|STRING}<br />
【Parameter】<br />
Data type:<br />
Variable:<br />
Designates NUMERIC when defining the integer type array<br />
variable.<br />
Designates STRING when defining the string type array variable.<br />
Designates the number of array elements in brackets after the<br />
variable name.<br />
When the data type is the string type, “$” is necessary to be<br />
attached at the end of the variable name.<br />
【E.g.】<br />
44