21.11.2014 Views

Programming Manual for Citizen BASIC Interpreter - MaRCo

Programming Manual for Citizen BASIC Interpreter - MaRCo

Programming Manual for Citizen BASIC Interpreter - MaRCo

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Citizen</strong> <strong>BASIC</strong> <strong>Interpreter</strong><br />

4-4<br />

5-5<br />

6-6<br />

7-7<br />

8-8<br />

9-9<br />

10-10<br />

Ready<br />

3.14.3 BASE Statement<br />

【Explanation】<br />

This statement designates whether the basic value of the array subscript starts<br />

from 0 or 1. The default is 1.<br />

【Format】<br />

BASE { 0| 1}<br />

【Parameter】<br />

0: Sets to start the array subscript from 0.<br />

1: Sets to start the array subscript from 1.<br />

【E.g.】<br />

>LIST<br />

1000 BASE 0<br />

1010 DIM A(10)<br />

1020 FOR I=0 TO 10<br />

1030 A(I)=I<br />

1040 NEXT I<br />

1050 FOR I=0 TO 10<br />

1060 PRINT A(I)<br />

1070 NEXT I<br />

Ready<br />

>RUN<br />

0<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

8<br />

9<br />

10<br />

Ready<br />

3.14.4 DEF<br />

【Explanation】<br />

This defines the user function.<br />

【Format】<br />

DEF function name (argument list)=<strong>for</strong>mat<br />

【Parameter】<br />

Function name:<br />

Designates the function name used to call<br />

the function.<br />

46

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!