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 |
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- Digital Mars Compiler Version 8.42n
- Copyright (C) Digital Mars 2000-2004. All Rights Reserved.
- Written by Walter Bright www.digitalmars.com/ctg/sc.html
- DMC is a one-step program to compile and link C++, C and ASM files.
- Usage ([] means optional, ... means zero or more):
-
- DMC file... [flags...] [@respfile]
-
- file... .CPP, .C or .ASM source, .OBJ object or .LIB library file name
- @respfile... pick up arguments from response file or environment variable
- flags... one of the following:
- -a[1|2|4|8] alignment of struct members -A strict ANSI C/C++
- -Aa enable new[] and delete[] -Ab enable bool
- -Ae enable exception handling -Ar enable RTTI
- -B[e|f|g|j] message language: English, French, German, Japanese
- -c skip the link, do compile only -cpp source files are C++
- -cod generate .cod (assembly) file -C no inline function expansion
- -d generate .dep (make dependency) file
- -D #define DEBUG 1 -Dmacro[=text] define macro
- -e show results of preprocessor -EC do not elide comments
- -EL #line directives not output -f IEEE 754 inline 8087 code
- -fd work around FDIV problem -ff fast inline 8087 code
- -g generate debug info
- -gf disable debug info optimization -gg make static functions global
- -gh symbol info for globals -gl debug line numbers only
- -gp generate pointer validations -gs debug symbol info only
- -gt generate trace prolog/epilog -GTnnnn set data threshold to nnnn
- -H use precompiled headers (ph) -HDdirectory use ph from directory
- -HF[filename] generate ph to filename -HHfilename read ph from filename
- -HIfilename #include "filename" -HO include files only once
- -HS only search -I directories -HX automatic precompiled headers
-
- -Ipath #include file search path -j[0|1|2] Asian language characters
- 0: Japanese 1: Taiwanese and Chinese 2: Korean
- -Jm relaxed type checking -Ju char==unsigned char
- -Jb no empty base class optimization -J chars are unsigned
- -l[listfile] generate list file -L using non-Digital Mars linker
- -Llink specify linker to use -L/switch pass /switch to linker
- -Masm specify assembler to use -M/switch pass /switch to assembler
- -m[tsmclvfnrpxz][do][w][u] set memory model
- s: small code and data m: large code, small data
- c: small code, large data l: large code and data
- v: VCM r: Rational 16 bit DOS Extender
- p: Pharlap 32 bit DOS Extender x: DOSX 32 bit DOS Extender
- z: ZPM 16 bit DOS Extender f: OS/2 2.0 32 bit
- t: .COM file n: Windows 32s/95/98/NT/2000/ME/XP
- d: DOS 16 bit o: OS/2 16 bit
- w: SS != DS u: reload DS
- -Nc function level linking -NL no default library
- -Ns place expr strings in code seg -NS new code seg for each function
- -NTname set code segment name -NV vtables in far data
- -o[-+flag] run optimizer with flag -ooutput output filename
- -p turn off autoprototyping -P default to pascal linkage
- -Pz default to stdcall linkage -r strict prototyping
- -R put switch tables in code seg -s stack overflow checking
- -S always generate stack frame -u suppress predefined macros
- -v[0|1|2] verbose compile -w suppress all warnings
- -wc warn on C style casts
- -wn suppress warning number n -wx treat warnings as errors
- -W{0123ADabdefmrstuvwx-+} Windows prolog/epilog
- -WA Windows EXE
- -WD Windows DLL
- -x turn off error maximum -XD instantiate templates
- -XItemp<type> instantiate template class temp<type>
- -XIfunc(type) instantiate template function func(type)
- -[0|2|3|4|5|6] 8088/286/386/486/Pentium/P6 code
- for (l = l->OtherLine; l->cmdnum != C_END_IF; l = l->OtherLine);
- ^
- bwbasic.c(2440) : Warning 7: possible extraneous ';'
- l = l->OtherLine);
- ^
- bwbasic.c(2446) : Warning 7: possible extraneous ';'
- for (x = x->OtherLine; x->cmdnum != C_END_IF; x = x->OtherLine);
- ^
- bwb_cmd.c(6092) : Warning 7: possible extraneous ';'
- for (x = x->OtherLine; x->cmdnum != C_END_SELECT; x = x->OtherLine);
- ^
- bwb_cmd.c(6097) : Warning 7: possible extraneous ';'
- for (l = l->OtherLine; l->OtherLine != NULL; l = l->OtherLine);
- ^
- bwb_cnd.c(581) : Warning 7: possible extraneous ';'
- for (l = l->OtherLine; l->OtherLine != NULL; l = l->OtherLine);
- ^
- bwb_cnd.c(599) : Warning 7: possible extraneous ';'
- for (l = l->OtherLine; l->OtherLine != NULL; l = l->OtherLine);
- ^
- bwb_cnd.c(899) : Warning 7: possible extraneous ';'
- for (l = l->OtherLine; l->OtherLine != NULL; l = l->OtherLine);
- ^
- bwb_cnd.c(917) : Warning 7: possible extraneous ';'
- for (m = 0; m < n && buff_skip_char (buffer, &q, T->Name[m]); m++);
- ^
- bwb_exp.c(1881) : Warning 7: possible extraneous ';'
- for (; x->cmdnum != C_DATA && x != My->EndMarker; x = x->next);
- ^
- bwb_inp.c(945) : Warning 7: possible extraneous ';'
- x = x->next);
- ^
- bwb_stc.c(1358) : Warning 7: possible extraneous ';'
- for (argn = argv; argn->next != NULL; argn = argn->next);
- ^
- bwb_stc.c(1389) : Warning 7: possible extraneous ';'
- while (line_skip_seperator (l));
- ^
- bwb_var.c(113) : Warning 7: possible extraneous ';'
- bwbasic.c:
- bwb_cmd.c:
- bwb_cnd.c:
- bwb_dio.c:
- bwb_exp.c:
- bwb_fnc.c:
- bwb_inp.c:
- bwb_int.c:
- bwb_prn.c:
- bwb_stc.c:
- bwb_str.c:
- bwb_tbl.c:
- bwb_var.c:
- bwd_cmd.c:
- bwd_fun.c:
- bwx_tty.c:
- link cx+bwbasic+bwb_cmd+bwb_cnd+bwb_dio+bwb_exp+bwb_fnc+bwb_inp+bwb_int+bwb_prn+bwb_stc+bwb_str+bwb_tbl+bwb_var+bwd_cmd+bwd_fun+bwx_tty,BWBASIC.EXE,,X32/noi;
-
|