jump to navigation

TinyBASIC One::A simple BASIC interpreter with two flavours December 15, 2012

Posted by sandyclaus in Uncategorized.
trackback

The BASIC Language

TinyBASIC implements the following language features:

Twenty six (32-bit signed) integer-only variables (A..Z)

Single array (@())

REM, LET and STOP

FOR loops with optional STEP clause

IF statement, with six compare operators (=, #, <, >, <=, >=)

GOTO, GOSUB and RETURN

INPUT and PRINT

Two functions, ABS(x) and RND(x)

Expressions involving liternal numbers, variables, the array,

functions and parenthesis to alter evaluation order

DRAW command for graphics output

WAIT command for introducing delays or waiting for key-press events in the graphics window

TRACE command for showing command execution sequence

RENUMBER command with undo feature

And in raspberry flavour the following language features are available:

as above with the following changes:

GOTO disabled

ELSE which is used together with IF. Multiple ELSE IF statements are supported

WHILE/WEND loops which continue to execute while an arbitrary test in WHILE is true

REPEAT/UNTIL loops which continue to execute while an arbitrary test with UNTIL is false

BREAK for early exit from WHILE/WEND, REPEAT/UNTIL and FOR/NEXT loops

CONTINUE for immediate re-evaluation of WHILE/WEND, REPEAT/UNTIL or FOR/NEXT loops

via TinyBASIC One::A simple BASIC interpreter with two flavours.

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: