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 />

numerals and underscores are available <strong>for</strong> use. Reserved words are not usable as<br />

an identifier. The variable distinguishes capital letters from small letters.<br />

2.1.3 Reserved Word<br />

The following reserved words are not definable or applicable as an identifier:<br />

REPEAT INPUT END RUN GOTO<br />

REMLIST LET PRINT STOP DELETE<br />

EDITINPUT CLEAR SAVE LOAD NEW<br />

RESUME IF RANDOMIZE DIM FOR<br />

NEXT GOSUB RETURN ON ERROR<br />

AUTO READ DATA RESTORE BASE<br />

OPEN CLOSE MERGE QUIT BYE<br />

EXIT DEF CONT POKE LINPUT<br />

REPEAT UNTIL WHILE WEND SEEK<br />

RENUM RECOVER DUMP SYSTEM WIDTH<br />

AUTONUM DIR FILES STORE ECHO<br />

OFF DECLARE BREAK RESTART DEBUG<br />

STEP TRACE DO LOOP ELSE<br />

ENDIF SLEEP CLRERR SETERR INBYTE<br />

OUTBYTE JQ ZBICOMPATI ZPL MID<br />

RIGHT LEFT STRING ERMSG CHR<br />

STR SPACE GET MKI MKF<br />

DATE SEARCHTO EXTRACT LCASE UCASE<br />

LTRIM RTRIM TIME HEX OCT<br />

INKEY SGN LEN ABS VAL<br />

ASC INSTR EOF POSN SQR<br />

LOG EXP EVAL INT PEEK<br />

SIN COS ATAN MKI MKF<br />

RND PI ERL ERR DATE<br />

ISERROR ISWARNING DATAREADY MAX MIN<br />

MAXLEN MAXNUM MOD ORD POS<br />

TIME THEN TAB TO AS<br />

OUTPUT APPEND TERMINAL USING NUMERIC<br />

STRING NAME ACCESS INOUT<br />

2.1.4 Numeral<br />

An integer constant and real constant are described as the numeral of decimal<br />

notation which consists of a series of numerals with no commas or space included,<br />

and are led by the operator of + or – representing a sign. A value turns positive<br />

by default, and thus 67258 is equivalent to +67258, <strong>for</strong> instance. Further, a constant<br />

value must be included in the range of the defined real type maximum value and integer<br />

type maximum value.<br />

Numbers with the decimal point or exponential part represent real numbers, and the<br />

others refer to integer numbers. The real number with E or e is interpreted as “…th<br />

power of ~ multiplied by 10”. For instance, 7E-2 is interpreted as 7×10^-2, and<br />

both 12.25e+6 and 12.25e6 as 12.25×10^6.<br />

However, the variables of the <strong>BASIC</strong> interpreter support integer numbers only;<br />

there<strong>for</strong>e real numbers cannot be substituted.<br />

The prefix of an ampersand such as &H8F represents hexadecimal. A hexadecimal value<br />

10

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

Saved successfully!

Ooh no, something went wrong!