-------------------------------------------------------------------
INTRODUCTION

    Cheesecake BASIC is an implementation of a simple BASIC interpreter.
    It was originaly written in QuickBasic. There is a port to PowerBasic
    Console Compiler.

    Following is a description of the Cheesecake BASIC files:

    ccbasic.bi          Global include file
    ccbasic.bas         Cheesecake BASIC main module, symbol table,
                        memory and other functions
    interp.bas          Interpreter and Lexer
    parser.bas          Parser functions
    parser1.bas         More parser functions
    ccbasic.mak         MAK file for QuickBasic to compile the program

    (Note:  The Powerbasic version contains only one source file:
            ccbasic.bas )

    ccbasic.exe         Cheesecake BASIC executable
    readme.txt          This file

    samples\hangman.bas A sample file implementing a "Hangman" game
    samples\words.txt   Input file used by hangman.bas

-------------------------------------------------------------------
DATA TYPES

    Cheesecake BASIC supports 2-byte integers (%), 4-byte reals (!) and
    strings ($).  Symbols without a suffix type character are
    integer regardless of their name.


-------------------------------------------------------------------
INTERPRETER COMMANDS

    BYE                                 Exits the interpreter
    DUMP [SYM|MEM|SYS] [TO "FileName"]  Dumps interpreter structures
    LIST [Line [- Line] ]               Lists program
    LOAD "FileName"                     Loads a program
    NEW                                 Resets the interpreter
    RENUM [Increment]                   Renumbers program lines
    RUN                                 Runs program
    SAVE "FileName"                     Saves program
    TRACE {ON | OFF}                    Turns program trace on/off
    BRK Line                            Sets breakpoint at specific line
    CBRK [Line]                         Clears breakpoint. If no line is
                                        specified, clears all breakpoints
                                        in program
    CONT                                Continues execution after a STOP
                                        in the program or a breakpoint hit
    Line [Basic statements]             Adds/Removes/Replaces a program line


-------------------------------------------------------------------
Cheesecake BASIC LANGUAGE

    Line numbers are required in Cheesecake BASIC.

    Multiple statements are allowed in one line, separated by colons e.g.

    10 PRINT "Hello" : GOSUB 300 : END


-------------------------------------------------------------------
SUPPORTED BASIC COMMANDS

    BEEP
    CHDIR "directory"
    CLOSE #filenumber
    CLS
    COLOR fg [, bg]
    DATA constant [,constant]*
    DEF functionname(args) = expression
            Note that FN is not required e.g.:
                10 DEF PlusOne(x) = x + 1
                20 PRINT PlusOne(5)
    DIM var [, var]*
            Note that arrays are limited to 3 dimensions
    END
    ERROR errornumber
    FIELD #filenumber, integer as fieldname [, integer as fieldname]*
    FOR id = integer TO integer [STEP integer]
    GET #filenumber
    GOSUB linenumber
    GOTO linenumber
    IF exp THEN statements [ ELSE statements ]
    INPUT [#filenumber,] [prompt{,|;}] var [, var]*
    KEY (keynumber) { ON | OFF }
    [LET | LSET | RSET] var = exp
    LINE INPUT [#exp,] [prompt {,|;}] var
    LOCATE x, y
    NEXT [id]
    ON ERROR GOTO linenumber
    ON exp GOSUB linenumber [, linenumber]*
    ON exp GOTO linenumber [, linenumber]*
    ON KEY (keynumber) GOSUB linenumber
    ON TIMER (seconds) GOSUB linenumber
    OPEN filename [FOR {INPUT|OUTPUT|APPEND|RANDOM}] as #filenumber [LEN=len]
    PRINT [#filenumber,] print-list
    PUT #filenumber
    RANDOMIZE [exp]
    READ var [,var]*
    REM (or apostrophe)
    RESTORE [linenumber]
    RESUME [ NEXT | linenumber]
    RETURN [linenumber]
    SEEK #filenumber, recordnumber
    SHELL command
    SLEEP seconds
    TIMER { ON | OFF }
    WEND
    WHILE exp
    STOP


-------------------------------------------------------------------
SUPPORTED FUNCTIONS

    ABS, ASC, ATN, CHR$, CINT, COS, CURSORX, CURSORY,
    CVI, CVS, DATE$, EOF, ERL, ERR, ERT$ (Error text),
    EXP, FIX, INKEY$, INSTR, INT, LCASE$, LEFT$, LEN,
    LOC, LOF, LOG, LTRIM$, MID$, MKI$, MKS$, RIGHT$,
    RND, RTRIM$, SEEK, SIN, SQR, STR$, TIME$, TIMER,
    UCASE$, VAL


-------------------------------------------------------------------
LIMITATIONS

    The file ccbasic.bi contains constants for all (or most) of
    the limits in Cheesecake BASIC.


-------------------------------------------------------------------
FEEDBACK

    Comments, bug reports etc. can be sent to the author at:

    mnitesoft@aol.com


-------------------------------------------------------------------
UPDATES

    The latest version of the interpreter can be downloaded from:

    http://members.aol.com/mnitesoft


-------------------------------------------------------------------
LEGAL

    This is free software subject to the GNU General Public License
    as described in the source code.
