home *** CD-ROM | disk | FTP | other *** search
- CBASIC in General
- CBASIC Compile-Time Toggled Options
- Compiler Error Messages
- Run-Time Error Messages -- Warnings
- Run-Time Error Messages -- Error Codes
- CBASIC Reserved Words
- :CBASIC: CBASIC in General
-
- CBASI├á i≤á ß compile≥ BASI├ whicΦ ma∙ bσ executeΣ oε an∙ flopp∙á disδ ì
- baseΣá CP/═ systeφ havinτ a⌠ leas⌠ 20╦ byte≤ oµ memory«á Iε orde≥ t∩á makσ ì
- thσá bes⌠ usσ oµ thσ powe≥ anΣ flexibilit∙ oµ CBASIC¼á ß dua∞á flopp∙á disδ ì
- systeφá anΣ a⌠ leas⌠ 32╦ oµ memor∙ i≤ recommended«á Iµ CBASI├ i≤á executeΣ ì
- in a system smaller than 20K, a CP/M LOAD ERROR may occur.
-
- Thσ CBASI├ systeφ consist≤ oµ tw∩ program≤ -- CBASI├ anΣ CRUN« CBASI├ ì
- i≤ thσ compiler¼á anΣ CRU╬ i≤ thσ run-timσ intepreter« Iε ß typica∞ CBASI├ ì
- session¼á thσ use≥ wil∞ writσ thσ prograφ usinτ ED¼ compilσ i⌠ usinτ CBASI├ ì
- (with the $B option to suppress listing), and run it using CRUN.
-
- Refer to the 84-page CBASIC manual --
-
- C B A S I C
- A Commercially Oriented
- Compiler/Interpreter BASIC
- Language Facility for
- CP/M Systems
-
- February 17, 1978
- :CBASIC: CBASIC Compile-Time Toggled Options
-
- Compile≥á toggle≤á arσ ß serie≤ oµ switche≤ tha⌠ caε bσ se⌠á wheεá thσ ì
- compile≥á i≤á executed«á Thσ toggle≤ arσ se⌠ b∙ typinτ ßá dollar-sigεá ($⌐ ì
- followeΣá b∙á thσ lette≥ designation≤ oµ thσ desireΣ toggle≤á startinτá onσ ì
- spacσ o≥ morσ afte≥ thσ prograφ namσ oε thσ commanΣ line« Toggle≤ ma∙ onl∙ ì
- be set for the compiler.
-
- Examples of compiler toggles and invocation forms are --
- CBASIC INVENTRY $BGF
- B:CBASIC A:COMPARE $GEC
- CBASIC PAYROLL $B
- CBASIC B:VALIDATE $E
-
- CBASIC Compiler Toggles
-
- TOGGL┼ B║ Suppresse≤ thσ listinτ oµ thσ prograφ oε thσ consolσ durinτ ì
- compilation«á Iµ aε erro≥ i≤ detected¼á thσ sourcσ linσ witΦ thσ erro≥ anΣ ì
- thσá erro≥ messagσ wil∞ bσ printeΣ eveε iµ Togglσ ┬ i≤ set«á Togglσ ┬ doe≤ ì
- not affect listing to the printer (Toggle F) or disk file (Toggle G).
- Toggle B is initially off.
-
- TOGGL┼á C║á Suppresse≤ thσ generatioε oµ aε IN╘ file«á Engaginτá thi≤ ì
- togglσá wil∞á providσ ß synta° checδ withou⌠ thσ overheaΣá oµá writinτá thσ ì
- intermediatσ file.
- Toggle C is initially off.
-
- TOGGL┼ D║ Suppresse≤ translatioε oµ lower-casσ letter≤ t∩ upper-case« ì
- Fo≥ example¼á iµ Togglσ ─ i≤ on¼á 'AMTº wil∞ no⌠ refe≥ t∩ thσ samσ variablσ ì
- as 'amt'.
- Toggle D is initially off.
-
-
- TOGGL┼á E║ Cause≤ thσ run-timσ prograφ (CRUN⌐ t∩ accompan∙ an∙á erro≥ ì
- message≤ witΦ thσ CBASI├ linσ numbe≥ iε whicΦ thσ erro≥ occurred« Togglσ ┼ ì
- mus⌠á bσ se⌠ iε orde≥ fo≥ thσ TRAC┼ optioε (seσ sectioε 13.┤ oµ thσ manual⌐ ì
- to work.
- Toggle E is initially off.
-
- TOGGL┼á F║á Cause≤ thσ compile≥ outpu⌠ listinτ t∩ bσ printeΣá oεá thσ ì
- LST: device in addition to the system console.
- Toggle F is initially off.
-
- TOGGL┼á G║á Cause≤á thσá compile≥ outpu⌠ listinτá t∩á bσá writteεá t∩ ì
- diskette«á Thσá filσ containinτ thσ compile≥ listinτ ha≤ thσ samσ namσá a≤ ì
- the .BAS file, but its type is .LST.
- Toggle G is initially off.
- :CBASIC: Compiler Error Messages
-
- Text Messages
-
- NO SOURCE FILE: <FILENAME>.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.
- :CBASIC: CBASIC Reserved Words
-
- CBASIC Reserved Words
-
- ABS EQ LEN POS STOP
- AND EXP LET PRINT STR$
- AS FEND LINE RANDOMIZE SUB
- ASC FILE LOG READ TAB
- ATN FOR LPRINTER RECL TAN
- CALL FRE LT REM THEN
- CHR$ GE MATCH REMARK TO
- CLOSE GO MID$ RENAME USING
- CONSOLE GOSUB NE RESTORE VAL
- COS GOTO NEXT RETURN WEND
- CREATE GT NOT RIGHT$ WHILE
- DATA IF ON RND WIDTH
- DEF INP OPEN SGN XOR
- DELETE INPUT OR SIN
- DIM INT OUT SIZE
- ELSE LE PEEK SQR
- END LEFT$ POKE STEP