 v3.20
* Implements most of the following BASIC dialects:
OPTION VERSION "BYWATER" ' Bywater BASIC 3
OPTION VERSION "BYWATER-2" ' Bywater BASIC 2
OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC
OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M
OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC
OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC
OPTION VERSION "ECMA-116" ' ANSI Full BASIC
OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC
OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt
OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition
OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition
OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC
OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC
OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC
OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix
OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC
OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC
OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX
OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS
OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC
OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC
OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC
OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1
OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX
* CONST variable [, ...] = value
Assigns the value to variable.
Any later assignment to the variable causus a VARIABLE NOT DECLARED error.
* DIM now supports lower and upper bounds.
OPTION BASE 1
DIM X( 9 ) ' lower bound is 1
DIM Y( 5 TO 9 ) ' lower bound is 5
* DIM now supports virtual variables.
OPTION BASE 1
OPEN "VIRTUAL.DAT" FOR VIRTUAL AS # 3 ' virtual data file
DIM # 3, A( 1000 ) ' array is virtual
LET A( 1000 ) = 0 ' value is written to the file
LET X = A( 1000 ) ' value is read from the file
CLOSE # 3 ' array is no longer valid
* ERROR 27, "Bad DATA"
Occurs when the READ command detects garbage in a DATA command.
* INPUT LINE
Same as LINE INPUT.
* MAT now supports lower and upper bounds.
OPTION BASE 1
MAT X( 9 ) = ZER ' lower bound is 1
MAT Y( 5 TO 9 ) = ZER ' lower bound is 5
MAT X = ZER( 9 ) ' lower bound is 1
MAT Y - ZER( 5 TO 9 ) ' lower bound is 5
* MAXLEN()
Returns the maximum string length.
* OPTION DIGITS integer
Sets the number of significant digits for PRINT.
Setting the value to zero restores the default.
* OPTION EDIT string$
Sets the program name used by the EDIT command.
Setting this to "" disables EDIT command.
* OPTION FILES string$
Sets the program name used by the FILES command.
Setting this to "" disables FILES command.
* OPTION PROMPT string$
Sets the prompt.
* OPTION PUNCT AT char$
Sets the PRINT AT character, commonly "@".
Setting this to "" disables PRINT AT.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT BYTE char$
Sets the BYTE type suffix, commonly "~".
Setting this to "" disables BYTE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT COMMENT char$
Sets the trailing COMMENT character, commonly "'".
Setting this to "" disables trailing comments.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT CURRENCY char$
Sets the CURRENCY type suffix, commonly "@".
Setting this to "" disables CURRENCY suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT DOUBLE char$
Sets the DOUBLE type suffix, commonly "#".
Setting this to "" disables DOUBLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT FILENUM char$
Sets the FILE NUMBER prefix, commonly "#".
Setting this to "" disables the FILE NUMBER prefix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT IMAGE char$
Sets the shortcut IMAGE character, commonly ":".
Setting this to "" disables the shortcut IMAGE character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INPUT char$
Sets the shortcut INPUT character, commonly "!".
Setting this to "" disables the shortcut INPUT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INTEGER char$
Sets the INTEGER type suffix, commonly "%".
Setting this to "" disables INTEGER suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LONG char$
Sets the LONG type suffix, commonly "&".
Setting this to "" disables LONG suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LPAREN char$
Sets the LEFT PARENTHESIS character, commonly "(".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT PRINT char$
Sets the shortcut PRINT character, commonly "?".
Setting this to "" disables the shortcut PRINT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT QUOTE char$
Sets the QUOTE character, commonly """".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT RPAREN char$
Sets the RIGHT PARENTHESIS character, commonly ")".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT SINGLE char$
Sets the SINGLE type suffix, commonly "!".
Setting this to "" disables SINGLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STATEMENT char$
Sets the shortcut STATEMENT seperator character, commonly ":".
Setting this to "" disables the STATEMENT seperator.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STRING char$
Sets the STRING type suffix, commonly "$".
Setting this to "" disables STRING suffix.
Setting this to a non-punctuation character is not supported.
* OPTION RECLEN integer
Sets the default record length for RANDOM files, commonly 128.
Setting thisto zero means there is no default RANDOM record
length, so the record length must be specified in the OPEN
statement.
With OPTION RECLEN 128:
OPEN "FILE.DAT" FOR RANDOM AS #3
is considered to be the same as
OPEN "FILE.DAT" FOR RANDOM AS #3 LEN 128
With OPTION RECLEN 0:
OPEN "FILE.DAT" FOR RANDOM AS #3
causes an error.
* OPTION RENUM string$
Sets the program name used by the RENUM command.
Setting this to "" disables RENUM command.
* OPTION SCALE integer
Sets the number of digits to round after the decimal point for PRINT.
Setting the value to zero disables rounding.
* OPTION USING DIGIT
* OPTION USING COMMA
* OPTION USING PERIOD
* OPTION USING PLUS
* OPTION USING MINUS
* OPTION USING EXRAD
* OPTION USING DOLLAR
* OPTION USING FILLER
* OPTION USING LITERAL
* OPTION USING FIRST
* OPTION USING ALL
* OPTION USING LENGTH
Sets the characters recognized by PRINT USING.
Setting these to a non-punctuation character is not supported.
* OPTION VERSION now requires a string instead of a literal.
Some version names have changed.
* OPTION VERSION "PDP-8"
Added LPT, PTP, PTR, TTY, TTY IN and TTY OUT commands.
Added GET() and PUT() functions.
* OPTION VERSION "CALL/360"
* OPTION VERSION "SYSTEM/360"
* OPTION VERSION "SYSTEM/370"
Added alphabet extenders. $ is a string variable.
* OPTION ZONE integer
Sets the PRINT zone width.
Setting the value to zero restores the default.
* REPEAT - UNTIL added
REPEAT
...
EXIT REPEAT
...
UNTIL expression ' exits when expression != 0
* SPC( X ) and TAB( X )
No longer use control codes.
* UNTIL - UEND removed (to add REPEAT - UNTIL)
Here is a work-around for existin code using UNTIL-UEND:
UNITL expression -->> WHILE NOT expression
... ...
EXIT UNTIL -->> EXIT WHILE
... ...
UEND -->> WEND
* from Howard Wulf, AF5NE
Editor's Note: In the official release *ALL* of the test and sample
BASIC programs were removed and packaged in a separate "test" ZIP. I
have extracted those in to the bwbtest folder where most of the
tests were living in previous packages. I've also improved (I hope)
the EOL handling.
- ChipMaster
3 years ago  v3.20
* Implements most of the following BASIC dialects:
OPTION VERSION "BYWATER" ' Bywater BASIC 3
OPTION VERSION "BYWATER-2" ' Bywater BASIC 2
OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC
OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M
OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC
OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC
OPTION VERSION "ECMA-116" ' ANSI Full BASIC
OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC
OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt
OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition
OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition
OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC
OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC
OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC
OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix
OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC
OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC
OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX
OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS
OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC
OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC
OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC
OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1
OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX
* CONST variable [, ...] = value
Assigns the value to variable.
Any later assignment to the variable causus a VARIABLE NOT DECLARED error.
* DIM now supports lower and upper bounds.
OPTION BASE 1
DIM X( 9 ) ' lower bound is 1
DIM Y( 5 TO 9 ) ' lower bound is 5
* DIM now supports virtual variables.
OPTION BASE 1
OPEN "VIRTUAL.DAT" FOR VIRTUAL AS # 3 ' virtual data file
DIM # 3, A( 1000 ) ' array is virtual
LET A( 1000 ) = 0 ' value is written to the file
LET X = A( 1000 ) ' value is read from the file
CLOSE # 3 ' array is no longer valid
* ERROR 27, "Bad DATA"
Occurs when the READ command detects garbage in a DATA command.
* INPUT LINE
Same as LINE INPUT.
* MAT now supports lower and upper bounds.
OPTION BASE 1
MAT X( 9 ) = ZER ' lower bound is 1
MAT Y( 5 TO 9 ) = ZER ' lower bound is 5
MAT X = ZER( 9 ) ' lower bound is 1
MAT Y - ZER( 5 TO 9 ) ' lower bound is 5
* MAXLEN()
Returns the maximum string length.
* OPTION DIGITS integer
Sets the number of significant digits for PRINT.
Setting the value to zero restores the default.
* OPTION EDIT string$
Sets the program name used by the EDIT command.
Setting this to "" disables EDIT command.
* OPTION FILES string$
Sets the program name used by the FILES command.
Setting this to "" disables FILES command.
* OPTION PROMPT string$
Sets the prompt.
* OPTION PUNCT AT char$
Sets the PRINT AT character, commonly "@".
Setting this to "" disables PRINT AT.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT BYTE char$
Sets the BYTE type suffix, commonly "~".
Setting this to "" disables BYTE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT COMMENT char$
Sets the trailing COMMENT character, commonly "'".
Setting this to "" disables trailing comments.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT CURRENCY char$
Sets the CURRENCY type suffix, commonly "@".
Setting this to "" disables CURRENCY suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT DOUBLE char$
Sets the DOUBLE type suffix, commonly "#".
Setting this to "" disables DOUBLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT FILENUM char$
Sets the FILE NUMBER prefix, commonly "#".
Setting this to "" disables the FILE NUMBER prefix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT IMAGE char$
Sets the shortcut IMAGE character, commonly ":".
Setting this to "" disables the shortcut IMAGE character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INPUT char$
Sets the shortcut INPUT character, commonly "!".
Setting this to "" disables the shortcut INPUT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INTEGER char$
Sets the INTEGER type suffix, commonly "%".
Setting this to "" disables INTEGER suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LONG char$
Sets the LONG type suffix, commonly "&".
Setting this to "" disables LONG suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LPAREN char$
Sets the LEFT PARENTHESIS character, commonly "(".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT PRINT char$
Sets the shortcut PRINT character, commonly "?".
Setting this to "" disables the shortcut PRINT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT QUOTE char$
Sets the QUOTE character, commonly """".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT RPAREN char$
Sets the RIGHT PARENTHESIS character, commonly ")".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT SINGLE char$
Sets the SINGLE type suffix, commonly "!".
Setting this to "" disables SINGLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STATEMENT char$
Sets the shortcut STATEMENT seperator character, commonly ":".
Setting this to "" disables the STATEMENT seperator.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STRING char$
Sets the STRING type suffix, commonly "$".
Setting this to "" disables STRING suffix.
Setting this to a non-punctuation character is not supported.
* OPTION RECLEN integer
Sets the default record length for RANDOM files, commonly 128.
Setting thisto zero means there is no default RANDOM record
length, so the record length must be specified in the OPEN
statement.
With OPTION RECLEN 128:
OPEN "FILE.DAT" FOR RANDOM AS #3
is considered to be the same as
OPEN "FILE.DAT" FOR RANDOM AS #3 LEN 128
With OPTION RECLEN 0:
OPEN "FILE.DAT" FOR RANDOM AS #3
causes an error.
* OPTION RENUM string$
Sets the program name used by the RENUM command.
Setting this to "" disables RENUM command.
* OPTION SCALE integer
Sets the number of digits to round after the decimal point for PRINT.
Setting the value to zero disables rounding.
* OPTION USING DIGIT
* OPTION USING COMMA
* OPTION USING PERIOD
* OPTION USING PLUS
* OPTION USING MINUS
* OPTION USING EXRAD
* OPTION USING DOLLAR
* OPTION USING FILLER
* OPTION USING LITERAL
* OPTION USING FIRST
* OPTION USING ALL
* OPTION USING LENGTH
Sets the characters recognized by PRINT USING.
Setting these to a non-punctuation character is not supported.
* OPTION VERSION now requires a string instead of a literal.
Some version names have changed.
* OPTION VERSION "PDP-8"
Added LPT, PTP, PTR, TTY, TTY IN and TTY OUT commands.
Added GET() and PUT() functions.
* OPTION VERSION "CALL/360"
* OPTION VERSION "SYSTEM/360"
* OPTION VERSION "SYSTEM/370"
Added alphabet extenders. $ is a string variable.
* OPTION ZONE integer
Sets the PRINT zone width.
Setting the value to zero restores the default.
* REPEAT - UNTIL added
REPEAT
...
EXIT REPEAT
...
UNTIL expression ' exits when expression != 0
* SPC( X ) and TAB( X )
No longer use control codes.
* UNTIL - UEND removed (to add REPEAT - UNTIL)
Here is a work-around for existin code using UNTIL-UEND:
UNITL expression -->> WHILE NOT expression
... ...
EXIT UNTIL -->> EXIT WHILE
... ...
UEND -->> WEND
* from Howard Wulf, AF5NE
Editor's Note: In the official release *ALL* of the test and sample
BASIC programs were removed and packaged in a separate "test" ZIP. I
have extracted those in to the bwbtest folder where most of the
tests were living in previous packages. I've also improved (I hope)
the EOL handling.
- ChipMaster
3 years ago  v3.20
* Implements most of the following BASIC dialects:
OPTION VERSION "BYWATER" ' Bywater BASIC 3
OPTION VERSION "BYWATER-2" ' Bywater BASIC 2
OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC
OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M
OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC
OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC
OPTION VERSION "ECMA-116" ' ANSI Full BASIC
OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC
OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt
OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition
OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition
OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC
OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC
OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC
OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix
OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC
OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC
OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX
OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS
OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC
OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC
OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC
OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1
OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX
* CONST variable [, ...] = value
Assigns the value to variable.
Any later assignment to the variable causus a VARIABLE NOT DECLARED error.
* DIM now supports lower and upper bounds.
OPTION BASE 1
DIM X( 9 ) ' lower bound is 1
DIM Y( 5 TO 9 ) ' lower bound is 5
* DIM now supports virtual variables.
OPTION BASE 1
OPEN "VIRTUAL.DAT" FOR VIRTUAL AS # 3 ' virtual data file
DIM # 3, A( 1000 ) ' array is virtual
LET A( 1000 ) = 0 ' value is written to the file
LET X = A( 1000 ) ' value is read from the file
CLOSE # 3 ' array is no longer valid
* ERROR 27, "Bad DATA"
Occurs when the READ command detects garbage in a DATA command.
* INPUT LINE
Same as LINE INPUT.
* MAT now supports lower and upper bounds.
OPTION BASE 1
MAT X( 9 ) = ZER ' lower bound is 1
MAT Y( 5 TO 9 ) = ZER ' lower bound is 5
MAT X = ZER( 9 ) ' lower bound is 1
MAT Y - ZER( 5 TO 9 ) ' lower bound is 5
* MAXLEN()
Returns the maximum string length.
* OPTION DIGITS integer
Sets the number of significant digits for PRINT.
Setting the value to zero restores the default.
* OPTION EDIT string$
Sets the program name used by the EDIT command.
Setting this to "" disables EDIT command.
* OPTION FILES string$
Sets the program name used by the FILES command.
Setting this to "" disables FILES command.
* OPTION PROMPT string$
Sets the prompt.
* OPTION PUNCT AT char$
Sets the PRINT AT character, commonly "@".
Setting this to "" disables PRINT AT.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT BYTE char$
Sets the BYTE type suffix, commonly "~".
Setting this to "" disables BYTE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT COMMENT char$
Sets the trailing COMMENT character, commonly "'".
Setting this to "" disables trailing comments.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT CURRENCY char$
Sets the CURRENCY type suffix, commonly "@".
Setting this to "" disables CURRENCY suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT DOUBLE char$
Sets the DOUBLE type suffix, commonly "#".
Setting this to "" disables DOUBLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT FILENUM char$
Sets the FILE NUMBER prefix, commonly "#".
Setting this to "" disables the FILE NUMBER prefix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT IMAGE char$
Sets the shortcut IMAGE character, commonly ":".
Setting this to "" disables the shortcut IMAGE character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INPUT char$
Sets the shortcut INPUT character, commonly "!".
Setting this to "" disables the shortcut INPUT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INTEGER char$
Sets the INTEGER type suffix, commonly "%".
Setting this to "" disables INTEGER suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LONG char$
Sets the LONG type suffix, commonly "&".
Setting this to "" disables LONG suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LPAREN char$
Sets the LEFT PARENTHESIS character, commonly "(".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT PRINT char$
Sets the shortcut PRINT character, commonly "?".
Setting this to "" disables the shortcut PRINT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT QUOTE char$
Sets the QUOTE character, commonly """".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT RPAREN char$
Sets the RIGHT PARENTHESIS character, commonly ")".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT SINGLE char$
Sets the SINGLE type suffix, commonly "!".
Setting this to "" disables SINGLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STATEMENT char$
Sets the shortcut STATEMENT seperator character, commonly ":".
Setting this to "" disables the STATEMENT seperator.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STRING char$
Sets the STRING type suffix, commonly "$".
Setting this to "" disables STRING suffix.
Setting this to a non-punctuation character is not supported.
* OPTION RECLEN integer
Sets the default record length for RANDOM files, commonly 128.
Setting thisto zero means there is no default RANDOM record
length, so the record length must be specified in the OPEN
statement.
With OPTION RECLEN 128:
OPEN "FILE.DAT" FOR RANDOM AS #3
is considered to be the same as
OPEN "FILE.DAT" FOR RANDOM AS #3 LEN 128
With OPTION RECLEN 0:
OPEN "FILE.DAT" FOR RANDOM AS #3
causes an error.
* OPTION RENUM string$
Sets the program name used by the RENUM command.
Setting this to "" disables RENUM command.
* OPTION SCALE integer
Sets the number of digits to round after the decimal point for PRINT.
Setting the value to zero disables rounding.
* OPTION USING DIGIT
* OPTION USING COMMA
* OPTION USING PERIOD
* OPTION USING PLUS
* OPTION USING MINUS
* OPTION USING EXRAD
* OPTION USING DOLLAR
* OPTION USING FILLER
* OPTION USING LITERAL
* OPTION USING FIRST
* OPTION USING ALL
* OPTION USING LENGTH
Sets the characters recognized by PRINT USING.
Setting these to a non-punctuation character is not supported.
* OPTION VERSION now requires a string instead of a literal.
Some version names have changed.
* OPTION VERSION "PDP-8"
Added LPT, PTP, PTR, TTY, TTY IN and TTY OUT commands.
Added GET() and PUT() functions.
* OPTION VERSION "CALL/360"
* OPTION VERSION "SYSTEM/360"
* OPTION VERSION "SYSTEM/370"
Added alphabet extenders. $ is a string variable.
* OPTION ZONE integer
Sets the PRINT zone width.
Setting the value to zero restores the default.
* REPEAT - UNTIL added
REPEAT
...
EXIT REPEAT
...
UNTIL expression ' exits when expression != 0
* SPC( X ) and TAB( X )
No longer use control codes.
* UNTIL - UEND removed (to add REPEAT - UNTIL)
Here is a work-around for existin code using UNTIL-UEND:
UNITL expression -->> WHILE NOT expression
... ...
EXIT UNTIL -->> EXIT WHILE
... ...
UEND -->> WEND
* from Howard Wulf, AF5NE
Editor's Note: In the official release *ALL* of the test and sample
BASIC programs were removed and packaged in a separate "test" ZIP. I
have extracted those in to the bwbtest folder where most of the
tests were living in previous packages. I've also improved (I hope)
the EOL handling.
- ChipMaster
3 years ago  v3.20
* Implements most of the following BASIC dialects:
OPTION VERSION "BYWATER" ' Bywater BASIC 3
OPTION VERSION "BYWATER-2" ' Bywater BASIC 2
OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC
OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M
OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC
OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC
OPTION VERSION "ECMA-116" ' ANSI Full BASIC
OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC
OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt
OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition
OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition
OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC
OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC
OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC
OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix
OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC
OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC
OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX
OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS
OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC
OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC
OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC
OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1
OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX
* CONST variable [, ...] = value
Assigns the value to variable.
Any later assignment to the variable causus a VARIABLE NOT DECLARED error.
* DIM now supports lower and upper bounds.
OPTION BASE 1
DIM X( 9 ) ' lower bound is 1
DIM Y( 5 TO 9 ) ' lower bound is 5
* DIM now supports virtual variables.
OPTION BASE 1
OPEN "VIRTUAL.DAT" FOR VIRTUAL AS # 3 ' virtual data file
DIM # 3, A( 1000 ) ' array is virtual
LET A( 1000 ) = 0 ' value is written to the file
LET X = A( 1000 ) ' value is read from the file
CLOSE # 3 ' array is no longer valid
* ERROR 27, "Bad DATA"
Occurs when the READ command detects garbage in a DATA command.
* INPUT LINE
Same as LINE INPUT.
* MAT now supports lower and upper bounds.
OPTION BASE 1
MAT X( 9 ) = ZER ' lower bound is 1
MAT Y( 5 TO 9 ) = ZER ' lower bound is 5
MAT X = ZER( 9 ) ' lower bound is 1
MAT Y - ZER( 5 TO 9 ) ' lower bound is 5
* MAXLEN()
Returns the maximum string length.
* OPTION DIGITS integer
Sets the number of significant digits for PRINT.
Setting the value to zero restores the default.
* OPTION EDIT string$
Sets the program name used by the EDIT command.
Setting this to "" disables EDIT command.
* OPTION FILES string$
Sets the program name used by the FILES command.
Setting this to "" disables FILES command.
* OPTION PROMPT string$
Sets the prompt.
* OPTION PUNCT AT char$
Sets the PRINT AT character, commonly "@".
Setting this to "" disables PRINT AT.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT BYTE char$
Sets the BYTE type suffix, commonly "~".
Setting this to "" disables BYTE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT COMMENT char$
Sets the trailing COMMENT character, commonly "'".
Setting this to "" disables trailing comments.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT CURRENCY char$
Sets the CURRENCY type suffix, commonly "@".
Setting this to "" disables CURRENCY suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT DOUBLE char$
Sets the DOUBLE type suffix, commonly "#".
Setting this to "" disables DOUBLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT FILENUM char$
Sets the FILE NUMBER prefix, commonly "#".
Setting this to "" disables the FILE NUMBER prefix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT IMAGE char$
Sets the shortcut IMAGE character, commonly ":".
Setting this to "" disables the shortcut IMAGE character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INPUT char$
Sets the shortcut INPUT character, commonly "!".
Setting this to "" disables the shortcut INPUT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INTEGER char$
Sets the INTEGER type suffix, commonly "%".
Setting this to "" disables INTEGER suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LONG char$
Sets the LONG type suffix, commonly "&".
Setting this to "" disables LONG suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LPAREN char$
Sets the LEFT PARENTHESIS character, commonly "(".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT PRINT char$
Sets the shortcut PRINT character, commonly "?".
Setting this to "" disables the shortcut PRINT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT QUOTE char$
Sets the QUOTE character, commonly """".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT RPAREN char$
Sets the RIGHT PARENTHESIS character, commonly ")".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT SINGLE char$
Sets the SINGLE type suffix, commonly "!".
Setting this to "" disables SINGLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STATEMENT char$
Sets the shortcut STATEMENT seperator character, commonly ":".
Setting this to "" disables the STATEMENT seperator.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STRING char$
Sets the STRING type suffix, commonly "$".
Setting this to "" disables STRING suffix.
Setting this to a non-punctuation character is not supported.
* OPTION RECLEN integer
Sets the default record length for RANDOM files, commonly 128.
Setting thisto zero means there is no default RANDOM record
length, so the record length must be specified in the OPEN
statement.
With OPTION RECLEN 128:
OPEN "FILE.DAT" FOR RANDOM AS #3
is considered to be the same as
OPEN "FILE.DAT" FOR RANDOM AS #3 LEN 128
With OPTION RECLEN 0:
OPEN "FILE.DAT" FOR RANDOM AS #3
causes an error.
* OPTION RENUM string$
Sets the program name used by the RENUM command.
Setting this to "" disables RENUM command.
* OPTION SCALE integer
Sets the number of digits to round after the decimal point for PRINT.
Setting the value to zero disables rounding.
* OPTION USING DIGIT
* OPTION USING COMMA
* OPTION USING PERIOD
* OPTION USING PLUS
* OPTION USING MINUS
* OPTION USING EXRAD
* OPTION USING DOLLAR
* OPTION USING FILLER
* OPTION USING LITERAL
* OPTION USING FIRST
* OPTION USING ALL
* OPTION USING LENGTH
Sets the characters recognized by PRINT USING.
Setting these to a non-punctuation character is not supported.
* OPTION VERSION now requires a string instead of a literal.
Some version names have changed.
* OPTION VERSION "PDP-8"
Added LPT, PTP, PTR, TTY, TTY IN and TTY OUT commands.
Added GET() and PUT() functions.
* OPTION VERSION "CALL/360"
* OPTION VERSION "SYSTEM/360"
* OPTION VERSION "SYSTEM/370"
Added alphabet extenders. $ is a string variable.
* OPTION ZONE integer
Sets the PRINT zone width.
Setting the value to zero restores the default.
* REPEAT - UNTIL added
REPEAT
...
EXIT REPEAT
...
UNTIL expression ' exits when expression != 0
* SPC( X ) and TAB( X )
No longer use control codes.
* UNTIL - UEND removed (to add REPEAT - UNTIL)
Here is a work-around for existin code using UNTIL-UEND:
UNITL expression -->> WHILE NOT expression
... ...
EXIT UNTIL -->> EXIT WHILE
... ...
UEND -->> WEND
* from Howard Wulf, AF5NE
Editor's Note: In the official release *ALL* of the test and sample
BASIC programs were removed and packaged in a separate "test" ZIP. I
have extracted those in to the bwbtest folder where most of the
tests were living in previous packages. I've also improved (I hope)
the EOL handling.
- ChipMaster
3 years ago  v3.20
* Implements most of the following BASIC dialects:
OPTION VERSION "BYWATER" ' Bywater BASIC 3
OPTION VERSION "BYWATER-2" ' Bywater BASIC 2
OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC
OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M
OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC
OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC
OPTION VERSION "ECMA-116" ' ANSI Full BASIC
OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC
OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt
OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition
OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition
OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC
OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC
OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC
OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix
OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC
OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC
OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX
OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS
OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC
OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC
OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC
OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1
OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX
* CONST variable [, ...] = value
Assigns the value to variable.
Any later assignment to the variable causus a VARIABLE NOT DECLARED error.
* DIM now supports lower and upper bounds.
OPTION BASE 1
DIM X( 9 ) ' lower bound is 1
DIM Y( 5 TO 9 ) ' lower bound is 5
* DIM now supports virtual variables.
OPTION BASE 1
OPEN "VIRTUAL.DAT" FOR VIRTUAL AS # 3 ' virtual data file
DIM # 3, A( 1000 ) ' array is virtual
LET A( 1000 ) = 0 ' value is written to the file
LET X = A( 1000 ) ' value is read from the file
CLOSE # 3 ' array is no longer valid
* ERROR 27, "Bad DATA"
Occurs when the READ command detects garbage in a DATA command.
* INPUT LINE
Same as LINE INPUT.
* MAT now supports lower and upper bounds.
OPTION BASE 1
MAT X( 9 ) = ZER ' lower bound is 1
MAT Y( 5 TO 9 ) = ZER ' lower bound is 5
MAT X = ZER( 9 ) ' lower bound is 1
MAT Y - ZER( 5 TO 9 ) ' lower bound is 5
* MAXLEN()
Returns the maximum string length.
* OPTION DIGITS integer
Sets the number of significant digits for PRINT.
Setting the value to zero restores the default.
* OPTION EDIT string$
Sets the program name used by the EDIT command.
Setting this to "" disables EDIT command.
* OPTION FILES string$
Sets the program name used by the FILES command.
Setting this to "" disables FILES command.
* OPTION PROMPT string$
Sets the prompt.
* OPTION PUNCT AT char$
Sets the PRINT AT character, commonly "@".
Setting this to "" disables PRINT AT.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT BYTE char$
Sets the BYTE type suffix, commonly "~".
Setting this to "" disables BYTE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT COMMENT char$
Sets the trailing COMMENT character, commonly "'".
Setting this to "" disables trailing comments.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT CURRENCY char$
Sets the CURRENCY type suffix, commonly "@".
Setting this to "" disables CURRENCY suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT DOUBLE char$
Sets the DOUBLE type suffix, commonly "#".
Setting this to "" disables DOUBLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT FILENUM char$
Sets the FILE NUMBER prefix, commonly "#".
Setting this to "" disables the FILE NUMBER prefix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT IMAGE char$
Sets the shortcut IMAGE character, commonly ":".
Setting this to "" disables the shortcut IMAGE character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INPUT char$
Sets the shortcut INPUT character, commonly "!".
Setting this to "" disables the shortcut INPUT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INTEGER char$
Sets the INTEGER type suffix, commonly "%".
Setting this to "" disables INTEGER suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LONG char$
Sets the LONG type suffix, commonly "&".
Setting this to "" disables LONG suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LPAREN char$
Sets the LEFT PARENTHESIS character, commonly "(".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT PRINT char$
Sets the shortcut PRINT character, commonly "?".
Setting this to "" disables the shortcut PRINT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT QUOTE char$
Sets the QUOTE character, commonly """".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT RPAREN char$
Sets the RIGHT PARENTHESIS character, commonly ")".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT SINGLE char$
Sets the SINGLE type suffix, commonly "!".
Setting this to "" disables SINGLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STATEMENT char$
Sets the shortcut STATEMENT seperator character, commonly ":".
Setting this to "" disables the STATEMENT seperator.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STRING char$
Sets the STRING type suffix, commonly "$".
Setting this to "" disables STRING suffix.
Setting this to a non-punctuation character is not supported.
* OPTION RECLEN integer
Sets the default record length for RANDOM files, commonly 128.
Setting thisto zero means there is no default RANDOM record
length, so the record length must be specified in the OPEN
statement.
With OPTION RECLEN 128:
OPEN "FILE.DAT" FOR RANDOM AS #3
is considered to be the same as
OPEN "FILE.DAT" FOR RANDOM AS #3 LEN 128
With OPTION RECLEN 0:
OPEN "FILE.DAT" FOR RANDOM AS #3
causes an error.
* OPTION RENUM string$
Sets the program name used by the RENUM command.
Setting this to "" disables RENUM command.
* OPTION SCALE integer
Sets the number of digits to round after the decimal point for PRINT.
Setting the value to zero disables rounding.
* OPTION USING DIGIT
* OPTION USING COMMA
* OPTION USING PERIOD
* OPTION USING PLUS
* OPTION USING MINUS
* OPTION USING EXRAD
* OPTION USING DOLLAR
* OPTION USING FILLER
* OPTION USING LITERAL
* OPTION USING FIRST
* OPTION USING ALL
* OPTION USING LENGTH
Sets the characters recognized by PRINT USING.
Setting these to a non-punctuation character is not supported.
* OPTION VERSION now requires a string instead of a literal.
Some version names have changed.
* OPTION VERSION "PDP-8"
Added LPT, PTP, PTR, TTY, TTY IN and TTY OUT commands.
Added GET() and PUT() functions.
* OPTION VERSION "CALL/360"
* OPTION VERSION "SYSTEM/360"
* OPTION VERSION "SYSTEM/370"
Added alphabet extenders. $ is a string variable.
* OPTION ZONE integer
Sets the PRINT zone width.
Setting the value to zero restores the default.
* REPEAT - UNTIL added
REPEAT
...
EXIT REPEAT
...
UNTIL expression ' exits when expression != 0
* SPC( X ) and TAB( X )
No longer use control codes.
* UNTIL - UEND removed (to add REPEAT - UNTIL)
Here is a work-around for existin code using UNTIL-UEND:
UNITL expression -->> WHILE NOT expression
... ...
EXIT UNTIL -->> EXIT WHILE
... ...
UEND -->> WEND
* from Howard Wulf, AF5NE
Editor's Note: In the official release *ALL* of the test and sample
BASIC programs were removed and packaged in a separate "test" ZIP. I
have extracted those in to the bwbtest folder where most of the
tests were living in previous packages. I've also improved (I hope)
the EOL handling.
- ChipMaster
3 years ago  v3.20
* Implements most of the following BASIC dialects:
OPTION VERSION "BYWATER" ' Bywater BASIC 3
OPTION VERSION "BYWATER-2" ' Bywater BASIC 2
OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC
OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M
OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC
OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC
OPTION VERSION "ECMA-116" ' ANSI Full BASIC
OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC
OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt
OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition
OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition
OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC
OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC
OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC
OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix
OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC
OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC
OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX
OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS
OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC
OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC
OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC
OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1
OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX
* CONST variable [, ...] = value
Assigns the value to variable.
Any later assignment to the variable causus a VARIABLE NOT DECLARED error.
* DIM now supports lower and upper bounds.
OPTION BASE 1
DIM X( 9 ) ' lower bound is 1
DIM Y( 5 TO 9 ) ' lower bound is 5
* DIM now supports virtual variables.
OPTION BASE 1
OPEN "VIRTUAL.DAT" FOR VIRTUAL AS # 3 ' virtual data file
DIM # 3, A( 1000 ) ' array is virtual
LET A( 1000 ) = 0 ' value is written to the file
LET X = A( 1000 ) ' value is read from the file
CLOSE # 3 ' array is no longer valid
* ERROR 27, "Bad DATA"
Occurs when the READ command detects garbage in a DATA command.
* INPUT LINE
Same as LINE INPUT.
* MAT now supports lower and upper bounds.
OPTION BASE 1
MAT X( 9 ) = ZER ' lower bound is 1
MAT Y( 5 TO 9 ) = ZER ' lower bound is 5
MAT X = ZER( 9 ) ' lower bound is 1
MAT Y - ZER( 5 TO 9 ) ' lower bound is 5
* MAXLEN()
Returns the maximum string length.
* OPTION DIGITS integer
Sets the number of significant digits for PRINT.
Setting the value to zero restores the default.
* OPTION EDIT string$
Sets the program name used by the EDIT command.
Setting this to "" disables EDIT command.
* OPTION FILES string$
Sets the program name used by the FILES command.
Setting this to "" disables FILES command.
* OPTION PROMPT string$
Sets the prompt.
* OPTION PUNCT AT char$
Sets the PRINT AT character, commonly "@".
Setting this to "" disables PRINT AT.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT BYTE char$
Sets the BYTE type suffix, commonly "~".
Setting this to "" disables BYTE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT COMMENT char$
Sets the trailing COMMENT character, commonly "'".
Setting this to "" disables trailing comments.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT CURRENCY char$
Sets the CURRENCY type suffix, commonly "@".
Setting this to "" disables CURRENCY suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT DOUBLE char$
Sets the DOUBLE type suffix, commonly "#".
Setting this to "" disables DOUBLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT FILENUM char$
Sets the FILE NUMBER prefix, commonly "#".
Setting this to "" disables the FILE NUMBER prefix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT IMAGE char$
Sets the shortcut IMAGE character, commonly ":".
Setting this to "" disables the shortcut IMAGE character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INPUT char$
Sets the shortcut INPUT character, commonly "!".
Setting this to "" disables the shortcut INPUT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT INTEGER char$
Sets the INTEGER type suffix, commonly "%".
Setting this to "" disables INTEGER suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LONG char$
Sets the LONG type suffix, commonly "&".
Setting this to "" disables LONG suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT LPAREN char$
Sets the LEFT PARENTHESIS character, commonly "(".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT PRINT char$
Sets the shortcut PRINT character, commonly "?".
Setting this to "" disables the shortcut PRINT character.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT QUOTE char$
Sets the QUOTE character, commonly """".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT RPAREN char$
Sets the RIGHT PARENTHESIS character, commonly ")".
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT SINGLE char$
Sets the SINGLE type suffix, commonly "!".
Setting this to "" disables SINGLE suffix.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STATEMENT char$
Sets the shortcut STATEMENT seperator character, commonly ":".
Setting this to "" disables the STATEMENT seperator.
Setting this to a non-punctuation character is not supported.
* OPTION PUNCT STRING char$
Sets the STRING type suffix, commonly "$".
Setting this to "" disables STRING suffix.
Setting this to a non-punctuation character is not supported.
* OPTION RECLEN integer
Sets the default record length for RANDOM files, commonly 128.
Setting thisto zero means there is no default RANDOM record
length, so the record length must be specified in the OPEN
statement.
With OPTION RECLEN 128:
OPEN "FILE.DAT" FOR RANDOM AS #3
is considered to be the same as
OPEN "FILE.DAT" FOR RANDOM AS #3 LEN 128
With OPTION RECLEN 0:
OPEN "FILE.DAT" FOR RANDOM AS #3
causes an error.
* OPTION RENUM string$
Sets the program name used by the RENUM command.
Setting this to "" disables RENUM command.
* OPTION SCALE integer
Sets the number of digits to round after the decimal point for PRINT.
Setting the value to zero disables rounding.
* OPTION USING DIGIT
* OPTION USING COMMA
* OPTION USING PERIOD
* OPTION USING PLUS
* OPTION USING MINUS
* OPTION USING EXRAD
* OPTION USING DOLLAR
* OPTION USING FILLER
* OPTION USING LITERAL
* OPTION USING FIRST
* OPTION USING ALL
* OPTION USING LENGTH
Sets the characters recognized by PRINT USING.
Setting these to a non-punctuation character is not supported.
* OPTION VERSION now requires a string instead of a literal.
Some version names have changed.
* OPTION VERSION "PDP-8"
Added LPT, PTP, PTR, TTY, TTY IN and TTY OUT commands.
Added GET() and PUT() functions.
* OPTION VERSION "CALL/360"
* OPTION VERSION "SYSTEM/360"
* OPTION VERSION "SYSTEM/370"
Added alphabet extenders. $ is a string variable.
* OPTION ZONE integer
Sets the PRINT zone width.
Setting the value to zero restores the default.
* REPEAT - UNTIL added
REPEAT
...
EXIT REPEAT
...
UNTIL expression ' exits when expression != 0
* SPC( X ) and TAB( X )
No longer use control codes.
* UNTIL - UEND removed (to add REPEAT - UNTIL)
Here is a work-around for existin code using UNTIL-UEND:
UNITL expression -->> WHILE NOT expression
... ...
EXIT UNTIL -->> EXIT WHILE
... ...
UEND -->> WEND
* from Howard Wulf, AF5NE
Editor's Note: In the official release *ALL* of the test and sample
BASIC programs were removed and packaged in a separate "test" ZIP. I
have extracted those in to the bwbtest folder where most of the
tests were living in previous packages. I've also improved (I hope)
the EOL handling.
- ChipMaster
3 years ago |
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497 |
-
-
- README file for
-
-
- Bywater BASIC Interpreter, version 3.20
- ---------------------------------------------
-
- Copyright (c) 1993, Ted A. Campbell
- for bwBASIC version 2.10, 11 October 1993
-
- Version 2.20 modifications by Jon B. Volkoff,
- 25 November 1995
-
- Patch level 1 release by Jon B. Volkoff,
- 15 March 1996
-
- Patch level 2 release by Jon B. Volkoff,
- 11 October 1997
-
- Version 2.30 modifications by Paul Edwards,
- 5 March 2008
-
- Version 2.40 modifications by Paul Edwards,
- 26 Jan 2009
-
- Version 2.50 modifications by Paul Edwards,
- 4 June 2009
-
- Version 2.60 modifications by Paul Edwards,
- 6 November 2012
-
- Version 2.61 modifications by Paul Edwards,
- 4 August 2014
-
- Version 3.00 modifications by Howard Wulf, AF5NE
- 12 May 2015
-
- Version 3.10 modifications by Howard Wulf, AF5NE
- 27 July 2016
-
- Version 3.20 modifications by Howard Wulf, AF5NE
- 4 June 2017
-
- Version 3.20c modifications by Ken Martin
- Nov. 2019 Aug. 2020
-
-
-
-
- DESCRIPTION:
-
- The Bywater BASIC Interpreter (bwBASIC) implements a large
- superset of the ANSI Standard for Minimal BASIC (X3.60-1978),
- a significant subset of the ANSI Standard for Full BASIC
- (X3.113-1987), and many classic BASIC dialects in C. bwBASIC
- seeks to be as portable as possible.
-
- This version of Bywater BASIC is released under the terms of the
- GNU General Public License (GPL), which is distributed with this
- software in the file "COPYING". The GPL specifies the terms
- under which users may copy and use the software in this distribution.
-
- A separate license is available for commercial distribution,
- for information on which you should contact the author.
-
-
-
- OBTAINING THE CODE:
-
- The executable code for bwbasic-3.20c is available from
- https://github.com/kenmartin-unix/Bwbasic
-
- The source code for older versions bwBASIC is available from
- http://bwbasic.sourceforge.net
-
-
- COMMUNICATIONS:
-
- email: tcamp@delphi.com (for Ted Campbell)
- eidetics@cerf.net (for Jon Volkoff)
- mutazilah@gmail.com (for Paul Edwards)
- ken.at.github@gmail.com (for Ken Martin)
-
-
- A LIST OF BASIC COMMANDS AND FUNCTIONS IMPLEMENTED in bwBASIC:
-
- The complete list of over 500 commands, functions and operators is
- in the file "ALL.txt" in the DOCS directory. Documentation for each
- dialect is also in the DOCS directory. Be aware that the commands,
- functions and operators available depend upon the particular BASIC
- dialect selected using the OPTION VERSION command.
-
-
- CHANGE HISTORY
-
- CHANGES FROM 3.20 to 3.20c
-
- * General cleanup and bug fixes.
- Added a search for profile.bas in Windows
- C:\Bwbasic
- And Linux
- /usr/share/bwbasic
-
- CHANGES FROM 3.10 to 3.20
-
- * Implements most of the following BASIC dialects:
- OPTION VERSION "BYWATER" ' Bywater BASIC 3
- OPTION VERSION "BYWATER-2" ' Bywater BASIC 2
- OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC
- OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M
- OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC
- OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC
- OPTION VERSION "ECMA-116" ' ANSI Full BASIC
- OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC
- OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt
- OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition
- OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition
- OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC
- OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC
- OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC
- OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix
- OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC
- OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC
- OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX
- OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS
- OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC
- OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC
- OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC
- OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1
- OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX
-
- * CONST variable [, ...] = value
- Assigns the value to variable.
- Any later assignment to the variable causus a VARIABLE NOT DECLARED error.
-
- * DIM now supports lower and upper bounds.
- OPTION BASE 1
- DIM X( 9 ) ' lower bound is 1
- DIM Y( 5 TO 9 ) ' lower bound is 5
-
- * DIM now supports virtual variables.
- OPTION BASE 1
- OPEN "VIRTUAL.DAT" FOR VIRTUAL AS # 3 ' virtual data file
- DIM # 3, A( 1000 ) ' array is virtual
- LET A( 1000 ) = 0 ' value is written to the file
- LET X = A( 1000 ) ' value is read from the file
- CLOSE # 3 ' array is no longer valid
-
- * ERROR 27, "Bad DATA"
- Occurs when the READ command detects garbage in a DATA command.
-
- * INPUT LINE
- Same as LINE INPUT.
-
- * MAT now supports lower and upper bounds.
- OPTION BASE 1
- MAT X( 9 ) = ZER ' lower bound is 1
- MAT Y( 5 TO 9 ) = ZER ' lower bound is 5
- MAT X = ZER( 9 ) ' lower bound is 1
- MAT Y - ZER( 5 TO 9 ) ' lower bound is 5
-
- * MAXLEN()
- Returns the maximum string length.
-
- * OPTION DIGITS integer
- Sets the number of significant digits for PRINT.
- Setting the value to zero restores the default.
-
- * OPTION EDIT string$
- Sets the program name used by the EDIT command.
- Setting this to "" disables EDIT command.
-
- * OPTION FILES string$
- Sets the program name used by the FILES command.
- Setting this to "" disables FILES command.
-
- * OPTION PROMPT string$
- Sets the prompt.
-
- * OPTION PUNCT AT char$
- Sets the PRINT AT character, commonly "@".
- Setting this to "" disables PRINT AT.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT BYTE char$
- Sets the BYTE type suffix, commonly "~".
- Setting this to "" disables BYTE suffix.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT COMMENT char$
- Sets the trailing COMMENT character, commonly "'".
- Setting this to "" disables trailing comments.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT CURRENCY char$
- Sets the CURRENCY type suffix, commonly "@".
- Setting this to "" disables CURRENCY suffix.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT DOUBLE char$
- Sets the DOUBLE type suffix, commonly "#".
- Setting this to "" disables DOUBLE suffix.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT FILENUM char$
- Sets the FILE NUMBER prefix, commonly "#".
- Setting this to "" disables the FILE NUMBER prefix.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT IMAGE char$
- Sets the shortcut IMAGE character, commonly ":".
- Setting this to "" disables the shortcut IMAGE character.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT INPUT char$
- Sets the shortcut INPUT character, commonly "!".
- Setting this to "" disables the shortcut INPUT character.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT INTEGER char$
- Sets the INTEGER type suffix, commonly "%".
- Setting this to "" disables INTEGER suffix.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT LONG char$
- Sets the LONG type suffix, commonly "&".
- Setting this to "" disables LONG suffix.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT LPAREN char$
- Sets the LEFT PARENTHESIS character, commonly "(".
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT PRINT char$
- Sets the shortcut PRINT character, commonly "?".
- Setting this to "" disables the shortcut PRINT character.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT QUOTE char$
- Sets the QUOTE character, commonly """".
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT RPAREN char$
- Sets the RIGHT PARENTHESIS character, commonly ")".
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT SINGLE char$
- Sets the SINGLE type suffix, commonly "!".
- Setting this to "" disables SINGLE suffix.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT STATEMENT char$
- Sets the shortcut STATEMENT seperator character, commonly ":".
- Setting this to "" disables the STATEMENT seperator.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION PUNCT STRING char$
- Sets the STRING type suffix, commonly "$".
- Setting this to "" disables STRING suffix.
- Setting this to a non-punctuation character is not supported.
-
- * OPTION RECLEN integer
- Sets the default record length for RANDOM files, commonly 128.
- Setting thisto zero means there is no default RANDOM record
- length, so the record length must be specified in the OPEN
- statement.
- With OPTION RECLEN 128:
- OPEN "FILE.DAT" FOR RANDOM AS #3
- is considered to be the same as
- OPEN "FILE.DAT" FOR RANDOM AS #3 LEN 128
- With OPTION RECLEN 0:
- OPEN "FILE.DAT" FOR RANDOM AS #3
- causes an error.
-
- * OPTION RENUM string$
- Sets the program name used by the RENUM command.
- Setting this to "" disables RENUM command.
-
- * OPTION SCALE integer
- Sets the number of digits to round after the decimal point for PRINT.
- Setting the value to zero disables rounding.
-
- * OPTION USING DIGIT
- * OPTION USING COMMA
- * OPTION USING PERIOD
- * OPTION USING PLUS
- * OPTION USING MINUS
- * OPTION USING EXRAD
- * OPTION USING DOLLAR
- * OPTION USING FILLER
- * OPTION USING LITERAL
- * OPTION USING FIRST
- * OPTION USING ALL
- * OPTION USING LENGTH
- Sets the characters recognized by PRINT USING.
- Setting these to a non-punctuation character is not supported.
-
- * OPTION VERSION now requires a string instead of a literal.
- Some version names have changed.
-
- * OPTION VERSION "PDP-8"
- Added LPT, PTP, PTR, TTY, TTY IN and TTY OUT commands.
- Added GET() and PUT() functions.
-
- * OPTION VERSION "CALL/360"
- * OPTION VERSION "SYSTEM/360"
- * OPTION VERSION "SYSTEM/370"
- Added alphabet extenders. $ is a string variable.
-
- * OPTION ZONE integer
- Sets the PRINT zone width.
- Setting the value to zero restores the default.
-
- * REPEAT - UNTIL added
- REPEAT
- ...
- EXIT REPEAT
- ...
- UNTIL expression ' exits when expression != 0
-
- * SPC( X ) and TAB( X )
- No longer use control codes.
-
- * UNTIL - UEND removed (to add REPEAT - UNTIL)
- Here is a work-around for existin code using UNTIL-UEND:
- UNITL expression -->> WHILE NOT expression
- ... ...
- EXIT UNTIL -->> EXIT WHILE
- ... ...
- UEND -->> WEND
-
- * from Howard Wulf, AF5NE
-
-
- CHANGES FROM 3.00 to 3.10
-
- * Implements most of the following BASIC dialects:
- OPTION VERSION DARTMOUTH ' Dartmouth DTSS BASIC
- OPTION VERSION MARK-I ' GE 265 Mainframe BASIC
- OPTION VERSION MARK-II ' GE 435 Mainframe BASIC
- OPTION VERSION SYSTEM-360 ' IBM System/360 BASIC
- OPTION VERSION SYSTEM-370 ' IBM System/370 BASIC
- OPTION VERSION CBASIC-II ' CBASIC-II for CP/M
- OPTION VERSION ECMA-55 ' ANSI Minimal BASIC
- OPTION VERSION HANDBOOK1 ' The BASIC Handbook, 1st Edition
- OPTION VERSION HANDBOOK2 ' The BASIC Handbook, 2nd Edition
- OPTION VERSION TRS-80 ' TRS-80 Model I/III/4 LBASIC
- OPTION VERSION BASIC-80 ' Microsoft BASIC-80 for Xenix
- OPTION VERSION ECMA-116 ' ANSI Full BASIC
-
- * from Howard Wulf, AF5NE
-
-
- CHANGES FROM 2.61 to 3.00
-
- * Code redesign from Howard Wulf, AF5NE
-
-
- CHANGES FROM 2.60 to 2.61
-
- * Bug fix from Matthias Rustler
-
-
- CHANGES FROM 2.50 to 2.60
-
- * New maths functions and append mode support from Edmond Orignac
-
- * Bug fixes
-
-
- CHANGES FROM 2.40 to 2.50
-
- * Bug fixes
-
- * New compilation procedure for MVS and CMS
-
-
- CHANGES FROM 2.30 to 2.40
-
- * Bug fixes from Bill Chatfield
-
- * Updated documentation
-
- * Added support for compiling on CMS (another IBM mainframe OS)
-
-
- CHANGES FROM 2.20pl2 to 2.30
-
- * Minor bug fixes, cosmetic improvements and portability improvements
-
- * Added support for compiling on MVS (IBM mainframe)
-
-
- CHANGES FROM 2.20pl1 to 2.20pl2
-
- bwb_cmd.c
- Fixed calling stack level logic in RETURN statement to prevent erroneous
- "RETURN without GOSUB" messages.
-
- bwb_cnd.c
- bwb_stc.c
-
- Changed continuation condition for WHILE, ELSEIF, and LOOP UNTIL
- to be != FALSE, not == TRUE. More in line with common commercial
- BASIC implementations.
-
- bwb_mth.c
- Fixed initialization in VAL function so that old results are not later
- returned as values.
-
- bwb_var.c
- Added parenthesis level checking to dim_getparams. Using multi-level
- expressions as array subscripts was causing the program to bomb.
-
- bwx_iqc.c
- bwx_tty.c
- bwb_mes.h
- Added second copyright notice.
-
- bwb_dio.c
- bwb_str.c
- Added support for strings longer than 255 characters.
-
- bwb_prn.c
- Disabled tab expansion and print width checks when not printing to a file.
-
- bwb_inp.c
- Fixed LINE INPUT file reads to accommodate strings of length MAXSTRINGSIZE.
-
- bwx_ncu.h
- bwx_ncu.c
- New files. Code for UNIX ncurses interface, compliments of L.C. Benschop,
- Eindhoven, The Netherlands.
-
- Makefile.ncu
- New files. Sample makefile for ncurses implementation.
-
- bwbasic.h
- Revised defines for MININTSIZE and MAXINTSIZE from 16-bit to 32-bit limits.
- Revised define for MAXSTRINGSIZE from 255 to 5000 characters.
- Changed string length from unsigned char to unsigned int to support strings
- longer than 255 characters.
- Added support for new ncurses package.
- Revised VERSION define to reflect above changes.
-
-
- CHANGES FROM 2.20 to 2.20pl1
-
- bwb_cnd.c
-
- Moved init routine for bwb_while so that it would be initialized regardless
- of expression value, not just if TRUE. This was causing some segmentation
- faults in WHILE-WEND loops.
-
- bwb_elx.c
-
- Plugged gaping memory leak. Temp variable space for expression evaluation
- was being allocated but not freed when done (oops!).
-
- bwb_fnc.c
-
- Added check for NULL return from getenv to prevent segmentation faults.
-
- bwbasic.h
- Revised VERSION define to reflect above changes.
-
-
-
- CHANGES FROM 2.10 to 2.20:
-
- * Plugged numerous memory leaks, resolved memory overruns and allocation
- difficulties.
-
- * General cleanup and bug fixes, too many to list in detail here.
- The major problem areas addressed were:
-
- - RUN command with file name argument
- - nested and cascaded FOR-NEXT loops
- - PRINT USING
- - EOF, LOF functions
- - string concatenation
- - operator hierarchy
- - multi-level expression evaluation
- - hex constant interpretation
- - hex and octal constants in INPUT and DATA statements
-
- * Added a CLOSE all files feature (when no argument supplied).
-
- * Added a unary minus sign operator.
-
- * Added a MID$ command to complement the MID$ function.
-
- * Added a RENUM facility in a standalone program.
-
- * Added checking in configure for unistd.h (important on Sun systems).
-
|