Invoking BASIC-E BASIC-E Statements BASIC-E Functions Differences between BASIC-E and CBASIC BASIC-E Error Messages CBASIC: Compiler Error Messages CBASIC: Run-Time Error Messages -- Warnings CBASIC: Run-Time Error Messages -- Error Codes :Invoking BASIC-E BASIC-E is invoked by typing the following -- EBASIC filename $o wher 'filename i th nam o th sourc fil 'filename.BAS t b compiled and 'o' is one or more of the following options -- A List Productions (for compiler debugging); normally OFF B List only source statements with errors; normally OFF C Check syntax only; don't create .INT file; normally OFF D Convert lowercase to uppercase; normally ON E Generate line number code; normally OFF After compilation, the program may then be executed by -- ERUN filename where 'filename' is the name of the intermediate code file 'filename.INT'. :BASIC-E Statements The following statements are valid in BASIC-E -- FOR NEXT FILE GOTO LET CLOSE GOSUB INPUT ON PRINT READ RESTORE RETURN OUT RANDOMIZE STOP DATA DEF DIM END IF REM ELSE THEN :BASIC-E Functions The following built-in functions are valid in BASIC-E -- ABS ASC ATN CHR$ COS COSH FRE INP INT LEFT$ LEN LOG MID$ POS RIGHT$ RND SGN SIN SINH STR$ SQR TAB TAN VAL EXP :Differences between BASIC-E and CBASIC Th followin feature ar no availabl i BASIC-E bu the ar available in CBASIC -- 1. PEEK or POKE 2. PRINT USING 3. CALL to machine code programs 4. LPRINT :BASIC-E Error Messages Sinc BASIC- i "subset o CBASIC refe t th CBASI hel fil for information on the BASIC-E error messages. Most bu no all BASIC- erro message ar covere i thi hel file. :CBASIC: Compiler Error Messages Text Messages NO SOURCE FILE: .BAS Th compile coul no locat sourc fil use i eithe CBASI command or an INCLUDE directive. PROGRAM CONTAINS n UNMATCHED FOR STATEMENT(S) There are n FOR statements for which a NEXT could not be found. PROGRAM CONTAINS n UNMATCHED WHILE STATEMENT(S) There are n WHILE statements for which a WEND could not be found. WARNING: INVALID CHARACTER IGNORED Th previou lin contain a invali ASCI character thi characte is ignored by the compiler, and a question mark is printed in its place. 2-Letter Error Codes CE -- Close Error The intermediate (.INT) file could not be closed. DE -- Disk Error A disk error occurred while trying to read the .BAS file. DF -- Disk Full Ther wa n spac o th dis o th dis director wa full Th .INT file was not created. DL -- Duplicate Line number Th sam lin numbe wa use o tw differen lines Othe compile error ma caus D erro messag t b printe eve i duplicat lin numbers do not exist. DP -- Defined Previously A variable in a DIM statement was previously defined. EF -- Exponential Format numbe i exponentia forma wa inpu wit n digit followin th E. FD -- Function Definition functio nam tha ha bee previousl define i bein redefine i a DEF statement. FI -- FOR Index A expressio whic i no a unsubscripte numeri variabl i bein used as a FOR loop index. FN -- Function parameter Number A function reference contains an incorrect number of parameters. FP -- Function Parameter type functio referenc paramete typ doe no matc th paramete typ used in the function's DEF statement. FU -- Function Undefined A function has been referenced before it has been defined. IE -- IF Expression A expressio use immediatel followin a IƠ evaluate t typ string. Only type numeric is permitted. IF -- In File variabl use i FIL statemen i o typ numeri wher typ string is required. IP -- Input Prompt An input prompt string is not surrounded by quotes. IS -- Invalid Subscript A subscripted variable was referenced before it was dimensioned. IU -- Invalid Use A variable defined as an array is used with no subscripts. MF -- Mixed Format An expression evaluates to type string when type numeric is required. MM -- Mixed Mode Variable o typ strin an typ numeri ar combine i th sam expression. NI -- NEXT Index variabl reference b NEX statemen doe no matc th variabl referenced by the associated FOR statement. NU -- NEXT Unexpected A NEXT statement occurs without an associated FOR statement. OO -- ON Overflow More than 25 ON statements were used in the program. SE -- Syntax Error The source line contains a syntax error. SN -- Subscript Number A subscripted variable contains an incorrect number of subscripts. SO -- Syntax Overflow Th expressio i to comple an shoul b simplifie an place o more than one line. TO -- Table Overflow Th progra i to larg fo th system Th progra mus b simplified or the system size increased. UL -- Undefined Line number A line number that does not exist has been referenced. US -- Undefined String A string has been terminated by a carriage return rather than quotes. VO -- Variable Overflow Variable names are too long for one statement. This should not occur. WE -- WHILE Error The expression immediately following a WHILE statement is not numeric. WU -- WHILE Undefined A WEND statement occurs without an associated WHILE statement. :CBASIC: Run-Time Error Messages -- Warnings Tw textua run-tim erro message ar presente b CRUN: NO INTERMEDIATE FILE fil nam wa no specifie wit th CRU command o n fil o typ .IN an th specifie fil nam wa foun o disk. IMPROPER INPUT - REENTER Thi messag occur whe th field entere fro th consol d no matc th fiel specifie i th INPU statement Thi ca occu whe fiel type d no matc o th numbe o field entere i differen fro th numbe o field specified Al field specifie b th INPU statemen mus b reentered. 2-Letter Warning Codes DZ -- Divide by Zero numbe wa divide b zero Th resul i se t th larges vali CBASI number. FL -- Field Length fiel lengt greate tha 25 byte wa encountere durin REA LINE Onl th firs 25 character o th recor ar retained. LN -- Logarithm error Th argumen give i th LO functio wa zer o negative Th valu o th argumen i returned. NE -- NEgative number negativ numbe wa specifie followin th rais t powe operato (^) Th absolut valu i use i th calculation. OF -- OverFlow calculatio produce numbe to large Th resul i se o th larges vali CBASI number. SQ -- SQuare root error negativ numbe wa specifie i th SQ function Th absolut valu i used. :CBASIC: Run-Time Error Messages -- Error Codes AC -- AsCii error Th strin use a th argumen i a AS functio evaluate t nul string. CE -- Close Error An error occurred upon closing a file. CU -- Close Undefined file clos statemen specifie fil numbe tha wa no active. DF -- Defined File A OPE o CREAT wa specifie wit fil numbe tha wa alread active. DU -- Delete Undefined file DELET statemen specifie fil numbe tha wa no active. DW -- Disk Write error A erro occurre whil writin t file Thi occur whe eithe th director o th dis i full. EF -- End of File rea pas th en o fil occurre o fil fo whic n IƠ EN statemen ha bee executed. ER -- Error in Record A attemp wa mad t writ recor o lengt greate tha th maximu recor siz specifie i th associate OPEN CREATE o FIL statement. FR -- File Rename A attemp wa mad t renam fil t a existin fil name. FU -- File Undefined A attemp wa mad t rea o writ t fil tha wa no active. IR -- Invalid Record number A record number less than one was specified. LW -- Line Width lin widt les tha o greate tha 13 wa specifie i a LPRINTE WIDT statement. ME -- MAKE Error A erro occurre whil creatin o extendin fil becaus th dis director wa full. MP -- MATCH Parameter Th thir paramete i MATC functio wa zer o negative. NF -- Number of FILE Th fil numbe specifie wa les tha o greate tha 20. NM -- No Memory There was insufficient memory to load the program. NN -- No Number field A attemp wa mad t prin numbe wit PRIN USIN statemen bu ther wa no numeri dat fiel i th USIN string. NS -- No String field A attemp wa mad t prin strin wit PRIN USIN statemen bu ther wa no strin fiel i th USIN string. OD -- Overflow Data REAĠ statemen wa execute wit n DAT available. OE -- OPEN Error A attemp wa mad t OPE fil tha didn' exis an fo whic n I EN statemen ha bee previousl executed. OI -- ON Index Th expressio specifie i a O .. GOSU o a OΠ .. GOT statemen evaluate t numbe les tha o greate tha th numbe o lin number containe i th statement. OM -- Overflow Memory The program ran out of memory during execution. QE -- Quote Error A attemp wa mad t PRIN t fil strin containin quotatio mark. RE -- READ Error A attemp wa mad t rea pas th en o recor i fixe file. RG -- RETURN with no GOSUB A RETURN occurred for which there was no GOSUB. RU -- Random Undefined rando rea o prin wa attempte t othe tha fixe file. SB -- SuBscript A arra subscrip wa use whic exceede th boundarie fo whic th arra wa defined. SL -- String Length concatenatio operatio resulte i strin o mor tha 25 bytes. SS -- SubString error Th secon paramete o MID functio wa zer o negative. TF -- Too many Files A attemp wa mad t hav mor tha 2 activ file simultaneously. TL -- TAB Length TA statemen containe paramete les tha o greate tha th curren lin width. UN -- UNdefined edit string PRIN USIN statemen wa execute wit nul edi string. WR -- WRite error A attemp wa mad t writ t fil afte i ha bee read bu befor i ha bee rea t th en o th file.