diff --git a/.gitignore b/.gitignore
index bba3fa4..787b0b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,12 @@
-*.o
-/bwbasic
-/renum
+# compile artifcats
+*.o
+/bwbasic
+/renum
+
+# maintainer artifacts
+editfl
+editfl.bas
+*.geany
+*.orig
+*.rej
+
diff --git a/Bwbasic-1.1-Manual.txt b/Bwbasic-1.1-Manual.txt
new file mode 100644
index 0000000..c331447
--- /dev/null
+++ b/Bwbasic-1.1-Manual.txt
@@ -0,0 +1,441 @@
+
+
+ Bywater BASIC Interpreter/Shell, version 1.10
+ ---------------------------------------------
+
+ Copyright (c) 1992, Ted A. Campbell
+ for bwBASIC version 1.10, 1 November 1992
+
+
+CONTENTS:
+
+ 1. DESCRIPTION
+ 2. TERMS OF USE
+ 3. COMMANDS AND FUNCTIONS IMPLEMENTED
+ 4. SOME NOTES ON USAGE
+ 5. UNIMPLEMENTED COMMANDS AND FUNCTIONS
+ 6. SOME NOTES ON COMPILATION
+ 7. THE STORY OF BYWATER BASIC
+ 8. COMMUNICATIONS
+
+
+1. DESCRIPTION
+
+ The Bywater BASIC Interpreter (bwBASIC) implements a large
+ superset of the ANSI Standard for Minimal BASIC (X3.60-1978)
+ in ANSI C and offers shell program facilities as an extension
+ of BASIC.
+
+ The set of BASIC commands and functions implemented is fairly
+ limited (see section three below), although more commands and
+ functions are implemented than appear in the specification
+ for Minimal BASIC. There are no commands that are terminal- or
+ hardware specific. (Seriously -- CLS may work under bwBASIC
+ on your DOS-based pc, but that is because bwBASIC shells
+ out to DOS when it does not recognize CLS and executes CLS there.)
+
+ The interpreter is slow. Whenever faced with a choice between
+ conceptual clarity and speed, I have consistently chosen
+ the former. The interpreter is the simplest design available,
+ and utilizes no system of intermediate code, which would speed
+ up considerably its operation. As it is, each line is interpreted
+ afresh as the interpreter comes to it.
+
+ bwBASIC implements one feature not available in previous BASIC
+ interpreters: a shell command can be entered interactively at the
+ bwBASIC prompt, and the interpreter will execute it under a
+ command shell. For instance, the command "dir *.bas" can be
+ entered in bwBASIC (under DOS, or "ls -l *.bas" under UNIX) and
+ it will be executed as from the operating system command line.
+ Shell commands can also be given on numbered lines in a bwBASIC
+ program, so that bwBASIC can be used as a shell programming
+ language. bwBASIC's implementation of the RMDIR, CHDIR, MKDIR,
+ NAME, KILL, ENVIRON, and ENVIRON$() commands and functions
+ offer further shell-processing capabilities.
+
+
+2. TERMS OF USE:
+
+ The bwBASIC source code and executables produced from it can be
+ used subject to the following statement which is included in
+ the header to all the source code files:
+
+ All U.S. and international copyrights are claimed by the
+ author. The author grants permission to use this code
+ and software based on it under the following conditions:
+ (a) in general, the code and software based upon it may be
+ used by individuals and by non-profit organizations; (b) it
+ may also be utilized by governmental agencies in any country,
+ with the exception of military agencies; (c) the code and/or
+ software based upon it may not be sold for a profit without
+ an explicit and specific permission from the author, except
+ that a minimal fee may be charged for media on which it is
+ copied, and for copying and handling; (d) the code must be
+ distributed in the form in which it has been released by the
+ author; and (e) the code and software based upon it may not
+ be used for illegal activities.
+
+
+3. BASIC COMMANDS AND FUNCTIONS IMPLEMENTED:
+
+ ABS( number )
+ ASC( string$ )
+ ATN( number )
+ CHAIN [MERGE] file-name [, line-number] [, ALL]
+ CHR$( number )
+ CINT( number )
+ CLEAR
+ CLOSE [[#]file-number]...
+ COMMON variable [, variable...]
+ COS( number )
+ CSNG( number )
+ CVD( string$ )
+ CVI( string$ )
+ CVS( string$ )
+ DATA constant[,constant]...
+ DATE$
+ DEF FNname(arg...)] = expression
+ DEFDBL letter[-letter](, letter[-letter])...
+ DEFINT letter[-letter](, letter[-letter])...
+ DEFSNG letter[-letter](, letter[-letter])...
+ DEFSTR letter[-letter](, letter[-letter])...
+ DELETE line[-line]
+ DIM variable(elements...)[variable(elements...)]...
+ END
+ ENVIRON variable-string = string
+ ENVIRON$( variable-string )
+ EOF( device-number )
+ ERASE variable[, variable]...
+ ERL
+ ERR
+ ERROR number
+ EXP( number )
+ FIELD [#] device-number, number AS string-variable [, number AS string-variable...]
+ FOR counter = start TO finish [STEP increment]
+ GET [#] device-number [, record-number]
+ GOSUB line
+ GOTO line
+ HEX$( number )
+ IF expression THEN statement [ELSE statement]
+ INPUT [# device-number]|[;]["prompt string";]list of variables
+ INSTR( [start-position,] string-searched$, string-pattern$ )
+ INT( number )
+ KILL file-name
+ LEFT$( string$, number-of-spaces )
+ LEN( string$ )
+ LET variable = expression
+ LINE INPUT [[#] device-number,]["prompt string";] string-variable$
+ LIST line[-line]
+ LOAD file-name
+ LOC( device-number )
+ LOF( device-number )
+ LOG( number )
+ LSET string-variable$ = expression
+ MERGE file-name
+ MID$( string$, start-position-in-string[, number-of-spaces ] )
+ MKD$( double-value# )
+ MKI$( integer-value% )
+ MKS$( single-value! )
+ NAME old-file-name AS new-file-name
+ NEW
+ NEXT counter
+ OCT$( number )
+ ON variable GOTO|GOSUB line[,line,line,...]
+ ON ERROR GOSUB line
+ OPEN O|I|R, [#]device-number, file-name [,record length]
+ file-name FOR INPUT|OUTPUT|APPEND AS [#]device-number [LEN = record-length]
+ OPTION BASE number
+ POS
+ PRINT [# device-number,][USING format-string$;] expressions...
+ PUT [#] device-number [, record-number]
+ RANDOMIZE number
+ READ variable[, variable]...
+ REM string
+ RESTORE line
+ RETURN
+ RIGHT$( string$, number-of-spaces )
+ RND( number )
+ RSET string-variable$ = expression
+ RUN [line][file-name]
+ SAVE file-name
+ SGN( number )
+ SIN( number )
+ SPACE$( number )
+ SPC( number )
+ SQR( number )
+ STOP
+ STR$( number )
+ STRING$( number, ascii-value|string$ )
+ SWAP variable, variable
+ SYSTEM
+ TAB( number )
+ TAN( number )
+ TIME$
+ TIMER
+ TROFF
+ TRON
+ VAL( string$ )
+ WEND
+ WHILE expression
+ WIDTH [# device-number,] number
+ WRITE [# device-number,] element [, element ]....
+
+ If DIRECTORY_CMDS is set to TRUE when the program is compiled,
+ then the following commands will be available:
+
+ CHDIR pathname
+ MKDIR pathname
+ RMDIR pathname
+
+ If DEBUG is set to TRUE when the program is compiled then
+ the following debugging commands (unique to bwBASIC) will
+ be available:
+
+ VARS (prints a list of all variables)
+ CMDS (prints a list of all commands)
+ FNCS (prints a list of all functions)
+
+ If COMMAND_SHELL is set to TRUE when the program is compiled,
+ then the user may enter a shell command at the bwBASIC prompt.
+
+
+4. SOME NOTES ON USAGE:
+
+ An interactive environment is provided, so that a line with a
+ line number can be entered at the bwBASIC prompt and it will be
+ added to the program in memory.
+
+ Line numbers are not strictly required, but are useful if the
+ interactive enviroment is used for programming. For longer
+ program entry one might prefer to use an ASCII text editor, and
+ in this case lines can be entered without numbers. In this case,
+ however, one will not be able to alter the numberless lines
+ within the interactive environment.
+
+ Command names and function names are not case sensitive,
+ so that "Run" and "RUN" and "run" are equivalent and "abs()"
+ and "ABS()" and "Abs()" are equivalent. HOWEVER: variable
+ names ARE case sensitive in bwbASIC, so that "d$" and "D$"
+ are different variables. This differs from some BASIC
+ implementations where variable names are not case sensitive.
+
+ A filename can be specified on the command line and will be
+ LOADed and RUN immediately, so that the command line
+
+ bwbasic prog.bas
+
+ will load and execute "prog.bas".
+
+ All programs are stored as ASCII text files.
+
+ TRUE is defined as -1 and FALSE is defined as 0 in the default
+ distribution of bwBASIC. These definitions can be changed by
+ those compiling bwBASIC (see file BWBASIC.H).
+
+ Assignment must be made to variables. This differs from some
+ implementations of BASIC where assignment can be made to a
+ function. Implication: "INSTR( 3, x$, y$ ) = z$" will not
+ work under bwBASIC.
+
+ Notes on the implementation of specific commands:
+
+ CVI(), CVD(), CVS(), MKI$(), MKD$(), MKS$(): These functions
+ are implemented, but are dependent on a) the sizes for integer,
+ float, and double values on particular systems, and b) how
+ particular versions of C store these numerical values. The
+ implication is that data files created using these functions
+ on a DOS-based microcomputer may not be translated correctly
+ by bwBASIC running on a Unix-based computer. Similarly, data
+ files created by bwBASIC compiled by one version of C may not be
+ readable by bwBASIC compiled by another version of C (even under
+ the same operating system). So be careful with these.
+
+ ENVIRON: The ENVIRON command requires BASIC strings on either
+ side of the equals sign. Thus:
+
+ environ "PATH" = "/usr/bin"
+
+ It might be noted that this differs from the implementation
+ of ENVIRON in some versions of BASIC, but bwBASIC's ENVIRON
+ allows BASIC variables to be used on either side of the equals
+ sign. Note that the function ENVIRON$() is different from the
+ command, and be aware of the fact that in some operating systems
+ an environment variable set within a program will not be passed
+ to its parent shell.
+
+ ERR: Note that if PROG_ERRORS has been defined when bwBASIC is
+ compiled, the ERR variable will not be set correctly upon
+ errors. It only works when standard error messages are used.
+
+ FOR and NEXT: In this implementation of bwBASIC, a NEXT
+ statement must appear in the first position in a program
+ line; it cannot appear in a line segment beyond a colon.
+
+ INPUT: bwBASIC cannot support the optional feature of INPUT
+ that suppresses the carriage-return and line-feed at the end
+ of the input. This is because ANSI C does not provide for any
+ means of input other than CR-LF-terminated strings.
+
+
+5. UNIMPLEMENTED COMMANDS AND FUNCTIONS
+
+ There are a few items not implemented that have been so long
+ a part of standard BASICs that their absence will seem surprising.
+ In each case, though, their implementation would require opera-
+ ting-system-specific functions or terminal-specific functions
+ that ANSI C cannot provide. Some specific examples:
+
+ CALL In some versions of BASIC, CALL is used to call a
+ machine language subroutine, but machine language
+ routines are highly system-specific. In other
+ BASICs (conforming to the more complete ANSI
+ definition of BASIC), CALL is used to call a
+ named subroutine. Although it's possible that
+ bwBASIC could develop as a numberless BASIC
+ with named subroutine calls, these features
+ are not implemented in this earliest released
+ version.
+
+ CLOAD See CALL above (machine language subroutines).
+
+ CONT See RESUME below (programmer ignorance?).
+
+ DEF USR See CALL above (machine language subroutines).
+
+ EDIT EDIT would be especially nice, but requires some
+ specific knowledge of how particular computers
+ handle interaction between the screen and the
+ keyboard. This knowledge isn't available within
+ the bounds of ANSI C alone ("innerhalb die Grenzen
+ der reinen Vernunft," with apologies to Immanuel
+ Kant).
+
+ FRE() The ability to report the amount of free memory
+ remaining is system-specific due to varying patterns
+ of memory allocation and access; consequently this
+ ability is not present in ANSI C and this function
+ is not available in bwBASIC.
+
+ FILES The FILES command requires a list of files conforming
+ to a specifier; ANSI C does not provide this. When
+ COMMAND_SHELL is defined as TRUE, users might want
+ to issue operating-system commands such as "DIR"
+ (DOS) or "ls -l" (Unix) to get a list of files.
+
+ INKEY$ This function requires a keyboard scan to indicate
+ whether a key is pending. Although this facility
+ is easily available on microcomputers (it is part
+ of the minimal CP/M Operating System), it is not
+ easily available on some more complex systems.
+ Consequently, it's not part of the C standard and
+ bwBASIC has not implemented INKEY$.
+
+ INPUT$() Similar to INKEY$ above, ANSI C by itself is not
+ able to read unechoed keyboard input, and can read
+ keyboard input only after a Carriage-Return has
+ been entered.
+
+ INP Calls to hardware ports, like machine-language
+ routines, are highly system-specific and cannot
+ be implemented in ANSI C alone.
+
+ LLIST See LPRINT below.
+
+ LPOS See LPRINT below.
+
+ LPRINT and LLIST, etc., require access to a printer device,
+ and this varies from one system to another. Users
+ might try OPENing the printer device on their own
+ operating system (e.g., "/dev/lp" on Unix systems,
+ or "PRN" under DOS) and see if printing can be done
+ from bwBASIC in this way.
+
+ NULL In this case, I am convinced that NULL is no longer
+ necessary, since very few printers now require NULLs
+ at the end of lines.
+
+ OUT See INP above (calls to hardware ports).
+
+ PEEK() PEEK and POKE enabled earlier BASICs to address
+ particular memory locations. Although bwBASIC
+ could possibly implement this command (POKE) and
+ this function (PEEK()), the limitation would be
+ highly limited by the different systems for
+ memory access in different systems.
+
+ POKE see PEEK() above.
+
+ RENUM Since unnumbered lines can be entered and
+ executed under bwBASIC, it would not be
+ possible to implement a RENUM routine.
+
+ RESUME Is this possible under ANSI C? If so, I
+ simply have failed to figure it out yet.
+ Mea culpa (but not maxima).
+
+ USR See CALL and DEF USR above (machine language
+ subroutines).
+
+ VARPTR See PEEK and POKE above.
+
+ WAIT See INP and OUT above.
+
+
+6. SOME NOTES ON COMPILATION
+
+ bwBASIC is written in ANSI C and takes advantage of some of the
+ enhancements of ANSI C over the older K&R standard. The program
+ expects to find standard ANSI C include files (such as ).
+ Because there is nothing terminal- or hardware-specific about it,
+ I should hope that it would compile correctly under any ANSI C
+ compiler, but you may have to construct your own makefile.
+
+ Two makefiles are currently provided: "makefile.qcl" will compile
+ the program utilizing the Microsoft QuickC (tm) line-oriented
+ compiler on DOS-based p.c.'s, and "makefile.gcc" will compile
+ the program utilizing the ANSI option of Gnu C++. I have also
+ compiled the program utilizing Borland's Turbo C++ (tm) on DOS-
+ based machines.
+
+ No alterations to flags are necessary for varied environments,
+ but the beginning of file allows the user to set
+ some debugging flags and to control some program defaults.
+ The file has a number of language-specific message
+ sets that can be controlled by setting the appropriate language
+ flag.
+
+
+7. THE STORY OF BYWATER BASIC
+
+ This program was originally begun in 1982 by my grandmother, Mrs.
+ Verda Spell of Beaumont, TX. She was writing the program using
+ an ANSI C compiler on an Osborne I CP/M computer and although my
+ grandfather (Lockwood Spell) had bought an IBM PC with 256k of
+ RAM my grandmother would not use it, paraphrasing George Herbert
+ to the effect that "He who cannot in 64k program, cannot in 512k."
+ She had used Microsoft BASIC and although she had nothing against
+ it she said repeatedly that she didn't understand why Digital
+ Research didn't "sue the socks off of Microsoft" for version 1.0
+ of MSDOS and so I reckon that she hoped to undercut Microsoft's
+ entire market and eventually build a new software empire on
+ the North End of Beaumont. Her programming efforts were cut
+ tragically short when she was thrown from a Beaumont to Port
+ Arthur commuter train in the summer of 1986. I found the source
+ code to bwBASIC on a single-density Osborne diskette in her knitting
+ bag and eventually managed to have it all copied over to a PC
+ diskette. I have revised it slightly prior to this release. You
+ should know, though, that I myself am an historian, not a programmer.
+
+
+8. COMMUNICATIONS:
+
+ Ted A. Campbell
+ Bywater Software
+ P.O. Box 4023
+ Duke Station
+ Durham, NC 27706
+ USA
+
+ email: tcamp@acpub.duke.edu
+
+
diff --git a/Bwbasic-2.1-Manual.txt b/Bwbasic-2.1-Manual.txt
new file mode 100644
index 0000000..934691c
--- /dev/null
+++ b/Bwbasic-2.1-Manual.txt
@@ -0,0 +1,1881 @@
+
+
+
+
+ Bywater BASIC Interpreter/Shell, version 2.10
+ ---------------------------------------------
+
+ Copyright (c) 1993, Ted A. Campbell
+ for bwBASIC version 2.10, 11 October 1993
+
+
+CONTENTS:
+
+ 1. DESCRIPTION
+ 2. TERMS OF USE
+ 3. QUICK REFERENCE LIST OF COMMANDS AND FUNCTIONS
+ 4. GENERAL NOTES ON USAGE
+ 5. EXPANDED REFERENCE FOR COMMANDS AND FUNCTIONS
+ 6. PREDEFINED VARIABLES
+ 7. UNIMPLEMENTED COMMANDS AND FUNCTIONS
+ and AGENDA FOR DEVELOPMENT
+ 8. THE STORY OF BYWATER BASIC
+ 9. COMMUNICATIONS
+
+ The author wishes to express his thanks to Mr. David MacKenzie,
+ who assisted in the development Unix installation and configuration
+ for this version.
+
+
+1. DESCRIPTION
+
+ The Bywater BASIC Interpreter (bwBASIC) implements a large
+ superset of the ANSI Standard for Minimal BASIC (X3.60-1978)
+ and a significant subset of the ANSI Standard for Full BASIC
+ (X3.113-1987) in C. It also offers shell programming facilities
+ as an extension of BASIC. bwBASIC seeks to be as portable
+ as possible.
+
+ bwBASIC can be configured to emulate features, commands, and
+ functions available on different types of BASIC interpreters;
+ see the file INSTALL for further installation information.
+
+ The interpreter is fairly slow. Whenever faced with a choice
+ between conceptual clarity and speed, I have consistently chosen
+ the former. The interpreter is the simplest design available,
+ and utilizes no system of intermediate code, which would speed
+ up considerably its operation. As it is, each line is interpreted
+ afresh as the interpreter comes to it.
+
+ bwBASIC implements one feature not available in previous BASIC
+ interpreters: a shell command can be entered interactively at the
+ bwBASIC prompt, and the interpreter will execute it under a
+ command shell. For instance, the command "dir *.bas" can be
+ entered in bwBASIC (under DOS, or "ls -l *.bas" under UNIX) and
+ it will be executed as from the operating system command line.
+ Shell commands can also be given on numbered lines in a bwBASIC
+ program, so that bwBASIC can be used as a shell programming
+ language. bwBASIC's implementation of the RMDIR, CHDIR, MKDIR,
+ NAME, KILL, ENVIRON, and ENVIRON$() commands and functions
+ offer further shell-processing capabilities.
+
+
+2. TERMS OF USE:
+
+ 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.
+
+
+3. QUICK REFERENCE LIST OF COMMANDS AND FUNCTIONS
+
+ Be aware that many of these commands and functions will not be
+ available unless you have set certain flags in the header files
+ (see the expanded reference section below for dependencies).
+
+ ABS( number )
+ ASC( string$ )
+ ATN( number )
+ CALL subroutine-name
+ CASE ELSE | IF partial-expression | constant
+ CHAIN [MERGE] file-name [, line-number] [, ALL]
+ CHDIR pathname
+ CHR$( number )
+ CINT( number )
+ CLEAR
+ CLOSE [[#]file-number]...
+ CLS
+ COMMON variable [, variable...]
+ COS( number )
+ CSNG( number )
+ CVD( string$ )
+ CVI( string$ )
+ CVS( string$ )
+ DATA constant[,constant]...
+ DATE$
+ DEF FNname(arg...)] = expression
+ DEFDBL letter[-letter](, letter[-letter])...
+ DEFINT letter[-letter](, letter[-letter])...
+ DEFSNG letter[-letter](, letter[-letter])...
+ DEFSTR letter[-letter](, letter[-letter])...
+ DELETE line[-line]
+ DIM variable(elements...)[variable(elements...)]...
+ DO NUM|UNNUM
+ DO [WHILE expression]
+ EDIT
+ ELSE
+ ELSEIF
+ END IF | FUNCTION | SELECT | SUB
+ ENVIRON variable-string = string
+ ENVIRON$( variable-string )
+ EOF( device-number )
+ ERASE variable[, variable]...
+ ERL
+ ERR
+ ERROR number
+ EXP( number )
+ FIELD [#] device-number, number AS string-variable [, number AS string-variable...]
+ FILES filespec$
+ FUNCTION
+ FOR counter = start TO finish [STEP increment]
+ GET [#] device-number [, record-number]
+ GOSUB line | label
+ GOTO line | label
+ HEX$( number )
+ IF expression THEN [statement [ELSE statement]]
+ INKEY$
+ INPUT [# device-number]|[;]["prompt string";]list of variables
+ INSTR( [start-position,] string-searched$, string-pattern$ )
+ INT( number )
+ KILL file-name
+ LEFT$( string$, number-of-spaces )
+ LEN( string$ )
+ LET variable = expression
+ LINE INPUT [[#] device-number,]["prompt string";] string-variable$
+ LIST line[-line]
+ LOAD file-name
+ LOC( device-number )
+ LOCATE line, column
+ LOF( device-number )
+ LOG( number )
+ LOOP [UNTIL expression]
+ LSET string-variable$ = expression
+ MERGE file-name
+ MID$( string$, start-position-in-string[, number-of-spaces ] )
+ MKD$( number )
+ MKDIR pathname
+ MKI$( number )
+ MKS$( number )
+ NAME old-file-name AS new-file-name
+ NEW
+ NEXT [counter]
+ OCT$( number )
+ ON variable GOTO|GOSUB line[,line,line,...]
+ ON ERROR GOSUB line
+ OPEN "O"|"I"|"R", [#]device-number, file-name [,record length]
+ file-name FOR INPUT|OUTPUT|APPEND AS [#]device-number [LEN = record-length]
+ OPTION BASE number
+ POS
+ PRINT [# device-number,][USING format-string$;] expressions...
+ PUT [#] device-number [, record-number]
+ QUIT
+ RANDOMIZE number
+ READ variable[, variable]...
+ REM string
+ RESTORE line
+ RETURN
+ RIGHT$( string$, number-of-spaces )
+ RMDIR pathname
+ RND( number )
+ RSET string-variable$ = expression
+ RUN [line][file-name]
+ SAVE file-name
+ SELECT CASE expression
+ SGN( number )
+ SIN( number )
+ SPACE$( number )
+ SPC( number )
+ SQR( number )
+ STOP
+ STR$( number )
+ STRING$( number, ascii-value|string$ )
+ SUB subroutine-name
+ SWAP variable, variable
+ SYSTEM
+ TAB( number )
+ TAN( number )
+ TIME$
+ TIMER
+ TROFF
+ TRON
+ VAL( string$ )
+ WEND
+ WHILE expression
+ WIDTH [# device-number,] number
+ WRITE [# device-number,] element [, element ]....
+
+
+4. GENERAL NOTES ON USAGE:
+
+ 4.a. Interactive Environment
+
+ An interactive environment is provided if the flag INTERACTIVE
+ is defined as TRUE in bwbasic.h, so that a line with a
+ line number can be entered at the bwBASIC prompt and it will be
+ added to the program in memory.
+
+ Line numbers are not strictly required, but are useful if the
+ interactive enviroment is used for programming. For longer
+ program entry one might prefer to use an ASCII text editor, and
+ in this case lines can be entered without numbers. One can use
+ DO NUM and DO UNNUM to number or unnumber lines. See also the
+ documentation below for the pseudo-command EDIT.
+
+ 4.b. Naming Conventions
+
+ Command names and function names are not case sensitive,
+ so that "Run" and "RUN" and "run" are equivalent and "abs()"
+ and "ABS()" and "Abs()" are equivalent. HOWEVER, variable
+ names ARE case sensitive in bwbASIC, so that "d$" and "D$"
+ are different variables. This differs from some BASIC
+ implementations where variable names are not case sensitive.
+
+ Variable names can use any alphabetic characters, the period
+ and underscore characters and decimal digits (but not in the
+ first position). They can be terminated with '#' or '!' to
+ allow Microsoft-type names, even though the precision is
+ irrelevant to bwBASIC.
+
+ 4.c. Numerical Constants
+
+ Numerical constants may begin with a digit 0-9 (decimal), with
+ the "&H" or "&h" (hexadecimal) or the "&o" or "&O" (octal).
+ Decimal numbers may terminated with 'E', 'e', 'D', or 'd'
+ followed by an exponent number to denote exponential notation.
+ Decimal constants may also be terminated by the '#' or '!'
+ to comply with Microsoft-style precision terminators, although
+ the precision specified will be irrelevant to bwBASIC.
+
+ 4.d. Command-Line Execution
+
+ A filename can be specified on the command line and will be
+ LOADed and RUN immediately, so that the command line
+
+ bwbasic prog.bas
+
+ will load and execute "prog.bas".
+
+ 4.e. Program Storage
+
+ All programs are stored as ASCII text files.
+
+ 4.f. TRUE and FALSE
+
+ TRUE is defined as -1 and FALSE is defined as 0 in the default
+ distribution of bwBASIC. These definitions can be changed by
+ those compiling bwBASIC (see file BWBASIC.H).
+
+ 4.g. Assignments
+
+ Assignment must be made to variables. This differs from some
+ implementations of BASIC where assignment can be made to a
+ function. Implication: "INSTR( 3, x$, y$ ) = z$" will not
+ work under bwBASIC.
+
+ 4.h. Operators and Precedence
+
+ bwBASIC recognizes the following operators, with their level
+ of precedence given (1 = highest):
+
+ ^ 1 exponentiation
+ * 2 multiplication
+ / 2 division
+ \ 3 integer division
+ + 5 addition
+ - 5 subtraction
+ = 6 equality or assignment
+ MOD 4 modulus (remainder) arithmetic
+ <> 7 inequality
+ < 8 less than
+ > 9 greater than
+ <= 10 less than or equal to
+ =< 10 less than or equal to
+ >= 11 greater than or equal to
+ => 11 greater than or equal to
+ NOT 12 negation
+ AND 13 conjunction
+ OR 14 disjunction
+ XOR 15 exclusive or
+ IMP 16 implication
+ EQV 17 equivalence
+
+ 4.h. Numerical Precision (NOT)
+
+ bwBASIC utilizes numbers with only one level of precision. If
+ the flag NUMBER_DOUBLE is defined as TRUE in bwbasic.h, the
+ precision implemented will be that of the C "double" data type;
+ otherwise (default) the precision will be that of the C "float"
+ type. At a number of points there are commands (or pseudo-
+ commands) that seem to recognize Microsoft-style precision
+ distinctions, but for the most part these are just work-around
+ aliases to allow Microsoft-style programs to be run.
+
+
+5. EXPANDED REFERENCE FOR COMMANDS AND FUNCTIONS
+
+ The "Dependencies" listed in the folowing reference materials
+ refers to flags that must be set to TRUE in bwbasic.h for the
+ associated command or function to be implemented. These flags
+ are as follows:
+
+ (core) Commands and Functions in any implementation of
+ bwBASIC; these are the ANSI Minimal BASIC core
+
+ INTERACTIVE Commands supporting the interactive programming
+ environment
+
+ COMMON_CMDS Commands beyond ANSI Minimal BASIC which are common
+ to Full ANSI BASIC and Microsoft BASICs
+
+ COMMON_FUNCS Functions beyond the ANSI Mimimal BASIC core, but
+ common to both ANSI Full BASIC and Microsoft-style
+ BASIC varieties
+
+ UNIX_CMDS Commands which require Unix-style directory and
+ environment routines not specified in C
+
+ STRUCT_CMDS Commands related to structured programming; all
+ of these are part of the Full ANSI BASIC standard
+
+ ANSI_FUNCS Functions unique to ANSI Full BASIC
+
+ MS_CMDS Commands unique to Microsoft BASICs
+
+ MS_FUNCS Functions unique to Microsoft BASICs
+
+
+ ------------------------------------------
+
+ Function: ABS( number )
+
+ Description: ABS returns the absolute value of the argument 'number'.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: ASC( string$ )
+
+ Description: ASC returns the ASCII code for the first letter in
+ the argument string$.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: ATN( number )
+
+ Description: ATN returns the arctangent value of the argument 'number'
+ in radians.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: CALL subroutine-name
+
+ Description: CALL calls a named subroutine (see SUB and END SUB).
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: CASE ELSE | IF partial-expression | constant
+
+ Description: CASE introduces an element of a SELECT CASE statement
+ (see SELECT CASE). CASE IF introduces a conditional
+ SELECT CASE element, and CASE ELSE introduces a
+ default SELECT CASE element.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: CHAIN [MERGE] file-name [, line-number] [, ALL]
+
+ Description: CHAIN passes control to another BASIC program.
+ Variables declared COMMON (q.v.) will be passed
+ to the new program.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: CHDIR pathname$
+
+ Description: CHDIR changes the current directory to that indicated
+ by the argument pathname$.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Function: CHR$( number )
+
+ Description: CHR$ returns a one-character string with the character
+ corresponding to the ASCII code indicated by argument
+ 'number'.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Function: CINT( number )
+
+ Description: CINT returns the truncated integer for the argument
+ 'number'.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: CLEAR
+
+ Description: CLEAR sets all numerical variables to 0, and all
+ string variables to null.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: CLOSE [[#]file-number]...
+
+ Description: CLOSE closes the file indicated by file-number
+ (see OPEN).
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: CLS
+
+ Description: CLS clears the display screen (IBM and compatibles
+ only as of version 2.10).
+
+ Dependencies: IMP_IQC and IMP_CMDLOC
+
+ ------------------------------------------
+
+ Command: CMDS
+
+ Description: CMDS is a debugging command that prints a list
+ of all implemented bwBASIC commands.
+
+ Dependencies: DEBUG
+
+ ------------------------------------------
+
+ Command: COMMON variable [, variable...]
+
+ Description: COMMON designates variables to be passed to a CHAINed
+ program (see CHAIN).
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Function: COS( number )
+
+ Description: COS returns the cosine of the argument 'number'
+ in radians.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: CSNG( number )
+
+ Description: CSNG is a pseudo-function that has no effect under
+ bwBASIC. It replicates a Microsoft-type command
+ that would convert the 'number' to single-precision.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: CVD( string$ )
+
+ Description: CVD converts the argument string$ into a bwBASIC
+ number (precision is irrelevant in bwBASIC since
+ bwBASIC numbers have only one precision).
+
+ Implenentation-Specific Notes:
+
+ CVD(), CVI(), CVS(), MKI$(), MKD$(), MKS$(): These functions
+ are implemented, but are dependent on a) the sizes for integer,
+ float, and double values on particular systems, and b) how
+ particular versions of C store these numerical values. The
+ implication is that data files created using these functions
+ on a DOS-based microcomputer may not be translated correctly
+ by bwBASIC running on a Unix-based computer. Similarly, data
+ files created by bwBASIC compiled by one version of C may not be
+ readable by bwBASIC compiled by another version of C (even under
+ the same operating system). So be careful with these.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: CVI( string$ )
+
+ Description: CVI converts the argument string$ into a bwBASIC
+ number (precision is irrelevant in bwBASIC since
+ bwBASIC numbers have only one precision; see also
+ the note on CVD).
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: CVS( string$ )
+
+ Description: CVI converts the argument string$ into a bwBASIC
+ number (precision is irrelevant in bwBASIC since
+ bwBASIC numbers have only one precision; see also
+ the note on CVD).
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: DATA constant[,constant]...
+
+ Description: DATA stores numerical and string constants to be
+ accessed by READ (q.v.).
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: DATE$
+
+ Description: DATE$ returns the current date based on the computer's
+ internal clock as a string in the form "YYYY-MM-DD".
+ As implemented under bwBASIC, DATE$ cannot be used for
+ assignment (i.e., to set the system date).
+
+ Note: bwBASIC presently (v2.10) does not allow assignment
+ to a function.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Command: DEF FNname(arg...)] = expression
+
+ Description: DEF defines a user-written function. This function
+ corresponds to Microsoft-type implementation, although
+ in bwBASIC DEF is a working equivalent of FUNCTION.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: DEFDBL letter[-letter](, letter[-letter])...
+
+ Description: DEFDBL declares variables with single-letter names
+ as numerical variables (precision is irrelevant in
+ bwBASIC).
+
+ Dependencies: MS_CMDS
+
+ ------------------------------------------
+
+ Command: DEFINT letter[-letter](, letter[-letter])...
+
+ Description: DEFINT declares variables with single-letter names
+ as numerical variables (precision is irrelevant in
+ bwBASIC).
+
+ Dependencies: MS_CMDS
+
+ ------------------------------------------
+
+ Command: DEFSNG letter[-letter](, letter[-letter])...
+
+ Description: DEFSNG declares variables with single-letter names
+ as numerical variables (precision is irrelevant in
+ bwBASIC).
+
+ Dependencies: MS_CMDS
+
+ ------------------------------------------
+
+ Command: DEFSTR letter[-letter](, letter[-letter])...
+
+ Description: DEFSTR declares variables with single-letter names
+ as string variables.
+
+ Dependencies: MS_CMDS
+
+ ------------------------------------------
+
+ Command: DELETE line[-line]
+
+ Description: DELETE deletes program lines indicated by the
+ argument(s). If you want to use DELETE for non-
+ numbered programs, first use DO NUM, then DELETE,
+ then DO UNNUM.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: DIM variable(elements...)[variable(elements...)]...
+
+ Description: DIM specifies variables that have more than one
+ element in a single dimension, i.e., arrayed
+ variables.
+
+ Note: As implemented under bwBASIC, DIM accepts only
+ parentheses as delimiters for variable fields.
+ (Some BASICs allow the use of square brackets.)
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: DO NUM|UNNUM
+
+ Description: DO NUM numbers all lines in a program. The first
+ line is given the number 10, and subsequent lines
+ are numbered consecutively in multiples of 10. DO
+ UNNUM removes all line numbers from a program.
+ NOTE that these functions do nothing to line
+ numbers, e.g., following a GOSUB or GOTO statement;
+ these commands cannot be used as a replacement for
+ RENUM (available in some systems, but not bwBASIC).
+ With these commands, however, one can develop
+ unnumbered programs by entering new lines with numbers,
+ then running DO UNNUM to remove the line numbers.
+ Together with LOAD and SAVE (q.v.) one can use
+ bwBASIC as a primitive text editor.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: DO [WHILE expression]
+
+ Description: DO implements a number of forms of program loops.
+ DO...LOOP simply loops; the only way out is by
+ EXIT; DO WHILE...LOOP loops while "expression" is
+ true (this is equivalent to the older WHILE-WEND
+ loop, also implemented in bwBASIC); DO...LOOP UNTIL
+ loops until the expression following UNTIL is true.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: EDIT
+
+ Description: EDIT is a pseudo-command which calls the text editor
+ specified in the variable BWB.EDITOR$ to edit the
+ program in memory. After the call to the text editor,
+ the (edited) prgram is reloaded into memory. The user
+ normally must specific a valid path and filename in
+ BWB.EDITOR$ before this command will be useful.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: ELSE
+
+ Description: ELSE introduces a default condition in a multi-line IF
+ statement.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: ELSEIF
+
+ Description: ELSEIF introduces a secondary condition in a multi-
+ line IF statement.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: END IF | FUNCTION | SELECT | SUB
+
+ Description: END IF ends a multi-line IF statement. END FUNCTION
+ ends a multi-line function definition. END SELECT
+ ends a SELECT CASE statement. END SUB ends a multi-
+ line subroutine definition.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: ENVIRON variable-string$ = string$
+
+ Description: ENVIRON sets the environment variable identified by
+ variable-string$ to string$.
+
+ It might be noted that this differs from the implementation
+ of ENVIRON in some versions of BASIC, but bwBASIC's ENVIRON
+ allows BASIC variables to be used on either side of the equals
+ sign. Note that the function ENVIRON$() is different from the
+ command, and be aware of the fact that in some operating systems
+ an environment variable set within a program will not be passed
+ to its parent shell.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Function: ENVIRON$( variable-string$ )
+
+ Description: ENVIRON$ returns the environment variable associated with
+ the name variable-string$.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: EOF( device-number )
+
+ Description: EOF returns TRUE (-1) if the device associated with
+ device-number is at the end-of-file, otherwise it
+ returns FALSE (0).
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: ERASE variable[, variable]...
+
+ Description: ERASE eliminates arrayed variables from a program.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Function: ERL
+
+ Description: ERL returns the line number of the most recent error.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: ERR
+
+ Description: ERR returns the error number of the most recent error.
+
+ Note that if PROG_ERRORS has been defined when bwBASIC is
+ compiled, the ERR variable will not be set correctly upon
+ errors. It only works when standard error messages are used.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: ERROR number
+
+ Description: ERROR simulates an error, i.e., displays the message
+ appropriate for that error. This command is helpful
+ in writing ON ERROR GOSUB routines that can identify
+ a few errors for special treatment and then ERROR ERR
+ (i.e., default handling) for all others.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: EXIT [FOR]
+
+ Description: EXIT by itself exits from a DO...LOOP loop;
+ EXIT FOR exits from a FOR...NEXT loop.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Function: EXP( number )
+
+ Description: EXP returns the exponential value of 'number'.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: FIELD [#] device-number, number AS string-variable$ [, number AS string-variable$...]
+
+ Description: FIELD allocates space in a random file buffer for device
+ indicated by device-number, allocating 'number' bytes
+ and assigning the bytes at this position to the variable
+ string-variable$.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: FILES filespec$
+
+ Description: FILES is a pseudocommand that invokes the directory program
+ specified in the variable BWB.FILES$ with the argument
+ filespec$. Normally, the user must set this variable
+ before FILES can be used. E.g., for PC-type computers,
+
+ BWB.FILES$ = "DIR"
+
+ will work, for Unix machines,
+
+ BWB.FILES$ = "ls -l"
+
+ etc.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: FNCS
+
+ Description: CMDS is a debugging command that prints a list
+ of all pre-defined bwBASIC functions.
+
+ Dependencies: DEBUG
+
+ ------------------------------------------
+
+ Command: FUNCTION
+
+ Description: FUNCTION introduces a function definition, normally
+ ending with END FUNCTION. In bwBASIC, FUNCTION and
+ DEF are qorking equivalents, so either can be used
+ with single-line function definitions or with multi-
+ line definitions terminated by END FUNCTION.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: FOR counter = start TO finish [STEP increment]
+
+ Description: FOR initiates a FOR-NEXT loop with the variable
+ 'counter' initially set to 'start' and incrementing
+ in 'increment' steps (default is 1) until 'counter'
+ equals 'finish'.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: GET [#] device-number [, record-number]
+
+ Description: GET reads the next reacord from a random-access file
+ or device into the buffer associated with that file.
+ If record-number is specified, the GET command reads the
+ specified record.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: GOSUB line | label
+
+ Description: GOSUB initiates a subroutine call to the line (or label)
+ specified. The subroutine must end with RETURN.
+
+ Dependencies: (core), but STRUCT_CMDS for labels
+
+ ------------------------------------------
+
+ Command: GOTO line | label
+
+ Description: GOTO branches program execution to the specified line
+ (or label).
+
+ Dependencies: (core), but STRUCT_CMDS for labels
+
+ ------------------------------------------
+
+ Function: HEX$( number )
+
+ Description: HEX$ returns a string giving the hexadecimal (base 16)
+ value for the 'number'.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: IF expression THEN [statement [ELSE statement]]
+
+ Description: IF evaluates 'expression' and performs the THEN
+ statement if it is true or (optionally) the
+ ELSE statement if it is FALSE. If STRUCT_CMDS
+ is set to TRUE, bwBASIC allows multi-line IF
+ statements with ELSE and ELSEIF cases, ending
+ with END IF.
+
+ Dependencies: (core), STRUCT_CMDS for multi-line IF statements
+
+ ------------------------------------------
+
+ Function: INKEY$
+
+ Description: INKEY$ reads the status of the keyboard, and a single
+ keypress, if available. If a keypress is not available,
+ then INKEY$ immediately returns a null string ("").
+ Currently (v2.10) implemented in bwx_iqc.c only.
+
+ Dependencies: IMP_IQC and IMP_CMDLOC
+
+ ------------------------------------------
+
+ Command: INPUT [# device-number]|[;]["prompt string";]list of variables
+
+ Description: INPUT allows input from the terminal or a device
+ specified by device-number. If terminal, the "prompt
+ string" is output, and input is assigned to the
+ appropriate variables specified.
+
+ bwBASIC does not support the optional feature of INPUT
+ that suppresses the carriage-return and line-feed at the end
+ of the input. This is because C alone does not provide for any
+ means of input other than CR-LF-terminated strings.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: INSTR( [start-position,] string-searched$, string-pattern$ )
+
+ Description: INSTR returns the position at which string-pattern$
+ occurs in string-searched$, beginning at start-position.
+ As implemented in bwBASIC, INSTR cannot be used for
+ assignments.
+
+ Note: bwBASIC presently (v2.10) does not allow assignment
+ to a function.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: INT( number )
+
+ Description: INT returns the largest integer less than or equal to
+ the argument 'number'. NOTE that this is not a "truncated"
+ integer function, for which see CINT.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: KILL file-name$
+
+ Description: KILL deletes the file specified by file-name$.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Function: LEFT$( string$, number-of-spaces )
+
+ Description: LEFT$ returns a substring a string$ with number-of-spaces
+ from the left (beginning) of the string). As implemented
+ under bwBASIC, it cannot be used for assignment.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: LEN( string$ )
+
+ Description: LEN returns the length in bytes of string$.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Command: LET variable = expression
+
+ Description: LET assigns the value of 'expression' to the variable.
+ As currently implemented, bwBASIC supports implied LET
+ statements (e.g., "X = 4.5678" at the beginning of
+ a line or line segment, but does not support assignment
+ to multiple variables (e.g., "x, y, z = 3.141596").
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: LINE INPUT [[#] device-number,]["prompt string";] string-variable$
+
+ Description: LINE INPUT reads entire line from the keyboard or a file
+ or device into string-variable$. If input is from the
+ keyboard (stdin), then "prompt string" will be printed
+ first. Unlike INPUT, LINE INPUT reads a whole line,
+ not stopping for comma-delimited data items.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: LIST line[-line]
+
+ Description: LIST lists program lines as specified in its argument.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: LOAD file-name
+
+ Description: LOAD loads an ASCII BASIC program into memory.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Function: LOC( device-number )
+
+ Description: LOC returns the next record that GET or PUT statements
+ will use.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: LOCATE line, column
+
+ Description: LOCATE addresses trhe curor to a specified line and
+ column. Currently (v2.10) implemented in bwx_iqc.c only.
+
+ Dependencies: IMP_IQC and IMP_CMDLOC
+
+ ------------------------------------------
+
+ Function: LOF( device-number )
+
+ Description: LOF returns the length of a file (specified by device-number)
+ in bytes.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: LOG( number )
+
+ Description: LOG returns the natural logarithm of the argument 'number'.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: LOOP [UNTIL expression]
+
+ Description: LOOP terminates a program loop: see DO.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: LSET string-variable$ = expression
+
+ Description: LSET transfers data from 'expression' to the left-hand
+ side of a string variable or random access buffer field.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: MERGE file-name
+
+ Description: MERGE adds program lines from 'file-name' to the program
+ in memory. Unlike LOAD, it does not clear the program
+ currently in memory.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Function: MID$( string$, start-position-in-string[, number-of-spaces ] )
+
+ Description: MID$ returns a substring of string$ beginning at
+ start-position-in-string and continuing for
+ number-of-spaces bytes.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: MKDIR pathname$
+
+ Description: MKDIR creates a new directory path as specified by
+ pathname$.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Function: MKD$( number )
+
+ Description: MKD$, MKI$, and MKS$ are all equivalent in bwBASIC.
+ They convert the numerical value 'number' into a string
+ which can be stored in a more compressed form in a file
+ (especially for random file access). Since bwBASIC does
+ not recognize differences in precision, these commands
+ are effectively equivalent.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: MKI$( number )
+
+ Description: Equivalent to MKD$ (q.v.)
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: MKS$( number )
+
+ Description: Equivalent to MKD$ (q.v.).
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: NAME old-file-name AS new-file-name
+
+ Description: NAME renames an existing file (old-file-name) as
+ new-file-name.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Command: NEW
+
+ Description: NEW deletes the program in memory and clears all
+ variables.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: NEXT [counter-variable]
+
+ Description: NEXT comes at the end of a FOR-NEXT loop; see FOR.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: OCT$( number )
+
+ Description: OCT$ returns a string giving the octal (base 8)
+ representation of 'number'.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: ON variable GOTO|GOSUB line[,line,line,...]
+
+ Description: ON either branches (GOTO) or calls a subroutine
+ (GOSUB) based on the rounded value of variable;
+ if it is 1, the first line is called, if 2, the second
+ line is called, etc.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: ON ERROR GOSUB line|label
+
+ Description: ON ERROR sets up an error handling subroutine. See
+ also ERROR.
+
+ Dependencies: COMMON_CMDS, STRUCT_CMDS for labels
+
+ ------------------------------------------
+
+ Command: OPEN "O"|"I"|"R", [#]device-number, file-name [,record length]
+ file-name FOR INPUT|OUTPUT|APPEND AS [#]device-number [LEN = record-length]
+
+ Description: OPEN allocates random access memory for access to a disk
+ file or other device. Note that two quite different forms
+ of the OPEN statement are supported. In the first form,
+ "O" (note that these letters must be encased in quotation
+ marks) denotes sequential output, "I" denotes sequential
+ input, and "R" denotes random-access input and output.
+ Once OPEN, any number of operations can be performed
+ on a device (see WRITE #, INPUT #, PRINT #, etc.).
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: OPTION BASE number
+
+ Description: OPTION BASE sets the lowest value for array subscripts,
+ either 0 or 1.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: POS
+
+ Description: POS returns the current cursor position in the line.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Command: PRINT [# device-number,][USING format-string$;] expressions...
+
+ Description: PRINT outputs text to the screen or to a file or device
+ specified by device-number. In the current implementation
+ of bwBASIC, expressions to be printed must be separated by
+ the comma (tabbed output), the semicolon (immediate
+ sequential output) or the plus sign (immediate sequential
+ output by string concatenation). Expressions separated
+ by blanks or tabs are not supported. If USING is specified,
+ a number of formatting marks may appear in the format
+ string:
+
+ ! prints the first character of a string
+
+ \\ prints 2+x characters of a string, where x =
+ the number of spaces between the backslashes
+
+ & variable-length string field
+
+ # represents a single digit in output format for
+ a number
+
+ . decimal point in a number
+
+ + sign of a number (will output + or -)
+
+ - trailing minus after a number
+
+ ** fill leading spaces with asterisks
+
+ $$ output dollar sign in front of a number
+
+ ^^ output number in exponential format
+
+ _ output next character literally
+
+ As currently implemented, the exponential format
+ will be that used by the C compiler.
+
+ Dependencies: (core), COMMON_FUNCS for USING
+
+ ------------------------------------------
+
+ Command: PUT [#] device-number [, record-number]
+
+ Description: PUT outputs the next available record or the record
+ specified by record-number to the file or device
+ denoted by device-number.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: QUIT
+
+ Description: QUIT is a synonym for SYSTEM; with INTERACTIVE
+ environment, it exits the program to the
+ operating system (or the calling program).
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: RANDOMIZE number
+
+ Description: RANDOMIZE seeds the random number generator (see RND).
+ Under bwBASIC, the TIMER function (q.v.) can be used
+ to supply a 'number' seed for the random number
+ generator.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: READ variable[, variable]...
+
+ Description: READ reads values from DATA statements and assigns these
+ values to the named variables. Variable types in a READ
+ statement must match the data types in DATA statements
+ as they are occurred. See also DATA and RESTORE.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: REM string
+
+ Description: REM allows remarks to be included in a program. As
+ currently implemented, the entire line following
+ REM is ignored by the interpreter (thus, even if
+ MULTISEG_LINES is set, a REM line will not be able
+ to find a segment delimiter (":") followed by another
+ line segment with command. bwBASIC does not currently
+ implement the Microsoft-style use of the single quotation
+ mark to denote remarks.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: RESTORE line
+
+ Description: RESTORE resets the line and position counters for DATA
+ and READ statements to the top of the program file or
+ to the beginning of the specified line. (Currently this
+ must be a line number.)
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: RETURN
+
+ Description: RETURN concludes a subroutine called by GOSUB.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: RIGHT$( string$, number-of-spaces )
+
+ Description: RIGHT$ returns a substring a string$ with number-of-spaces
+ from the right (end) of the string). As implemented
+ under bwBASIC, it cannot be used for assignment.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: RMDIR pathname
+
+ Description: RMDIR deletes the directory path indicated by pathname.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Function: RND( number )
+
+ Description: RND returns a pseudo-random number. The 'number' value
+ is ignored by bwBASIC if supplied. The RANDOMIZE
+ command (q.v.) reseeds the random-number generator.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: RSET string-variable$ = expression
+
+ Description: RSET transfers data from 'expression' to the right-hand
+ side of a string variable or random access buffer field.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: RUN [line][file-name$]
+
+ Description: RUN executes the program in memory. If a file-name$ is
+ supplied, then the specified file is loaded into memory
+ and executed. If a line number is supplied, then execution
+ begins at that line.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: SAVE file-name$
+
+ Description: SAVE saves the program in memory to file-name$. bwBASIC
+ only saves files in ASCII format.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: SELECT CASE expression
+
+ Description: SELECT CASE introduces a multi-line conditional selection
+ statement. The expression given as the argument to SELECT
+ CASE will be evaluated by CASE statements following. The
+ SELECT CASE statement conclludes with an END SELECT
+ statement.
+
+ As currently implemented, CASE statements may be followed
+ by string values, but in this case only simple comparisons
+ (equals, not equals) can be performed.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Function: SGN( number )
+
+ Description: SGN returns the sign of the argument 'number', +1
+ for positive numbers, 0 for 0, and -1 for negative numbers.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: SIN( number )
+
+ Description: SIN returns the sine of the argument 'number'
+ in radians.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: SPACE$( number )
+
+ Description: SPACE$ returns a string of blank spaces 'number'
+ bytes long.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: SPC( number )
+
+ Description: SPC returns a string of blank spaces 'number'
+ bytes long.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: SQR( number )
+
+ Description: SQR returns the square root of the argument 'number'.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: STOP
+
+ Description: STOP interrupts program execution. As implemented under
+ bwBASIC, STOP issues a SIGINT signal.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: STR$( number )
+
+ Description: STR$ returns a string giving the decimal (base 10)
+ representation of the argument 'number'.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Function: STRING$( number, ascii-value|string$ )
+
+ Description: STRING$ returns a string 'number' bytes long consisting
+ of either the first character of string$ or the character
+ answering to the ASCII value ascii-value.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: SUB subroutine-name
+
+ Description: SUB introduces a named, multi-line subroutine. The
+ subroutine is called by a CALL statement, and concludes
+ with an END SUB statement.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: SWAP variable, variable
+
+ Description: SWAP swaps the values of two variables. The two variables
+ must be of the same type (either numerical or string).
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: SYSTEM
+
+ Description: SYSTEM exits from bwBASIC to the calling program or
+ (more usually) the operating system.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Function: TAB( number )
+
+ Description: TAB outputs spaces until the column indicated by
+ 'number' has been reached.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: TAN( number )
+
+ Description: TAN returns the tangent of the argument 'number'
+ in radians.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: TIME$
+
+ Description: TIME$ returns the current time based on the computer's
+ internal clock as a string in the form "HH-MM-SS".
+ As implemented under bwBASIC, TIME$ cannot be used for
+ assignment (i.e., to set the system time).
+
+ Note: bwBASIC presently (v2.10) does not allow assignment
+ to a function.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Function: TIMER
+
+ Description: TIMER returns the time in the system clock in seconds
+ elapsed since midnight.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: TROFF
+
+ Description: TROFF turns of the trace facility; see TRON.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: TRON
+
+ Description: TRON turns on the trace facility. This facility will print
+ each line number in square brackets as the program is
+ executed. This is useful in debugging programs with
+ line numbers. To debug an unnumbered program with
+ TRON, call DO NUM first, but remember to call DO UNNUM
+ before you save the program later.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Function: VAL( string$ )
+
+ Description: VAL returns the numerical value of the string$.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Command: VARS
+
+ Description: VARS is a debugging command which prints a list of
+ all variables defined which have global scope.
+
+ Dependencies: DEBUG
+
+ ------------------------------------------
+
+ Command: WEND
+
+ Description: WEND concludes a WHILE-WEND loop; see WHILE.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: WHILE expression
+
+ Description: WHILE initiates a WHILE-WEND loop. The loop ends with
+ WEND, and execution reiterates through the loop as
+ long as the 'expression' is TRUE (-1).
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: WIDTH [# device-number,] number
+
+ Description: WIDTH sets screen or device output to 'number'
+ columns. device-number specifies the device
+ or file for oputput.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: WRITE [# device-number,] element [, element ]....
+
+ Description: WRITE outputs variables to the screen or to a file
+ or device specified by device-number. Commas
+ are inserted between expressions output, and strings
+ are enclosed in quotation marks.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+
+6. PREDEFINED VARIABLES
+
+ BWB.EDITOR$
+ BWB.FILES$
+ BWB.PROMPT$
+ BWB.IMPLEMENTATION$
+
+ The commands EDIT and FILES are pseudo-commands that launch
+ shell programs named in the variables BWB.EDITOR$ and BWB.FILES$,
+ respectively. The default values for these variables can
+ be changed in bwbasic.h (DEF_EDITOR and DEF_FILES), or they
+ can be changed on the fly by the user. An idea might be to
+ initialize these variables in "profile.bas" for specific
+ implementations; for instance, BWB.FILES$ might be defined as
+ "ls -l" on Unix systems or "dir" on DOS systems.
+
+ The preset variable BWB.PROMPT$ can be used to set the prompt
+ string for bwBASIC. Again, it is suggested that a user-
+ selected promptcan be set up in a "profile.bas" to be
+ initialized each time bwBASIC starts. Note that special
+ characters can be added to the prompt string, e.g.,
+
+ BWB.PROMPT$ = "Ok"+CHR$(10)
+
+ will give an "Ok" prompt followed by a linefeed.
+
+ The preset variable BWB.IMPLEMENTATION$ will return "TTY" for
+ the bwx_tty implementation and will return "IQC" for the
+ IBM PC or Compatibles with QuickC (bwx_iqc) implementation.
+ This may be useful in determing which commands and functions
+ (specifically CLS, LOCATE, and INKEY$) may be available.
+
+
+7. UNIMPLEMENTED COMMANDS AND FUNCTIONS, and AGENDA FOR DEVELOPMENT
+
+ There are some items not implemented that have been so long
+ a part of standard BASICs that their absence will seem surprising.
+ In each case, though, their implementation would require opera-
+ ting-system-specific functions or terminal-specific functions
+ that cannot be universally provided. Some specific examples:
+
+ CLOAD Relies on CP/M or MSDOS conventions for binary
+ executable files.
+
+ CONT See RESUME below (programmer ignorance?).
+
+ DEF USR Relies on CP/M or MSDOS conventions for binary
+ executable files.
+
+ FRE() The ability to report the amount of free memory
+ remaining is system-specific due to varying patterns
+ of memory allocation and access; consequently this
+ ability is not present in ANSI or earlier versions
+ of C and this function is not available in bwBASIC.
+
+ INPUT$() C by itself is not able to read unechoed keyboard
+ input, and can read keyboard input only after a
+ Carriage-Return has been entered.
+
+ INP Calls to hardware ports, like machine-language
+ routines, are highly system-specific and cannot
+ be implemented in C alone.
+
+ LLIST See LPRINT below.
+
+ LPOS See LPRINT below.
+
+ LPRINT and LLIST, etc., require access to a printer device,
+ and this varies from one system to another. Users
+ might try OPENing the printer device on their own
+ operating system (e.g., "/dev/lp" on Unix systems,
+ or "PRN" under DOS) and see if printing can be done
+ from bwBASIC in this way.
+
+ NULL In this case, I am convinced that NULL is no longer
+ necessary, since very few printers now require NULLs
+ at the end of lines.
+
+ OUT See INP above (calls to hardware ports).
+
+ PEEK() PEEK and POKE enabled earlier BASICs to address
+ particular memory locations. Although bwBASIC
+ could possibly implement this command (POKE) and
+ this function (PEEK()), the limitation would be
+ highly limited by the different systems for
+ memory access in different systems.
+
+ POKE see PEEK() above.
+
+ RENUM Since unnumbered lines can be entered and
+ executed under bwBASIC, it would not be
+ possible to implement a RENUM routine.
+ Instead, bwBASIC uses DO NUM and DO UNNUM.
+
+ RESUME Is this possible under C? If so, I
+ simply have failed to figure it out yet.
+ Mea culpa (but not maxima).
+
+ USR See CALL and DEF USR above (machine language
+ subroutines).
+
+ VARPTR See PEEK and POKE above.
+
+ WAIT See INP and OUT above.
+
+ There are other commands, functions, and implementation details
+ that I am working on, and which are on the agenda list for future
+ versions of bwBASIC. These agenda include:
+
+ PARACT i.e., the ability to execute PARallel ACTions. This
+ is described in ANSI BASIC, although I have not seen it
+ implemented before. It will offer a rough, non-
+ preemptive form of multitasking within the scope
+ of a BASIC program. Programmers will note points at which
+ there are already hooks for PARACT in bwBASIC.
+
+ XMEM PC-type computers need to be able to use extended
+ memory. If we could use extended memory for program
+ lines, variables, and function defitions, we could
+ write much longer programs. This would entail,
+ however, a fairly serious rewriting of the program
+ to utilize memory handles for these storage features
+ instead of direct memory pointers.
+
+ Windows The addition of memory handles in addition to the
+ non-preemptive execution of program lines (in a
+ crude form, already present) will make it possible
+ to develop implementations for Windows and perhaps
+ for other graphical user interfaces. But what form
+ should this take? I have in mind presently a BASIC
+ that would run in the background, appearing only
+ as an icon in the GUI space, with pop-up editors
+ and output windows. Thus, the interpreted language
+ would serve a purpose something like 'cron' (a task
+ scheduler) under Unix systems. You may have some
+ reflections that would help me in this.
+
+ Graphics Here we face fairly critical differences in different
+ styles and implementations of graphics, e.g., between
+ GWBASIC, ANSI BASIC, VisualBASIC, etc. But it's
+ possible that Graphics commands and functions could
+ be added. These would all be implementation-specific.
+
+ The ANSI Standard for full BASIC does not specify which particular
+ commands or functions must be implemented, and in fact the standard
+ is very robust. Perhaps no implementation of BASIC would ever
+ include all of the items, but some ANSI commands and functions which
+ remain unimplemented are:
+
+ ACCESS
+ ANGLE
+ AREA
+ ARITHMETIC
+ ARRAY
+ ASK
+ BSTR
+ BVAL
+ CEIL
+ CELLS
+ CLIP
+ COLLATE
+ CONNECT
+ COSH
+ DATUM
+ DEBUG
+ DECIMAL
+ DECLARE
+ DEGREES
+ DEVICE
+ DISCONNECT
+ DISPLAY
+ DOT
+ DRAW
+ ERASE
+ EVENT
+ EXCEPTION
+ GRAPH
+ HANDLER
+ IMAGE
+ KEY
+ LCASE
+ LINES
+ LOG10
+ LOG2
+ MAT
+ MIX
+ MULTIPOINT
+ OUTIN
+ OUTPUT
+ PARACT
+ PICTURE
+ PIXEL
+ PLOT
+ POINTS
+ RADIANS
+ RECEIVE
+ RENUMBER
+ REWRITE
+ ROTATE
+ ROUND
+ SEIZE
+ SEND
+ SHIFT
+ SINH
+ TANH
+ TIMEOUT
+ TRACE
+ TRANSFORM
+ TRUNCATE
+ UBOUND
+ UCASE
+ VIEWPORT
+ WAIT
+ VIEWPORT
+ ZONEWIDTH
+
+
+8. THE STORY OF BYWATER BASIC
+
+ This program was originally begun in 1982 by my grandmother, Mrs.
+ Verda Spell of Beaumont, TX. She was writing the program using
+ an ANSI C compiler on an Osborne I CP/M computer and although my
+ grandfather (Lockwood Spell) had bought an IBM PC with 256k of
+ RAM my grandmother would not use it, paraphrasing George Herbert
+ to the effect that "He who cannot in 64k program, cannot in 512k."
+ She had used Microsoft BASIC and although she had nothing against
+ it she said repeatedly that she didn't understand why Digital
+ Research didn't "sue the socks off of Microsoft" for version 1.0
+ of MSDOS and so I reckon that she hoped to undercut Microsoft's
+ entire market and eventually build a new software empire on
+ the North End of Beaumont. Her programming efforts were cut
+ tragically short when she was thrown from a Beaumont to Port
+ Arthur commuter train in the summer of 1986. I found the source
+ code to bwBASIC on a single-density Osborne diskette in her knitting
+ bag and eventually managed to have it all copied over to a PC
+ diskette. I have revised it slightly prior to this release. You
+ should know, though, that I myself am an historian, not a programmer.
+
+
+9. COMMUNICATIONS:
+
+ email: tcamp@delphi.com
+
diff --git a/DMCDOS32.CMD b/DMCDOS32.CMD
index 36a725f..3be4ae8 100644
--- a/DMCDOS32.CMD
+++ b/DMCDOS32.CMD
@@ -1,35 +1,35 @@
-@echo off
-rem Filename: DMCDOS32.CMD
-rem Purpose: Build Bywater BASIC for MS-DOS (32-bit) using Digital Mars Compiler Version 8.42n
-rem Author: Howard Wulf, AF5NE
-rem Date: 2015-01-29
-rem Uasage: implementation defined
-rem Example:
-rem cd \sdcard\Download\BASIC\bwbasic3\
-rem DMCDOS32.CMD
-rem
-rem This is the location of DMC.EXE
-rem
-set BINDIR=C:\DOS\dm\bin;
-rem
-rem Cleanup before compile
-rem
-DEL BW*.EXE 1> NUL 2> NUL
-DEL BW*.OBJ 1> NUL 2> NUL
-DEL BW*.MAP 1> NUL 2> NUL
-rem
-rem Compile
-rem
-set OLDPATH=%PATH%
-set PATH=%BINDIR%;%PATH%
-dmc.exe > DMCDOS32.TXT
-dmc.exe -mx -A89 -oBWBASIC.EXE -DHAVE_MSDOS=1 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 X32.LIB >> DMCDOS32.TXT
-set PATH=%OLDPATH%
-set OLDPATH=
-set BINDIR=
-rem
-rem Cleanup after compile
-rem
-DEL BW*.OBJ 1> NUL 2> NUL
-DEL BW*.MAP 1> NUL 2> NUL
-rem EOF
+@echo off
+rem Filename: DMCDOS32.CMD
+rem Purpose: Build Bywater BASIC for MS-DOS (32-bit) using Digital Mars Compiler Version 8.42n
+rem Author: Howard Wulf, AF5NE
+rem Date: 2015-01-29
+rem Uasage: implementation defined
+rem Example:
+rem cd \sdcard\Download\BASIC\bwbasic3\
+rem DMCDOS32.CMD
+rem
+rem This is the location of DMC.EXE
+rem
+set BINDIR=C:\DOS\dm\bin;
+rem
+rem Cleanup before compile
+rem
+DEL BW*.EXE 1> NUL 2> NUL
+DEL BW*.OBJ 1> NUL 2> NUL
+DEL BW*.MAP 1> NUL 2> NUL
+rem
+rem Compile
+rem
+set OLDPATH=%PATH%
+set PATH=%BINDIR%;%PATH%
+dmc.exe > DMCDOS32.TXT
+dmc.exe -mx -A89 -oBWBASIC.EXE -DHAVE_MSDOS=1 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 X32.LIB >> DMCDOS32.TXT
+set PATH=%OLDPATH%
+set OLDPATH=
+set BINDIR=
+rem
+rem Cleanup after compile
+rem
+DEL BW*.OBJ 1> NUL 2> NUL
+DEL BW*.MAP 1> NUL 2> NUL
+rem EOF
diff --git a/DMCWIN32.CMD b/DMCWIN32.CMD
index 441e0df..d563a92 100644
--- a/DMCWIN32.CMD
+++ b/DMCWIN32.CMD
@@ -1,35 +1,35 @@
-@echo off
-rem Filename: DMCWIN32.CMD
-rem Purpose: Build Bywater BASIC for MS-WINDOWS (32-bit) using Digital Mars Compiler Version 8.42n
-rem Author: Howard Wulf, AF5NE
-rem Date: 2015-01-29
-rem Uasage: implementation defined
-rem Example:
-rem cd \sdcard\Download\BASIC\bwbasic3\
-rem DMCWIN32.CMD
-rem
-rem This is the location of DMC.EXE
-rem
-set BINDIR=C:\DOS\dm\bin
-rem
-rem Cleanup before compile
-rem
-DEL BW*.EXE 1> NUL 2> NUL
-DEL BW*.OBJ 1> NUL 2> NUL
-DEL BW*.MAP 1> NUL 2> NUL
-rem
-rem Compile
-rem
-set OLDPATH=%PATH%
-set PATH=%BINDIR%;%PATH%
-dmc.exe > DMCWIN32.TXT
-dmc.exe -mn -A89 -oBWBASIC.EXE -DHAVE_MSDOS=1 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 >> DMCWIN32.TXT
-set PATH=%OLDPATH%
-set OLDPATH=
-set BINDIR=
-rem
-rem Cleanup after compile
-rem
-DEL BW*.OBJ 1> NUL 2> NUL
-DEL BW*.MAP 1> NUL 2> NUL
-rem EOF
+@echo off
+rem Filename: DMCWIN32.CMD
+rem Purpose: Build Bywater BASIC for MS-WINDOWS (32-bit) using Digital Mars Compiler Version 8.42n
+rem Author: Howard Wulf, AF5NE
+rem Date: 2015-01-29
+rem Uasage: implementation defined
+rem Example:
+rem cd \sdcard\Download\BASIC\bwbasic3\
+rem DMCWIN32.CMD
+rem
+rem This is the location of DMC.EXE
+rem
+set BINDIR=C:\DOS\dm\bin
+rem
+rem Cleanup before compile
+rem
+DEL BW*.EXE 1> NUL 2> NUL
+DEL BW*.OBJ 1> NUL 2> NUL
+DEL BW*.MAP 1> NUL 2> NUL
+rem
+rem Compile
+rem
+set OLDPATH=%PATH%
+set PATH=%BINDIR%;%PATH%
+dmc.exe > DMCWIN32.TXT
+dmc.exe -mn -A89 -oBWBASIC.EXE -DHAVE_MSDOS=1 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 >> DMCWIN32.TXT
+set PATH=%OLDPATH%
+set OLDPATH=
+set BINDIR=
+rem
+rem Cleanup after compile
+rem
+DEL BW*.OBJ 1> NUL 2> NUL
+DEL BW*.MAP 1> NUL 2> NUL
+rem EOF
diff --git a/DOCS/CMDS.HTM b/DOCS/CMDS.HTM
index 4062fe7..778107f 100644
--- a/DOCS/CMDS.HTM
+++ b/DOCS/CMDS.HTM
@@ -1,394 +1,394 @@
-
CMDS
-LEGEND
-
-ID | NAME | DESCRIPTION |
-B15 | BYWATER | Bywater BASIC 3 |
-B93 | BYWATER-2 | Bywater BASIC 2 |
-S70 | CALL/360 | SBC CALL/360 Mainframe BASIC |
-C77 | CBASIC-II | CBASIC-II for CP/M |
-D64 | DARTMOUTH | Dartmouth DTSS BASIC |
-E78 | ECMA-55 | ANSI Minimal BASIC |
-E86 | ECMA-116 | ANSI Full BASIC |
-G74 | GCOS | GE 600 Mainframe BASIC |
-H14 | HAARDT | bas 2.4 by Michael Haardt |
-HB1 | HANDBOOK1 | The BASIC Handbook, 1st Edition |
-HB2 | HANDBOOK2 | The BASIC Handbook, 2nd Edition |
-H80 | HEATH | Heath Benton Harbor BASIC |
-G65 | MARK-I | GE 265 Mainframe BASIC |
-G67 | MARK-II | GE 435 Mainframe BASIC |
-M80 | MBASIC | Microsoft BASIC-80 for Xenix |
-D73 | PDP-8 | DEC PDP-8 BASIC |
-D70 | PDP-11 | DEC PDP-11 BASIC |
-R86 | RBASIC | Micronics RBASIC for 6809 FLEX |
-D71 | RSTS-11 | DEC RSTS-11 BASIC-PLUS |
-I70 | SYSTEM/360 | IBM System/360 Mainframe BASIC |
-I73 | SYSTEM/370 | IBM System/370 Mainframe BASIC |
-T80 | TRS-80 | TRS-80 Model I/III/4 LBASIC |
-V09 | VINTAGE | Vintage BASIC 1.0.1 |
-T79 | XBASIC | TSC XBASIC for 6800 FLEX |
-
-
-DETAILS
-
-COMMAND | B15 | B93 | S70 | C77 | D64 | E78 | E86 | G74 | H14 | HB1 | HB2 | H80 | G65 | G67 | M80 | D73 | D70 | R86 | D71 | I70 | I73 | T80 | V09 | T79 |
-APPEND filename$ | X | | | | | | | | | | X | | | | | | | X | | | | | | X |
-APPEND # filenumber | | | | | X | | | X | | | | | X | X | | | | | | | | | | |
-AS | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-AUTO [start [, increment]] | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
-BACKSPACE # X | | | | | X | | | X | | | | | X | X | | | | | | | | | | |
-BREAK line [, ...]] | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-BUILD [start [, increment]] | | | | | | | | | | | | X | | | | | | | | | | | | |
-BYE | X | | | | X | | | X | X | | X | X | X | X | | X | X | | X | | | | | |
-CALL subname( [parameter [, ...] ] ) | X | X | | | | | | | X | | X | | | | | | | | | | | | | |
-CASE constant [TO constant] | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-CASE IF operator constant | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-CASE IS operator constant | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-CASE ELSE | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-CHAIN filename$ [, linenumber] | X | X | X | X | | | | X | | X | X | X | X | X | X | | | X | X | X | X | X | | X |
-CHANGE A$ TO X | X | | | | X | | | X | | | X | | X | X | | | | | X | | | | | |
-CHANGE X TO A$ | X | | | | X | | | X | | | X | | X | X | | | | | X | | | | | |
-CLEAR | X | X | | | | | | | X | X | X | X | | | X | | | X | X | | | X | | X |
-CLOAD [filename$] | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
-CLOAD* arrayname | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
-CLOSE | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-CLOSE filename$ [, ...] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-CLOSE filenumber [, ...] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-CLR | | | | | | | | | | X | X | | | | | | | | | | | | | |
-CMDS | X | X | | | | | | | | | | | | | | | | | | | | | | |
-COMMON variable [, ...] | X | X | | X | | | X | | | | X | | | | X | | | | X | | | X | | |
-CONSOLE [WIDTH width] | | | | X | | | | | | | | | | | | | | | | | | | | |
-CONST variable [, ...] = value | X | | | | | | | | | | | | | | | | | | | | | | | |
-CONT | X | | | | | | | | | X | X | | | | X | | | X | X | | | X | | X |
-CONTINUE | | | | | | | | | | | | X | | | | | | | | | | | | |
-COPY source$ TO target$ | | | | | | | | | X | | | | | | | | | | | | | | | |
-CREATE filename$ [ RECL reclen ] AS filenum
-[ BUFF number ] [ RECS size ] | | | | X | | | | | | | | | | | | | | | | | | | | |
-CSAVE [filename$] | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
-CSAVE* ArrayName | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
-DATA constant [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-DEC variable [,...] | | | | | | | | | X | | | | | | | | | | | | | | | |
-DEF FNname[( arg [,...] )] = value | X | X | X | X | X | X | X | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-DEF FNname[( arg [,...] )] | X | | X | | | | | X | | X | X | X | | X | | X | X | | X | X | X | X | | |
-DEFBYT letter[-letter] [, ...] | X | | | | | | | | | | | | | | | | | | | | | | | |
-DEFCUR letter[-letter] [, ...] | X | | | | | | | | | | | | | | | | | | | | | | | |
-DEFDBL letter[-letter] [, ...] | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
-DEFINT letter[-letter] [, ...] | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
-DEFLNG letter[-letter] [, ...] | X | | | | | | | | | | | | | | | | | | | | | | | |
-DEFSNG letter[-letter] [, ...] | X | X | | | | | | | | X | X | | | | X | | | | X | | | X | | |
-DEFSTR letter[-letter] [, ...] | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
-DELETE filenumber | | | | X | | | | | | | | | | | | | | | | | | | | |
-DELETE line [- line] | X | X | | | | | | | X | X | X | X | | | X | X | X | | X | | | X | | |
-DELIMIT # X, A$ | | | | | | | | X | | | | | X | X | | | | | | | | | | |
-DIM [# filenum,] variable([ lower TO ] upper) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-DISPLAY source$ | | | | | | | | | X | | | | | | | | | | | | | | | |
-DO UNTIL value | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-DO | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-DO WHILE value | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-DOS | | | | | | | | | | | | | | | | | | X | | | | | | |
-DSP variable [, ...]] | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-EDIT | X | X | X | X | X | X | X | X | | X | X | X | X | X | X | | | X | X | X | X | X | | X |
-ELSE | X | X | | X | | | X | | X | X | X | X | | | X | X | X | X | X | | | X | X | X |
-ELSEIF | X | X | | X | | | X | | X | X | X | X | | | X | X | X | X | X | | | X | X | X |
-END | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-END FUNCTION | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-END IF | X | X | | X | | | X | | X | X | X | X | | | X | X | X | X | X | | | X | X | X |
-END SELECT | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-END SUB | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-ERASE variable [, ...] | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
-EXCHANGE variable, variable | X | | | | | | | | | | X | | | | | | | | | | | | | |
-EXIT | X | X | | | | | X | | X | | X | | | | | | | | | | | | | |
-EXIT DO | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-EXIT FOR | X | X | | | | | X | | X | | X | | | | | | | | | | | | | |
-EXIT FUNCTION | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-EXIT REPEAT | X | | | | | | | | X | | X | | | | | | | | | | | | | |
-EXIT SUB | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-EXIT WHILE | X | X | | | | | X | | | | | | | | | | | | | | | | | |
-FEND | | | | X | | | | | | | | | | | | | | | | | | | | |
-FIELD [#] filenum, number AS variable$ [, ...] | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-FILE filename$ [( reclen )] | | | | X | | | | | | | | | | | | | | | | | | | | |
-FILE # X, A$ | | | | X | X | | | X | | | | | X | X | | | | | | | | | | |
-FILES A$[, ...] | | | | | X | | | X | | | | | X | X | | | | | | | | | | |
-FLEX | | | | | | | | | | | | | | | | | | | | | | | | X |
-FNCS | X | X | | | | | | | | | | | | | | | | | | | | | | |
-FNEND | X | | X | | | | | X | | X | X | X | | X | | X | X | | X | X | X | X | | |
-FOR variable = start TO finish [STEP increment] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-FUNCTION [ ( parameter [, ... ] ) ] | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-GET # file_number , [ byte_number ] , scalar [,...] | | | | | | | | | X | | | | | | | | | | | | | | | |
-GET # file_number [ , RECORD record_number ] | | | | | | | | | | | | | | | | | | X | X | | | | | X |
-GET # file_number [ , RECORD record_number ] | | | | | | | | | | | | | | | | | | X | X | | | | | X |
-GET filename$ , scalar [, ...] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-GET # file_number [ , record_number ] | | | | | | | | | X | | | | | | | | | | | | | | | |
-GO | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-GO SUB line | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-GO TO line | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-GOODBYE | X | | | | X | | | X | | | X | | X | X | | | | | X | | | | | |
-GOSUB line | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-GOTO line | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-HELP name | X | | | | | | | | | | | | | | | | | | | | | | | |
-IF value THEN line1 [ELSE line2] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-IF END # filenum THEN line1 [ELSE line2] | | | | X | X | | | X | | | | | X | X | | | | | | | | | | |
-IF MORE # filenum THEN line1 [ELSE line2] | | | | | X | | | X | | | | | X | X | | | | | | | | | | |
-IF value THEN | X | X | | X | | | X | | X | X | X | X | | | X | X | X | X | X | | | X | X | X |
-IMAGE "format string" | | | X | | | | | | X | X | X | | | | | | | | | X | X | | | |
-INC variable [,...] | | | | | | | | | X | | | | | | | | | | | | | | | |
-INPUT "prompt string" , variable [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
-INPUT # filenum , variable [, ...]s | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
-INPUT variable [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
-INPUT LINE variable$ | X | | | | | | | | | | | X | | | X | | | X | X | | | X | | X |
-INPUT LINE # filenum , variable$ | X | | | | | | | | | | | X | | | X | | | X | X | | | X | | X |
-INPUT LINE "prompt string" , variable$ | X | | | | | | | | | | | X | | | X | | | X | X | | | X | | X |
-[LET] variable [, ...] = value | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-LINE | X | X | | | | | | | X | | X | X | | | X | | | X | X | | | X | | X |
-LINE INPUT [[#] filenum,]["prompt string";] variable$ | X | X | | | | | | | X | | X | X | | | X | | | X | X | | | X | | X |
-LIST line1 [- line2] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
-LISTNH line1 [- line2] | X | | X | X | X | | | X | | | | | X | X | | | | | X | X | X | | | |
-LLIST line1 [- line2] | X | | | X | | | | | X | | X | | | | X | | | | X | | | X | | |
-LOAD [filename$] | X | X | X | X | X | X | X | X | X | X | X | | X | X | X | | | X | X | X | X | X | | X |
-LOCAL [# filenum,] variable([ lower TO ] upper) | | | | | | | | | X | | | | | | | | | | | | | | | |
-LOOP UNTIL value | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-LOOP WHILE value | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-LOOP | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-LPRINT [USING format-string$;] value ... | X | | X | | | X | X | | X | | X | | | | X | | | | X | X | X | X | | |
-LPRINTER [WIDTH width] | | | | X | | | | | | | | | | | | | | | | | | | | |
-LPT [filename$] | | | | | | | | | | | | | | | | X | | | | | | | | |
-LSET variable$ = value | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-MAINTAINER | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER CMDS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER CMDS HTML | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER CMDS ID | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER CMDS MANUAL | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER CMDS_SWITCH | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER CMDS TABLE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER DEBUG | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER DEBUG OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER DEBUG ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER FNCS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER FNCS HTML | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER FNCS ID | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER FNCS MANUAL | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER FNCS SWITCH | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER FNCS TABLE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER MANUAL | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MAINTAINER STACK | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-MARGIN # filenumber, width | X | | | | X | | | X | | | X | | X | X | | | | | | | | | | |
-MAT arrayname = value | | | X | | X | | | X | X | X | X | | X | X | | | | | X | X | X | | | |
-MAT GET filename$, arrayname | | | X | | | | | X | | | | | X | X | | | | | | X | X | | | |
-MAT INPUT arrayname | | | X | | X | | | X | X | X | X | | X | X | | | | | X | X | X | | | |
-MAT PRINT arrayname | | | X | | X | | | X | X | X | X | | X | X | | | | | X | X | X | | | |
-MAT PUT filename$, arrayname | | | X | | | | | X | | | | | X | X | | | | | | X | X | | | |
-MAT READ arrayname | | | X | | X | | | X | X | X | X | | X | X | | | | | X | X | X | | | |
-MAT WRITE arrayname | | | | | X | | | X | X | X | X | | X | X | | | | | | | | | | |
-MERGE filename$ | X | X | | X | | | | | | | | | | | X | | | | X | | | X | | |
-MID$( variable$, start [, count ] ) = value | X | X | | X | | | | | X | | | X | | | X | | | | X | | | X | | |
-MON | | | | | | | | | | | | | | | | | | X | | | | | | |
-NAME old$ AS new$ | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-NEW | X | X | X | X | X | X | X | X | X | X | X | | X | X | X | X | X | X | X | X | X | X | | X |
-NEXT [variable] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OF | X | | X | X | X | X | X | X | | X | X | | X | X | X | | | X | X | X | X | X | | X |
-OLD [filename$] | | | | | X | | | X | | | | X | X | X | | X | X | | X | | | | | |
-ON value GOSUB line [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | X | X | X | X | X |
-ON value GOTO line [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | X | X | X | X | X |
-ON ERROR | X | X | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
-ON ERROR GOSUB errline | X | X | | | | | | | | | | | | | | | | | | | | | | |
-ON ERROR GOTO errline | X | | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
-ON ERROR RESUME | X | | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-ON ERROR RESUME NEXT | X | | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-ON ERROR RETURN | X | | | | | | | | | | | | | | | | | | | | | | | |
-ON ERROR RETURN NEXT | X | | | | | | | | | | | | | | | | | | | | | | | |
-ON TIMER count GOSUB line | X | | | | | | | | | | | | | | | | | | | | | | | |
-OPEN NEW|OLD|VIRTUAL filename$
-AS filenumber | | | | | | | | | | | | | | | | | | X | | | | | | X |
-OPEN filename$
-FOR INPUT|OUTPUT|APPEND|BINARY|RANDOM|VIRTUAL
-AS [#] fileenumber
-[LEN [=] record-length] | X | X | | | | | | | X | | X | | | | X | | | | | | | X | | |
-OPEN filename$
-FOR INPUT|OUTPUT|APPEND|BINARY|RANDOM|VIRTUAL
-AS FILE filenumber
-[ ,RECORDSIZE ignored ]
-[ ,CLUSTERSIZE ignored ]
-[ ,MODE ignored ] | | | | | | | | | | | | | | | | | | | X | | | | | |
-OPEN filename
-FOR READ|WRITE|VIRTUAL
-AS FILE filenumber | | | | | | | | | | | | X | | | | | | | | | | | | |
-OPEN filename$
-[ RECL reclen ]
-AS filenumber
-[ BUFF ignored ]
-[ RECS ignored ] | | | | X | | | | | | | | | | | | | | | | | | | | |
-OPEN filenumber,
-filename$,
-INPUT|OUTPUT|APPEND|VIRTUAL | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-OPTION | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ANGLE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ANGLE DEGREES | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ANGLE GRADIANS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ANGLE RADIANS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ARITHMETIC | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ARITHMETIC DECIMAL | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ARITHMETIC FIXED | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ARITHMETIC NATIVE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION BASE integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION BUGS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION BUGS BOOLEAN | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION BUGS OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION BUGS ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION COMPARE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION COMPARE BINARY | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION COMPARE DATABASE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION COMPARE TEXT | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION COVERAGE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION COVERAGE OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION COVERAGE ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION DATE format$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION DIGITS integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION DISABLE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION DISABLE COMMAND name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION DISABLE FUNCTION name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION DISABLE OPERATOR name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION EDIT string$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ENABLE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ENABLE COMMAND name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ENABLE FUNCTION name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ENABLE OPERATOR name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ERROR | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ERROR GOSUB | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ERROR GOTO | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION EXPLICIT | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION EXTENSION string$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION FILES string$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION IMPLICIT | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION INDENT integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION LABELS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION LABELS OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION LABELS ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PROMPT string$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT AT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT BYTE char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT COMMENT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT CURRENCY char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT DOUBLE char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT FILENUM char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT IMAGE char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT INPUT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT INTEGER char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT LONG char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT LPAREN char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT_PRINT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT QUOTE char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT RPAREN char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT SINGLE char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT STATEMENT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION PUNCT STRING char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION RECLEN integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION RENUM string$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ROUND | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ROUND BANK | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ROUND MATH | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ROUND TRUNCATE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION SCALE integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION SLEEP double | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION STDERR filename$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION STDIN filename$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION STDOUT filename$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION STRICT | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION STRICT OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION STRICT ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION TERMINAL | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION TERMINAL ADM | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION TERMINAL ANSI | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION TERMINAL NONE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION TIME format$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION TRACE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION TRACE OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION TRACE ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING ALL char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING COMMA char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING DIGIT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING DOLLAR char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING EXRAD char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING FILLER char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING FIRST char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING LENGTH char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING LITERAL char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING MINUS char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING PERIOD char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION USING PLUS char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION VERSION version$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-OPTION ZONE integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-PAUSE [comment] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-PDEL line [- line] | | | | | | | | | | | | | | | | | | X | | | | | | X |
-POP | X | | | | | | | | | | X | | | | | | | | | | | | | |
-PRINT # filenum , [USING format$;] value ... | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
-PRINT [USING format$;] value ... | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-PTP [filename$] | | | | | | | | | | | | | | | | X | | | | | | | | |
-PTR [filename$] | | | | | | | | | | | | | | | | X | | | | | | | | |
-PUT # file_number , [ byte_number ] , scalar [,...] | | | | | | | | | X | | | | | | | | | | | | | | | |
-PUT filename$ , value [, ...] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-PUT # file_number [ , RECORD record_number ] | | | | | | | | | | | | | | | | | | X | X | | | | | X |
-PUT # file_number [ , record_number ] | | | | | | | | | X | | | | | | | | | | | | | | | |
-QUIT | X | | X | X | X | X | X | X | | | | | X | X | | | | | X | X | X | | | |
-READ variable [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-RECALL ArrayName | X | | | | | | | | | | X | | | | | | | | | | | | | |
-REM ... | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-RENAME from$ TO to$ | | | | | | | | | X | | | | | | | | | | | | | | | |
-RENAME [filename$] | | | | | X | | | X | | | | | X | X | | | | | X | | | | | |
-RENUM | X | X | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
-RENUMBER | | | | | | | | | | X | X | | | | | | | | | | | | | |
-REPEAT | X | | | | | | | | X | | X | | | | | | | | | | | | | |
-REPLACE [filename$] | | | | | | | | | | | | X | | | | | | | | | | | | |
-RESET filename$ [, ...] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-RESTORE [line] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-RESUME | X | | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
-RESUME line | X | | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
-RESUME NEXT | X | | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
-RESUME 0 | X | | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
-RETURN | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-RSET variable$ = value | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-RUN filename$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
-RUN line | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
-RUN | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
-RUNNH line | X | | X | X | X | | | X | | | | | X | X | | | | | X | X | X | | | |
-RUNNH filename$ | X | | X | X | X | | | X | | | | | X | X | | | | | X | X | X | | | |
-RUNNH | X | | X | X | X | | | X | | | | | X | X | | | | | X | X | X | | | |
-SAVE [filename$] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
-SCRATCH [# X] | | | | | | | | X | | | X | X | X | X | | | | | | | | | | |
-SELECT | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-SELECT CASE value | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
-STEP | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-STOP | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-STORE ArrayName | X | | | | | | | | | | X | | | | | | | | | | | | | |
-SUB name [ ( parameter [,...] ) ] | X | X | | | | | X | | X | | X | | | | | | | | | | | | | |
-SUB END | | | | | | | | | X | | | | | | | | | | | | | | | |
-SUB EXIT | | | | | | | | | X | | | | | | | | | | | | | | | |
-SUBEND | X | | | | | | | | X | | X | | | | | | | | | | | | | |
-SUBEXIT | | | | | | | | | X | | | | | | | | | | | | | | | |
-SWAP variable, variable | X | X | | | | | | | X | | X | | | | X | | | X | X | | | X | | X |
-SYSTEM | X | X | X | X | X | X | X | X | X | X | X | | X | X | X | | | | X | X | X | X | X | |
-TEXT letter[-letter] [, ...] | | | | | | | | | | X | X | | | | | | | | | | | | | |
-THEN | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-TIMER | X | | | | | | | | | | | | | | | | | | | | | | | |
-TIMER OFF | X | | | | | | | | | | | | | | | | | | | | | | | |
-TIMER ON | X | | | | | | | | | | | | | | | | | | | | | | | |
-TIMER STOP | X | | | | | | | | | | | | | | | | | | | | | | | |
-TLOAD [filename$] | X | | | | | | | | | | X | | | | | | | | | | | | | |
-TO | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-TRACE | | | | | | | | X | | X | X | | | X | | | | | | | | | | |
-TRACE OFF | | | | | | | | X | | X | X | | | X | | | | | | | | | | |
-TRACE ON | | | | | | | | X | | X | X | | | X | | | | | | | | | | |
-TSAVE [filename$] | X | | | | | | | | | | X | | | | | | | | | | | | | |
-TTY | | | | | | | | | | | | | | | | X | | | | | | | | |
-TTY IN | | | | | | | | | | | | | | | | X | | | | | | | | |
-TTY OUT | | | | | | | | | | | | | | | | X | | | | | | | | |
-UNTIL value | X | | | | | | | | X | | X | | | | | | | | | | | | | |
-USE parameter$ | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-VARS | X | X | | | | | | | | | | | | | | | | | | | | | | |
-WEND | X | X | | X | | | | | X | X | X | | | | X | | | | X | | | X | | |
-WHILE value | X | X | | X | | | | | X | X | X | | | | X | | | | X | | | X | | |
-WRITE # filenum, value [, .... ] | X | X | | | | | | X | X | | | | X | X | X | | | | X | | | X | | |
-WRITE value [, .... ] | X | X | | | | | | X | X | | | | X | X | X | | | | X | | | X | | |
-
-
-
+CMDS
+LEGEND
+
+ID | NAME | DESCRIPTION |
+B15 | BYWATER | Bywater BASIC 3 |
+B93 | BYWATER-2 | Bywater BASIC 2 |
+S70 | CALL/360 | SBC CALL/360 Mainframe BASIC |
+C77 | CBASIC-II | CBASIC-II for CP/M |
+D64 | DARTMOUTH | Dartmouth DTSS BASIC |
+E78 | ECMA-55 | ANSI Minimal BASIC |
+E86 | ECMA-116 | ANSI Full BASIC |
+G74 | GCOS | GE 600 Mainframe BASIC |
+H14 | HAARDT | bas 2.4 by Michael Haardt |
+HB1 | HANDBOOK1 | The BASIC Handbook, 1st Edition |
+HB2 | HANDBOOK2 | The BASIC Handbook, 2nd Edition |
+H80 | HEATH | Heath Benton Harbor BASIC |
+G65 | MARK-I | GE 265 Mainframe BASIC |
+G67 | MARK-II | GE 435 Mainframe BASIC |
+M80 | MBASIC | Microsoft BASIC-80 for Xenix |
+D73 | PDP-8 | DEC PDP-8 BASIC |
+D70 | PDP-11 | DEC PDP-11 BASIC |
+R86 | RBASIC | Micronics RBASIC for 6809 FLEX |
+D71 | RSTS-11 | DEC RSTS-11 BASIC-PLUS |
+I70 | SYSTEM/360 | IBM System/360 Mainframe BASIC |
+I73 | SYSTEM/370 | IBM System/370 Mainframe BASIC |
+T80 | TRS-80 | TRS-80 Model I/III/4 LBASIC |
+V09 | VINTAGE | Vintage BASIC 1.0.1 |
+T79 | XBASIC | TSC XBASIC for 6800 FLEX |
+
+
+DETAILS
+
+COMMAND | B15 | B93 | S70 | C77 | D64 | E78 | E86 | G74 | H14 | HB1 | HB2 | H80 | G65 | G67 | M80 | D73 | D70 | R86 | D71 | I70 | I73 | T80 | V09 | T79 |
+APPEND filename$ | X | | | | | | | | | | X | | | | | | | X | | | | | | X |
+APPEND # filenumber | | | | | X | | | X | | | | | X | X | | | | | | | | | | |
+AS | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+AUTO [start [, increment]] | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
+BACKSPACE # X | | | | | X | | | X | | | | | X | X | | | | | | | | | | |
+BREAK line [, ...]] | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+BUILD [start [, increment]] | | | | | | | | | | | | X | | | | | | | | | | | | |
+BYE | X | | | | X | | | X | X | | X | X | X | X | | X | X | | X | | | | | |
+CALL subname( [parameter [, ...] ] ) | X | X | | | | | | | X | | X | | | | | | | | | | | | | |
+CASE constant [TO constant] | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+CASE IF operator constant | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+CASE IS operator constant | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+CASE ELSE | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+CHAIN filename$ [, linenumber] | X | X | X | X | | | | X | | X | X | X | X | X | X | | | X | X | X | X | X | | X |
+CHANGE A$ TO X | X | | | | X | | | X | | | X | | X | X | | | | | X | | | | | |
+CHANGE X TO A$ | X | | | | X | | | X | | | X | | X | X | | | | | X | | | | | |
+CLEAR | X | X | | | | | | | X | X | X | X | | | X | | | X | X | | | X | | X |
+CLOAD [filename$] | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
+CLOAD* arrayname | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
+CLOSE | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+CLOSE filename$ [, ...] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+CLOSE filenumber [, ...] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+CLR | | | | | | | | | | X | X | | | | | | | | | | | | | |
+CMDS | X | X | | | | | | | | | | | | | | | | | | | | | | |
+COMMON variable [, ...] | X | X | | X | | | X | | | | X | | | | X | | | | X | | | X | | |
+CONSOLE [WIDTH width] | | | | X | | | | | | | | | | | | | | | | | | | | |
+CONST variable [, ...] = value | X | | | | | | | | | | | | | | | | | | | | | | | |
+CONT | X | | | | | | | | | X | X | | | | X | | | X | X | | | X | | X |
+CONTINUE | | | | | | | | | | | | X | | | | | | | | | | | | |
+COPY source$ TO target$ | | | | | | | | | X | | | | | | | | | | | | | | | |
+CREATE filename$ [ RECL reclen ] AS filenum
+[ BUFF number ] [ RECS size ] | | | | X | | | | | | | | | | | | | | | | | | | | |
+CSAVE [filename$] | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
+CSAVE* ArrayName | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
+DATA constant [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+DEC variable [,...] | | | | | | | | | X | | | | | | | | | | | | | | | |
+DEF FNname[( arg [,...] )] = value | X | X | X | X | X | X | X | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+DEF FNname[( arg [,...] )] | X | | X | | | | | X | | X | X | X | | X | | X | X | | X | X | X | X | | |
+DEFBYT letter[-letter] [, ...] | X | | | | | | | | | | | | | | | | | | | | | | | |
+DEFCUR letter[-letter] [, ...] | X | | | | | | | | | | | | | | | | | | | | | | | |
+DEFDBL letter[-letter] [, ...] | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
+DEFINT letter[-letter] [, ...] | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
+DEFLNG letter[-letter] [, ...] | X | | | | | | | | | | | | | | | | | | | | | | | |
+DEFSNG letter[-letter] [, ...] | X | X | | | | | | | | X | X | | | | X | | | | X | | | X | | |
+DEFSTR letter[-letter] [, ...] | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
+DELETE filenumber | | | | X | | | | | | | | | | | | | | | | | | | | |
+DELETE line [- line] | X | X | | | | | | | X | X | X | X | | | X | X | X | | X | | | X | | |
+DELIMIT # X, A$ | | | | | | | | X | | | | | X | X | | | | | | | | | | |
+DIM [# filenum,] variable([ lower TO ] upper) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+DISPLAY source$ | | | | | | | | | X | | | | | | | | | | | | | | | |
+DO UNTIL value | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+DO | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+DO WHILE value | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+DOS | | | | | | | | | | | | | | | | | | X | | | | | | |
+DSP variable [, ...]] | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+EDIT | X | X | X | X | X | X | X | X | | X | X | X | X | X | X | | | X | X | X | X | X | | X |
+ELSE | X | X | | X | | | X | | X | X | X | X | | | X | X | X | X | X | | | X | X | X |
+ELSEIF | X | X | | X | | | X | | X | X | X | X | | | X | X | X | X | X | | | X | X | X |
+END | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+END FUNCTION | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+END IF | X | X | | X | | | X | | X | X | X | X | | | X | X | X | X | X | | | X | X | X |
+END SELECT | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+END SUB | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+ERASE variable [, ...] | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
+EXCHANGE variable, variable | X | | | | | | | | | | X | | | | | | | | | | | | | |
+EXIT | X | X | | | | | X | | X | | X | | | | | | | | | | | | | |
+EXIT DO | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+EXIT FOR | X | X | | | | | X | | X | | X | | | | | | | | | | | | | |
+EXIT FUNCTION | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+EXIT REPEAT | X | | | | | | | | X | | X | | | | | | | | | | | | | |
+EXIT SUB | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+EXIT WHILE | X | X | | | | | X | | | | | | | | | | | | | | | | | |
+FEND | | | | X | | | | | | | | | | | | | | | | | | | | |
+FIELD [#] filenum, number AS variable$ [, ...] | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+FILE filename$ [( reclen )] | | | | X | | | | | | | | | | | | | | | | | | | | |
+FILE # X, A$ | | | | X | X | | | X | | | | | X | X | | | | | | | | | | |
+FILES A$[, ...] | | | | | X | | | X | | | | | X | X | | | | | | | | | | |
+FLEX | | | | | | | | | | | | | | | | | | | | | | | | X |
+FNCS | X | X | | | | | | | | | | | | | | | | | | | | | | |
+FNEND | X | | X | | | | | X | | X | X | X | | X | | X | X | | X | X | X | X | | |
+FOR variable = start TO finish [STEP increment] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+FUNCTION [ ( parameter [, ... ] ) ] | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+GET # file_number , [ byte_number ] , scalar [,...] | | | | | | | | | X | | | | | | | | | | | | | | | |
+GET # file_number [ , RECORD record_number ] | | | | | | | | | | | | | | | | | | X | X | | | | | X |
+GET # file_number [ , RECORD record_number ] | | | | | | | | | | | | | | | | | | X | X | | | | | X |
+GET filename$ , scalar [, ...] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+GET # file_number [ , record_number ] | | | | | | | | | X | | | | | | | | | | | | | | | |
+GO | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+GO SUB line | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+GO TO line | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+GOODBYE | X | | | | X | | | X | | | X | | X | X | | | | | X | | | | | |
+GOSUB line | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+GOTO line | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+HELP name | X | | | | | | | | | | | | | | | | | | | | | | | |
+IF value THEN line1 [ELSE line2] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+IF END # filenum THEN line1 [ELSE line2] | | | | X | X | | | X | | | | | X | X | | | | | | | | | | |
+IF MORE # filenum THEN line1 [ELSE line2] | | | | | X | | | X | | | | | X | X | | | | | | | | | | |
+IF value THEN | X | X | | X | | | X | | X | X | X | X | | | X | X | X | X | X | | | X | X | X |
+IMAGE "format string" | | | X | | | | | | X | X | X | | | | | | | | | X | X | | | |
+INC variable [,...] | | | | | | | | | X | | | | | | | | | | | | | | | |
+INPUT "prompt string" , variable [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
+INPUT # filenum , variable [, ...]s | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
+INPUT variable [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
+INPUT LINE variable$ | X | | | | | | | | | | | X | | | X | | | X | X | | | X | | X |
+INPUT LINE # filenum , variable$ | X | | | | | | | | | | | X | | | X | | | X | X | | | X | | X |
+INPUT LINE "prompt string" , variable$ | X | | | | | | | | | | | X | | | X | | | X | X | | | X | | X |
+[LET] variable [, ...] = value | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+LINE | X | X | | | | | | | X | | X | X | | | X | | | X | X | | | X | | X |
+LINE INPUT [[#] filenum,]["prompt string";] variable$ | X | X | | | | | | | X | | X | X | | | X | | | X | X | | | X | | X |
+LIST line1 [- line2] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
+LISTNH line1 [- line2] | X | | X | X | X | | | X | | | | | X | X | | | | | X | X | X | | | |
+LLIST line1 [- line2] | X | | | X | | | | | X | | X | | | | X | | | | X | | | X | | |
+LOAD [filename$] | X | X | X | X | X | X | X | X | X | X | X | | X | X | X | | | X | X | X | X | X | | X |
+LOCAL [# filenum,] variable([ lower TO ] upper) | | | | | | | | | X | | | | | | | | | | | | | | | |
+LOOP UNTIL value | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+LOOP WHILE value | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+LOOP | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+LPRINT [USING format-string$;] value ... | X | | X | | | X | X | | X | | X | | | | X | | | | X | X | X | X | | |
+LPRINTER [WIDTH width] | | | | X | | | | | | | | | | | | | | | | | | | | |
+LPT [filename$] | | | | | | | | | | | | | | | | X | | | | | | | | |
+LSET variable$ = value | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+MAINTAINER | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER CMDS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER CMDS HTML | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER CMDS ID | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER CMDS MANUAL | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER CMDS_SWITCH | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER CMDS TABLE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER DEBUG | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER DEBUG OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER DEBUG ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER FNCS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER FNCS HTML | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER FNCS ID | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER FNCS MANUAL | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER FNCS SWITCH | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER FNCS TABLE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER MANUAL | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MAINTAINER STACK | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+MARGIN # filenumber, width | X | | | | X | | | X | | | X | | X | X | | | | | | | | | | |
+MAT arrayname = value | | | X | | X | | | X | X | X | X | | X | X | | | | | X | X | X | | | |
+MAT GET filename$, arrayname | | | X | | | | | X | | | | | X | X | | | | | | X | X | | | |
+MAT INPUT arrayname | | | X | | X | | | X | X | X | X | | X | X | | | | | X | X | X | | | |
+MAT PRINT arrayname | | | X | | X | | | X | X | X | X | | X | X | | | | | X | X | X | | | |
+MAT PUT filename$, arrayname | | | X | | | | | X | | | | | X | X | | | | | | X | X | | | |
+MAT READ arrayname | | | X | | X | | | X | X | X | X | | X | X | | | | | X | X | X | | | |
+MAT WRITE arrayname | | | | | X | | | X | X | X | X | | X | X | | | | | | | | | | |
+MERGE filename$ | X | X | | X | | | | | | | | | | | X | | | | X | | | X | | |
+MID$( variable$, start [, count ] ) = value | X | X | | X | | | | | X | | | X | | | X | | | | X | | | X | | |
+MON | | | | | | | | | | | | | | | | | | X | | | | | | |
+NAME old$ AS new$ | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+NEW | X | X | X | X | X | X | X | X | X | X | X | | X | X | X | X | X | X | X | X | X | X | | X |
+NEXT [variable] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OF | X | | X | X | X | X | X | X | | X | X | | X | X | X | | | X | X | X | X | X | | X |
+OLD [filename$] | | | | | X | | | X | | | | X | X | X | | X | X | | X | | | | | |
+ON value GOSUB line [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | X | X | X | X | X |
+ON value GOTO line [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | X | X | X | X | X |
+ON ERROR | X | X | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
+ON ERROR GOSUB errline | X | X | | | | | | | | | | | | | | | | | | | | | | |
+ON ERROR GOTO errline | X | | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
+ON ERROR RESUME | X | | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+ON ERROR RESUME NEXT | X | | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+ON ERROR RETURN | X | | | | | | | | | | | | | | | | | | | | | | | |
+ON ERROR RETURN NEXT | X | | | | | | | | | | | | | | | | | | | | | | | |
+ON TIMER count GOSUB line | X | | | | | | | | | | | | | | | | | | | | | | | |
+OPEN NEW|OLD|VIRTUAL filename$
+AS filenumber | | | | | | | | | | | | | | | | | | X | | | | | | X |
+OPEN filename$
+FOR INPUT|OUTPUT|APPEND|BINARY|RANDOM|VIRTUAL
+AS [#] fileenumber
+[LEN [=] record-length] | X | X | | | | | | | X | | X | | | | X | | | | | | | X | | |
+OPEN filename$
+FOR INPUT|OUTPUT|APPEND|BINARY|RANDOM|VIRTUAL
+AS FILE filenumber
+[ ,RECORDSIZE ignored ]
+[ ,CLUSTERSIZE ignored ]
+[ ,MODE ignored ] | | | | | | | | | | | | | | | | | | | X | | | | | |
+OPEN filename
+FOR READ|WRITE|VIRTUAL
+AS FILE filenumber | | | | | | | | | | | | X | | | | | | | | | | | | |
+OPEN filename$
+[ RECL reclen ]
+AS filenumber
+[ BUFF ignored ]
+[ RECS ignored ] | | | | X | | | | | | | | | | | | | | | | | | | | |
+OPEN filenumber,
+filename$,
+INPUT|OUTPUT|APPEND|VIRTUAL | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+OPTION | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ANGLE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ANGLE DEGREES | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ANGLE GRADIANS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ANGLE RADIANS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ARITHMETIC | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ARITHMETIC DECIMAL | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ARITHMETIC FIXED | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ARITHMETIC NATIVE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION BASE integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION BUGS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION BUGS BOOLEAN | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION BUGS OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION BUGS ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION COMPARE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION COMPARE BINARY | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION COMPARE DATABASE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION COMPARE TEXT | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION COVERAGE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION COVERAGE OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION COVERAGE ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION DATE format$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION DIGITS integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION DISABLE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION DISABLE COMMAND name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION DISABLE FUNCTION name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION DISABLE OPERATOR name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION EDIT string$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ENABLE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ENABLE COMMAND name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ENABLE FUNCTION name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ENABLE OPERATOR name$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ERROR | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ERROR GOSUB | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ERROR GOTO | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION EXPLICIT | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION EXTENSION string$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION FILES string$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION IMPLICIT | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION INDENT integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION LABELS | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION LABELS OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION LABELS ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PROMPT string$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT AT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT BYTE char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT COMMENT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT CURRENCY char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT DOUBLE char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT FILENUM char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT IMAGE char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT INPUT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT INTEGER char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT LONG char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT LPAREN char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT_PRINT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT QUOTE char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT RPAREN char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT SINGLE char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT STATEMENT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION PUNCT STRING char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION RECLEN integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION RENUM string$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ROUND | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ROUND BANK | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ROUND MATH | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ROUND TRUNCATE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION SCALE integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION SLEEP double | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION STDERR filename$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION STDIN filename$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION STDOUT filename$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION STRICT | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION STRICT OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION STRICT ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION TERMINAL | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION TERMINAL ADM | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION TERMINAL ANSI | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION TERMINAL NONE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION TIME format$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION TRACE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION TRACE OFF | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION TRACE ON | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING ALL char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING COMMA char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING DIGIT char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING DOLLAR char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING EXRAD char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING FILLER char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING FIRST char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING LENGTH char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING LITERAL char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING MINUS char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING PERIOD char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION USING PLUS char$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION VERSION version$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+OPTION ZONE integer | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+PAUSE [comment] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+PDEL line [- line] | | | | | | | | | | | | | | | | | | X | | | | | | X |
+POP | X | | | | | | | | | | X | | | | | | | | | | | | | |
+PRINT # filenum , [USING format$;] value ... | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
+PRINT [USING format$;] value ... | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+PTP [filename$] | | | | | | | | | | | | | | | | X | | | | | | | | |
+PTR [filename$] | | | | | | | | | | | | | | | | X | | | | | | | | |
+PUT # file_number , [ byte_number ] , scalar [,...] | | | | | | | | | X | | | | | | | | | | | | | | | |
+PUT filename$ , value [, ...] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+PUT # file_number [ , RECORD record_number ] | | | | | | | | | | | | | | | | | | X | X | | | | | X |
+PUT # file_number [ , record_number ] | | | | | | | | | X | | | | | | | | | | | | | | | |
+QUIT | X | | X | X | X | X | X | X | | | | | X | X | | | | | X | X | X | | | |
+READ variable [, ...] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+RECALL ArrayName | X | | | | | | | | | | X | | | | | | | | | | | | | |
+REM ... | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+RENAME from$ TO to$ | | | | | | | | | X | | | | | | | | | | | | | | | |
+RENAME [filename$] | | | | | X | | | X | | | | | X | X | | | | | X | | | | | |
+RENUM | X | X | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
+RENUMBER | | | | | | | | | | X | X | | | | | | | | | | | | | |
+REPEAT | X | | | | | | | | X | | X | | | | | | | | | | | | | |
+REPLACE [filename$] | | | | | | | | | | | | X | | | | | | | | | | | | |
+RESET filename$ [, ...] | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+RESTORE [line] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+RESUME | X | | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
+RESUME line | X | | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
+RESUME NEXT | X | | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
+RESUME 0 | X | | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
+RETURN | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+RSET variable$ = value | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+RUN filename$ | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
+RUN line | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
+RUN | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
+RUNNH line | X | | X | X | X | | | X | | | | | X | X | | | | | X | X | X | | | |
+RUNNH filename$ | X | | X | X | X | | | X | | | | | X | X | | | | | X | X | X | | | |
+RUNNH | X | | X | X | X | | | X | | | | | X | X | | | | | X | X | X | | | |
+SAVE [filename$] | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
+SCRATCH [# X] | | | | | | | | X | | | X | X | X | X | | | | | | | | | | |
+SELECT | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+SELECT CASE value | X | X | | | | | X | | X | | | | | | | | | | | | | | | |
+STEP | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+STOP | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+STORE ArrayName | X | | | | | | | | | | X | | | | | | | | | | | | | |
+SUB name [ ( parameter [,...] ) ] | X | X | | | | | X | | X | | X | | | | | | | | | | | | | |
+SUB END | | | | | | | | | X | | | | | | | | | | | | | | | |
+SUB EXIT | | | | | | | | | X | | | | | | | | | | | | | | | |
+SUBEND | X | | | | | | | | X | | X | | | | | | | | | | | | | |
+SUBEXIT | | | | | | | | | X | | | | | | | | | | | | | | | |
+SWAP variable, variable | X | X | | | | | | | X | | X | | | | X | | | X | X | | | X | | X |
+SYSTEM | X | X | X | X | X | X | X | X | X | X | X | | X | X | X | | | | X | X | X | X | X | |
+TEXT letter[-letter] [, ...] | | | | | | | | | | X | X | | | | | | | | | | | | | |
+THEN | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+TIMER | X | | | | | | | | | | | | | | | | | | | | | | | |
+TIMER OFF | X | | | | | | | | | | | | | | | | | | | | | | | |
+TIMER ON | X | | | | | | | | | | | | | | | | | | | | | | | |
+TIMER STOP | X | | | | | | | | | | | | | | | | | | | | | | | |
+TLOAD [filename$] | X | | | | | | | | | | X | | | | | | | | | | | | | |
+TO | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+TRACE | | | | | | | | X | | X | X | | | X | | | | | | | | | | |
+TRACE OFF | | | | | | | | X | | X | X | | | X | | | | | | | | | | |
+TRACE ON | | | | | | | | X | | X | X | | | X | | | | | | | | | | |
+TSAVE [filename$] | X | | | | | | | | | | X | | | | | | | | | | | | | |
+TTY | | | | | | | | | | | | | | | | X | | | | | | | | |
+TTY IN | | | | | | | | | | | | | | | | X | | | | | | | | |
+TTY OUT | | | | | | | | | | | | | | | | X | | | | | | | | |
+UNTIL value | X | | | | | | | | X | | X | | | | | | | | | | | | | |
+USE parameter$ | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+VARS | X | X | | | | | | | | | | | | | | | | | | | | | | |
+WEND | X | X | | X | | | | | X | X | X | | | | X | | | | X | | | X | | |
+WHILE value | X | X | | X | | | | | X | X | X | | | | X | | | | X | | | X | | |
+WRITE # filenum, value [, .... ] | X | X | | | | | | X | X | | | | X | X | X | | | | X | | | X | | |
+WRITE value [, .... ] | X | X | | | | | | X | X | | | | X | X | X | | | | X | | | X | | |
+
+
+
diff --git a/DOCS/FNCS.HTM b/DOCS/FNCS.HTM
index 530fd42..e0fe706 100644
--- a/DOCS/FNCS.HTM
+++ b/DOCS/FNCS.HTM
@@ -1,373 +1,373 @@
-FNCS
-LEGEND
-
-ID | NAME | DESCRIPTION |
-B15 | BYWATER | Bywater BASIC 3 |
-B93 | BYWATER-2 | Bywater BASIC 2 |
-S70 | CALL/360 | SBC CALL/360 Mainframe BASIC |
-C77 | CBASIC-II | CBASIC-II for CP/M |
-D64 | DARTMOUTH | Dartmouth DTSS BASIC |
-E78 | ECMA-55 | ANSI Minimal BASIC |
-E86 | ECMA-116 | ANSI Full BASIC |
-G74 | GCOS | GE 600 Mainframe BASIC |
-H14 | HAARDT | bas 2.4 by Michael Haardt |
-HB1 | HANDBOOK1 | The BASIC Handbook, 1st Edition |
-HB2 | HANDBOOK2 | The BASIC Handbook, 2nd Edition |
-H80 | HEATH | Heath Benton Harbor BASIC |
-G65 | MARK-I | GE 265 Mainframe BASIC |
-G67 | MARK-II | GE 435 Mainframe BASIC |
-M80 | MBASIC | Microsoft BASIC-80 for Xenix |
-D73 | PDP-8 | DEC PDP-8 BASIC |
-D70 | PDP-11 | DEC PDP-11 BASIC |
-R86 | RBASIC | Micronics RBASIC for 6809 FLEX |
-D71 | RSTS-11 | DEC RSTS-11 BASIC-PLUS |
-I70 | SYSTEM/360 | IBM System/360 Mainframe BASIC |
-I73 | SYSTEM/370 | IBM System/370 Mainframe BASIC |
-T80 | TRS-80 | TRS-80 Model I/III/4 LBASIC |
-V09 | VINTAGE | Vintage BASIC 1.0.1 |
-T79 | XBASIC | TSC XBASIC for 6800 FLEX |
-
-
-DETAILS
-
-FUNCTION | B15 | B93 | S70 | C77 | D64 | E78 | E86 | G74 | H14 | HB1 | HB2 | H80 | G65 | G67 | M80 | D73 | D70 | R86 | D71 | I70 | I73 | T80 | V09 | T79 |
-N = ABS( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = ACOS( X ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = ACS( X ) | X | | X | | | | | | | | X | | | | | | | | | X | X | | | |
-N = ACSD( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = ACSG( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = ANGLE( X, Y ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = ARCCOS( X ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
-N = ARCSIN( X ) | X | | | | | | | | | | X | | | | | | | X | | | | | | X |
-N = ARCTAN( X ) | X | | | | | | | | | X | X | | | | | | | X | | | | | | X |
-N = ARGC | X | | | | | | | | | | | | | | | | | | | | | | | |
-S$ = ARGT$( X ) | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = ARGV( X ) | X | | | | | | | | | | | | | | | | | | | | | | | |
-S$ = ARGV$( X ) | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = ASC( A$ ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | | X | X | X | X | X |
-N = ASC( A$, X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = ASCII( A$ ) | X | | | | | | | | | | X | | | | | | | | X | | | | | |
-N = ASIN( X ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = ASN( X ) | X | | X | | | | | | | X | X | | | | | | | | | X | X | | | |
-N = ASND( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = ASNG( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = ATAN( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = ATN( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = ATND( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = ATNG( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = BASE | X | | | | | | | | | | | | | | | | | | | | | | | |
-S$ = BIN$( X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-S$ = BIN$( X, Y ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = CATALOG | | | | | X | | | X | | | | | X | X | | | | | X | | | | | |
-N = CATALOG( A$ ) | | | | | X | | | X | | | | | X | X | | | | | X | | | | | |
-N = CCUR( X ) | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = CDBL( X ) | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
-N = CEIL( X ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-S$ = CHAR( X, Y ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-S$ = CHAR$( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = CHDIR( A$ ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-S$ = CHR( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-S$ = CHR( X ) | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-S$ = CHR$( X ) | X | X | | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | | | X | X | X |
-N = CIN( X ) | | | | | | | | | | | | X | | | | | | | | | | | | |
-N = CINT( X ) | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
-N = CLG( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = CLK( X ) | | | | | | | | X | | | | | X | X | | | | | | | | | | |
-S$ = CLK( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-S$ = CLK$ | X | | | | | | | X | | X | X | | | X | | | | | | | | | | |
-N = CLNG( X ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = CLOG( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = CLOSE | X | X | | | | | | | X | | | X | | | X | | | | X | | | X | | |
-N = CLOSE( X ) | X | X | | X | | | | | X | | X | X | | | X | | | X | X | | | X | | X |
-N = CLS | X | X | | | | | | | X | X | X | | | | X | | | | | | | X | | |
-N = CNTRL( X, Y ) | | | | | | | | | | | | X | | | | | | | | | | | | |
-N = CODE( A$ ) | X | | | | | | | | X | | X | | | | | | | | | | | | | |
-N = COLOR( X, Y ) | X | | | | | | | | X | | | | | | X | | | | | | | X | | |
-S$ = COMMAND$ | | | | | | | | | X | | | | | | | | | | | | | | | |
-S$ = COMMAND$( X ) | X | | | X | | | | | X | | | | | | | | | | | | | | | |
-N = COS( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = COSD( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = COSG( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = COSH( X ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = COT( X ) | X | | X | | | | X | X | | | | | | X | | | | | | X | X | | | |
-N = COUNT | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = CSC( X ) | X | | X | | | | X | | | | | | | | | | | | | X | X | | | |
-N = CSH( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = CSNG( X ) | X | X | | | | | | | | X | X | | | | X | | | | X | | | X | | |
-S$ = CUR( X, Y ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = CVC( A$ ) | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = CVD( A$ ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-N = CVI( A$ ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-N = CVL( A$ ) | X | | | | | | | | | | | | | | X | | | X | X | | | X | | X |
-N = CVS( A$ ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-S$ = DAT$ | | | | | | | | X | | | | | | X | | | | | | | | | | |
-N = DATE | X | | | | | | X | | | | | | | | | | | | | | | | | |
-S$ = DATE$ | X | X | | | | | X | | X | | | | | | X | | | X | X | | | X | | X |
-S$ = DATE$( X ) | | | | | | | | | | | | | | | | | | | X | | | | | |
-N = DEG | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = DEG( X ) | | | | | | | | | | | | | | | | | | X | | | | | | |
-N = DEG( X ) | X | | X | | | | X | | X | X | X | | | | | | | | | X | X | | | |
-N = DEGREE | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = DEGREE( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = DET | X | | X | | | | | X | X | | X | | | X | | | | | X | X | X | | | |
-N = DIGITS( X ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
-N = DIGITS( X, Y ) | | | | | | | | | | | X | | | | | | | X | | | | | | X |
-N = DIM( ... ) | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = DPEEK( X ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
-N = DPOKE( X, Y ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
-S$ = EDIT$( A$, X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = ENVIRON( A$ ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-S$ = ENVIRON$( A$ ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-N = EOF( X ) | X | X | | | | | | | X | | | X | | | X | | | | X | | | X | | |
-N = EPS( X ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = ERL | X | X | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
-N = ERR | X | X | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
-S$ = ERR$ | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = ERRL | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = ERRN | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = ERROR( X ) | X | X | | | | | | | | X | X | | | | X | | | | X | | | X | | |
-N = ERROR( X, A$ ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-S$ = ERROR$ | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = EXAM( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = EXEC( A$ ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
-N = EXF( ... ) | | | | | | | | | | | | | | | | | X | | | | | | | |
-N = EXP( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = FALSE | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = FETCH( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = FILEATTR( X, Y ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = FILES | X | X | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = FILES( A$ ) | X | X | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = FILL( X, Y ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = FIX( X ) | X | | X | | X | X | X | X | X | X | X | | X | X | X | | | | X | X | X | X | | |
-N = FLOAT( X ) | | | | X | | | | | | | | | | | | | | | | | | | | |
-N = FLOW | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = FP( X ) | X | | | | | | X | | X | | | | | | | | | | | | | | | |
-N = FRAC( X ) | X | | | | | | | | X | | X | | | | | | | | | | | | | |
-N = FRE | X | | | X | | | | | | X | X | | | | X | | | X | X | | | X | | X |
-N = FRE( A$ ) | X | | | | | | | | | X | X | | | | X | | | X | X | | | X | | X |
-N = FRE( X ) | X | | | | | | | | | X | X | | | | X | | | X | X | | | X | | X |
-N = FREE | | | | | | | | | | X | X | X | | | | | | | | | | | | |
-N = FREE( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = FREE( A$ ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = FREEFILE | X | | | | | | | | X | | | | | | | | | | | | | | | |
-N = GET( X ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-N = GET( X ) | | | | | | | | | | | | | | | | X | | | | | | | | |
-N = GET( X, Y ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-N = GRAD | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = GRADIAN | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = HCS( X ) | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-N = HEX( A$ ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
-S$ = HEX$( X ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-S$ = HEX$( X, Y ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = HOME | X | | | | | | | | X | X | X | | | | | | | | | | | | | |
-N = HSN( X ) | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-N = HTN( X ) | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-S$ = INCH$ | | | | | | | | | | | | | | | | | | X | | | | | | X |
-N = INDEX( A$, B$ ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = INITIALIZE | | | | X | | | | | | | | | | | | | | | | | | | | |
-S$ = INKEY$ | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
-N = INP( X ) | X | | | X | | | | | X | X | X | | | | X | | | | X | | | X | | |
-S$ = INPUT$( X ) | X | | | | | | | | X | | X | | | | X | | | | X | | | X | | |
-S$ = INPUT$( X, Y ) | X | | | | | | | | X | | | | | | X | | | | X | | | X | | |
-N = INSTR( A$, B$ ) | X | X | | | | | | | X | | X | | | | X | | | | X | | | X | | |
-N = INSTR( A$, B$, X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = INSTR( X, A$, B$ ) | X | X | | | | | | | X | | X | | | | X | | | X | X | | | X | | X |
-N = INT( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = INT( X ) | | | | X | | | | | X | | | | | | | | | | | | | | | |
-N = IP( X ) | X | | | | | | X | | X | | | | | | | | | | | | | | | |
-S$ = KEY | X | | | | | | | | | | X | | | | | | | | | | | | | |
-S$ = KEY$ | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = KILL( A$ ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-N = LBOUND( ... ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-S$ = LCASE$( A$ ) | X | | | X | | | X | | X | | | | | | X | | | | X | | | X | | |
-S$ = LEFT( A$, X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
-S$ = LEFT$( A$, X ) | X | X | | X | | | X | | X | X | X | X | | | X | | | | X | | | X | X | |
-N = LEN( A$ ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | X | X | X | X | X |
-N = LGT( X ) | | | X | | | | | | | X | X | | | | | | | | | X | X | | | |
-S$ = LIN( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = LN( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = LNO( X ) | | | | | | | | | | | | X | | | | | | | | | | | | |
-N = LOC( X ) | X | X | | | | | X | X | X | | | | X | X | X | | | | X | | | X | | |
-N = LOCATE( X, Y ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-N = LOCK( X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = LOF( X ) | X | X | | | | | X | X | X | | | | X | X | X | | | | X | | | X | | |
-N = LOG( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = LOG10( X ) | X | | | | | | X | | X | X | X | | | | | | | | X | | | | | |
-N = LOG2( X ) | X | | | | | | X | | X | | | | | | | | | | | | | | | |
-N = LOGE( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-S$ = LOWER$( A$ ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = LPOS | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-S$ = LTRIM$( A$ ) | X | | | | | | X | | X | | | | | | X | | | | X | | | X | | |
-N = LTW( X ) | | | X | | | | | | | | | | | | | | | | | X | X | | | |
-N = LWIDTH( X ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = MATCH( A$, B$, X ) | | | | X | | | | | X | | | X | | | | | | | | | | | | |
-S$ = MAX( A$, B$ ) | X | | X | | | | | | | | X | X | | | | | | | | X | X | | | |
-N = MAX( X, Y ) | X | | X | | | | X | | X | | X | X | | | | | | | | X | X | | | |
-N = MAXBYT | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MAXCUR | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MAXDBL | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MAXDEV | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MAXINT | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MAXLEN | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = MAXLEN( A$ ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = MAXLNG | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MAXLVL | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MAXNUM | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = MAXSNG | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MEM | | | | | | | | | | X | X | | | | | | | | | | | | | |
-S$ = MID( A$, X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
-S$ = MID( A$, X, Y ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
-S$ = MID$( A$, X ) | X | X | | X | | | X | | X | X | X | X | | | X | | | X | X | | | X | X | X |
-S$ = MID$( A$, X, Y ) | X | X | | X | | | X | | X | X | X | X | | | X | | | X | X | | | X | X | X |
-N = MIN( X, Y ) | X | | X | | | | X | | X | | X | X | | | | | | | | X | X | | | |
-S$ = MIN( A$, B$ ) | X | | X | | | | | | | | X | X | | | | | | | | X | X | | | |
-N = MINBYT | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MINCUR | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MINDBL | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MINDEV | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MININT | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MINLNG | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MINNUM | X | | | | | | | | | | | | | | | | | | | | | | | |
-N = MINSNG | X | | | | | | | | | | | | | | | | | | | | | | | |
-S$ = MKC$( X ) | X | | | | | | | | | | | | | | | | | | | | | | | |
-S$ = MKD$( X ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-N = MKDIR( A$ ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-S$ = MKI$( X ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-S$ = MKL$( X ) | X | | | | | | | | | | | | | | X | | | X | X | | | X | | X |
-S$ = MKS$( X ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
-N = MOD( X, Y ) | | | | | | | X | | | | | | | | | | | | | | | | | |
-N = NAME( A$, B$ ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = NAME( ... ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
-N = NOFLOW | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = NOTRACE | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = NULL( X ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = NUM | X | | | | | | | X | | | X | | | X | | | | | | | | | | |
-N = NUM( A$ ) | X | | X | | | | | | | | X | | | | | | | | | X | X | | | |
-S$ = NUM$( X ) | X | | X | | X | X | X | X | | X | X | | X | X | X | | | | X | X | X | X | | |
-S$ = OCT$( X ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-S$ = OCT$( X, Y ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = OPEN( A$, X, B$ ) | X | X | | | | | | | X | | | X | | | X | | | | X | | | X | | |
-N = OPEN( A$, X, B$, Y ) | X | X | | | | | | | X | | | X | | | X | | | | X | | | X | | |
-N = ORD( A$ ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = OUT( X, Y ) | X | | | X | | | | | X | X | X | X | | | X | | | | X | | | X | | |
-N = PAD( X ) | | | | | | | | | | | | X | | | | | | | | | | | | |
-N = PAUSE( X ) | X | | | | | | | | | | X | X | | | | | | | | | | | | |
-N = PDL( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = PEEK( X ) | X | | | X | | | | | X | X | X | X | | | X | | | X | X | | | X | | X |
-N = PI | X | | | | | | X | | X | X | X | | | | | | | | X | | | | | |
-N = PI( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = PIN( X ) | | | | | | | | | | X | X | X | | | | | | | | | | | | |
-N = POKE( X, Y ) | X | | | X | | | | | X | X | X | X | | | X | | | X | X | | | X | | X |
-N = POS | X | X | | X | | | | | X | | | X | | | X | | | X | X | | | X | | X |
-N = POS( X ) | X | | | | | | | | X | | X | X | | | X | | | X | X | | | X | | X |
-N = POS( A$, B$ ) | X | | | | | | X | | X | | X | | | | | | | | | | | | | |
-N = POS( A$, B$, X ) | X | | | | | | X | | X | | X | | | | | | | | | | | | | |
-N = PRECISION( X ) | | | | | | | | | | | X | | | | | | | | | | | | | |
-N = PTR( ... ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
-N = PUT( X ) | | | | | | | | | | | | | | | | X | | | | | | | | |
-N = PUT( X ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-N = PUT( X, Y ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-N = RAD | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = RAD( X ) | X | | X | | | | X | | X | | X | | | | | | | | | X | X | | | |
-N = RADIAN | X | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = RAN | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = RAN( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = RANDOM | | | | | X | | | X | | X | X | | X | X | | | | | | | | | | |
-N = RANDOM( X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
-N = RANDOMIZE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X | X | X | X | X | |
-N = RANDOMIZE( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | | X | X | X | X | | |
-N = REMAINDER( X, Y ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = RENAME( A$, B$ ) | | | | X | | | | | | | | | | | | | | X | | | | | | X |
-S$ = REPEAT$( X, A$ ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-S$ = REPEAT$( X, Y ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = RESET | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
-N = RESIDUE | | | | | | | | | | | | | | | | | | X | | | | | | |
-S$ = RIGHT( A$, X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
-S$ = RIGHT$( A$, X ) | X | X | | X | | | X | | X | X | X | X | | | X | | | X | X | | | X | X | X |
-N = RMDIR( A$ ) | X | X | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = RND | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = RND( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = ROUND( X, Y ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-S$ = RTRIM$( A$ ) | X | | | | | | X | | X | | | | | | X | | | | X | | | X | | |
-N = SCALE( X ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
-N = SEC( X ) | X | | X | | | | X | | | | | | | | | | | | | X | X | | | |
-N = SEEK( X ) | X | | | | | | X | | | | | | | | X | | | | X | | | X | | |
-N = SEEK( X, Y ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
-N = SEG( X ) | | | | | | | | | | | | X | | | | | | | | | | | | |
-S$ = SEG( A$, X, Y ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-S$ = SEG$( A$, X, Y ) | X | | | | | | | | X | | X | | | | | | | | | | | | | |
-N = SGN( X ) | X | X | X | X | X | X | X | X | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = SHELL( A$ ) | X | | | | | | | | X | | | | | | X | | | | X | | | X | | |
-N = SIN( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
-N = SIND( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = SING( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = SINH( X ) | X | | | | | | X | | | | X | | | | | | | | | | | | | |
-N = SIZE( A$ ) | | | | X | | | | | | | | | | | | | | | | | | | | |
-N = SIZE( ... ) | | | | | | | X | | | | | | | | | | | | | | | | | |
-N = SLEEP( X ) | X | | | | | | | | X | X | X | | | | | | | | X | | | | | |
-N = SNH( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-S$ = SPA( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-S$ = SPACE( X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
-S$ = SPACE$( X ) | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
-S$ = SPC( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = SQR( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = SQRT( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-S$ = STR( X, Y ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-S$ = STR$( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | X | X | X | X | X |
-S$ = STRING( X, Y ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-S$ = STRING$( X, A$ ) | X | X | | | | | X | | X | X | X | | | | X | | | | X | | | X | | |
-S$ = STRING$( X, Y ) | X | X | | | | | X | | X | X | X | | | | X | | | | X | | | X | | |
-S$ = STRIP$( A$ ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = STUFF( X, Y ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-S$ = TAB( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = TAN( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
-N = TAND( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = TANG( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
-N = TANH( X ) | X | | | | | | X | | | | X | | | | | | | | | | | | | |
-N = TI | | | | | | | | | | X | X | | | | | | | | | | | | | |
-S$ = TI$ | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = TIM | | | X | | | | | X | | X | X | | | X | | | | | | X | X | | | |
-N = TIM( X ) | | | | | | | | X | | X | X | | X | X | | | | | | | | | | |
-N = TIME | X | | | | | | X | | X | X | X | | | | | | | | X | | | | | |
-N = TIME( X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
-S$ = TIME$ | X | X | | | | | X | | X | X | X | | | | X | | | | X | | | X | | |
-S$ = TIME$( X ) | X | | | | | | | | | | X | | | | | | | | X | | | | | |
-N = TIMER | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-N = TOP | | | | | | | | | | | X | | | | | | | | | | | | | |
-N = TRACE | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = TRACE( X ) | | | | | | | | | | | | | | | | | | X | | | | | | |
-S$ = TRIM$( A$ ) | X | | | | | | X | | | | | | | | X | | | | X | | | X | | |
-N = TROFF | X | X | | | | | X | | X | X | X | | | | X | | | | X | | | X | | X |
-N = TRON | X | X | | | | | X | | X | X | X | | | | X | | | | X | | | X | | X |
-N = TRUE | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = TRUNCATE( X, Y ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-N = UBOUND( ... ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
-S$ = UCASE$( A$ ) | X | | | X | | | X | | X | | | | | | X | | | | X | | | X | | |
-N = UNLOCK( X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = UNSAVE( A$ ) | | | | | X | | | X | | | | X | X | X | | | | | X | | | | | |
-S$ = UPPER$( A$ ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = USR( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = USR0( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = USR1( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = USR2( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = USR3( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = USR4( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = USR5( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = USR6( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = USR7( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = USR8( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = USR9( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
-N = UUF( ... ) | | | | | | | | | | | | | | | | X | | | | | | | | |
-N = VAL( A$ ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | X | X | X | X | X |
-N = VARPTR( ... ) | | | | | | | | | | | | | | | X | | | | | | | | | |
-N = VTAB( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
-N = WAIT( X ) | X | | | | | | | | | X | X | | | | | | | | X | | | | | |
-N = WAIT( X, Y ) | X | | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
-N = WAIT( X, Y, Z ) | X | | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
-N = WIDTH( X ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
-N = WIDTH( X, Y ) | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
-N = ZONE( X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-N = ZONE( X, Y ) | | | | | | | | | X | | | | | | | | | | | | | | | |
-
-
-
+FNCS
+LEGEND
+
+ID | NAME | DESCRIPTION |
+B15 | BYWATER | Bywater BASIC 3 |
+B93 | BYWATER-2 | Bywater BASIC 2 |
+S70 | CALL/360 | SBC CALL/360 Mainframe BASIC |
+C77 | CBASIC-II | CBASIC-II for CP/M |
+D64 | DARTMOUTH | Dartmouth DTSS BASIC |
+E78 | ECMA-55 | ANSI Minimal BASIC |
+E86 | ECMA-116 | ANSI Full BASIC |
+G74 | GCOS | GE 600 Mainframe BASIC |
+H14 | HAARDT | bas 2.4 by Michael Haardt |
+HB1 | HANDBOOK1 | The BASIC Handbook, 1st Edition |
+HB2 | HANDBOOK2 | The BASIC Handbook, 2nd Edition |
+H80 | HEATH | Heath Benton Harbor BASIC |
+G65 | MARK-I | GE 265 Mainframe BASIC |
+G67 | MARK-II | GE 435 Mainframe BASIC |
+M80 | MBASIC | Microsoft BASIC-80 for Xenix |
+D73 | PDP-8 | DEC PDP-8 BASIC |
+D70 | PDP-11 | DEC PDP-11 BASIC |
+R86 | RBASIC | Micronics RBASIC for 6809 FLEX |
+D71 | RSTS-11 | DEC RSTS-11 BASIC-PLUS |
+I70 | SYSTEM/360 | IBM System/360 Mainframe BASIC |
+I73 | SYSTEM/370 | IBM System/370 Mainframe BASIC |
+T80 | TRS-80 | TRS-80 Model I/III/4 LBASIC |
+V09 | VINTAGE | Vintage BASIC 1.0.1 |
+T79 | XBASIC | TSC XBASIC for 6800 FLEX |
+
+
+DETAILS
+
+FUNCTION | B15 | B93 | S70 | C77 | D64 | E78 | E86 | G74 | H14 | HB1 | HB2 | H80 | G65 | G67 | M80 | D73 | D70 | R86 | D71 | I70 | I73 | T80 | V09 | T79 |
+N = ABS( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = ACOS( X ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = ACS( X ) | X | | X | | | | | | | | X | | | | | | | | | X | X | | | |
+N = ACSD( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = ACSG( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = ANGLE( X, Y ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = ARCCOS( X ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
+N = ARCSIN( X ) | X | | | | | | | | | | X | | | | | | | X | | | | | | X |
+N = ARCTAN( X ) | X | | | | | | | | | X | X | | | | | | | X | | | | | | X |
+N = ARGC | X | | | | | | | | | | | | | | | | | | | | | | | |
+S$ = ARGT$( X ) | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = ARGV( X ) | X | | | | | | | | | | | | | | | | | | | | | | | |
+S$ = ARGV$( X ) | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = ASC( A$ ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | | X | X | X | X | X |
+N = ASC( A$, X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = ASCII( A$ ) | X | | | | | | | | | | X | | | | | | | | X | | | | | |
+N = ASIN( X ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = ASN( X ) | X | | X | | | | | | | X | X | | | | | | | | | X | X | | | |
+N = ASND( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = ASNG( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = ATAN( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = ATN( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = ATND( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = ATNG( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = BASE | X | | | | | | | | | | | | | | | | | | | | | | | |
+S$ = BIN$( X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+S$ = BIN$( X, Y ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = CATALOG | | | | | X | | | X | | | | | X | X | | | | | X | | | | | |
+N = CATALOG( A$ ) | | | | | X | | | X | | | | | X | X | | | | | X | | | | | |
+N = CCUR( X ) | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = CDBL( X ) | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
+N = CEIL( X ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+S$ = CHAR( X, Y ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+S$ = CHAR$( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = CHDIR( A$ ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+S$ = CHR( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+S$ = CHR( X ) | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+S$ = CHR$( X ) | X | X | | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | | | X | X | X |
+N = CIN( X ) | | | | | | | | | | | | X | | | | | | | | | | | | |
+N = CINT( X ) | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
+N = CLG( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = CLK( X ) | | | | | | | | X | | | | | X | X | | | | | | | | | | |
+S$ = CLK( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+S$ = CLK$ | X | | | | | | | X | | X | X | | | X | | | | | | | | | | |
+N = CLNG( X ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = CLOG( X ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = CLOSE | X | X | | | | | | | X | | | X | | | X | | | | X | | | X | | |
+N = CLOSE( X ) | X | X | | X | | | | | X | | X | X | | | X | | | X | X | | | X | | X |
+N = CLS | X | X | | | | | | | X | X | X | | | | X | | | | | | | X | | |
+N = CNTRL( X, Y ) | | | | | | | | | | | | X | | | | | | | | | | | | |
+N = CODE( A$ ) | X | | | | | | | | X | | X | | | | | | | | | | | | | |
+N = COLOR( X, Y ) | X | | | | | | | | X | | | | | | X | | | | | | | X | | |
+S$ = COMMAND$ | | | | | | | | | X | | | | | | | | | | | | | | | |
+S$ = COMMAND$( X ) | X | | | X | | | | | X | | | | | | | | | | | | | | | |
+N = COS( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = COSD( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = COSG( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = COSH( X ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = COT( X ) | X | | X | | | | X | X | | | | | | X | | | | | | X | X | | | |
+N = COUNT | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = CSC( X ) | X | | X | | | | X | | | | | | | | | | | | | X | X | | | |
+N = CSH( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = CSNG( X ) | X | X | | | | | | | | X | X | | | | X | | | | X | | | X | | |
+S$ = CUR( X, Y ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = CVC( A$ ) | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = CVD( A$ ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+N = CVI( A$ ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+N = CVL( A$ ) | X | | | | | | | | | | | | | | X | | | X | X | | | X | | X |
+N = CVS( A$ ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+S$ = DAT$ | | | | | | | | X | | | | | | X | | | | | | | | | | |
+N = DATE | X | | | | | | X | | | | | | | | | | | | | | | | | |
+S$ = DATE$ | X | X | | | | | X | | X | | | | | | X | | | X | X | | | X | | X |
+S$ = DATE$( X ) | | | | | | | | | | | | | | | | | | | X | | | | | |
+N = DEG | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = DEG( X ) | | | | | | | | | | | | | | | | | | X | | | | | | |
+N = DEG( X ) | X | | X | | | | X | | X | X | X | | | | | | | | | X | X | | | |
+N = DEGREE | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = DEGREE( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = DET | X | | X | | | | | X | X | | X | | | X | | | | | X | X | X | | | |
+N = DIGITS( X ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
+N = DIGITS( X, Y ) | | | | | | | | | | | X | | | | | | | X | | | | | | X |
+N = DIM( ... ) | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = DPEEK( X ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
+N = DPOKE( X, Y ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
+S$ = EDIT$( A$, X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = ENVIRON( A$ ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+S$ = ENVIRON$( A$ ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+N = EOF( X ) | X | X | | | | | | | X | | | X | | | X | | | | X | | | X | | |
+N = EPS( X ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = ERL | X | X | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
+N = ERR | X | X | | | | | | | X | X | X | | | | X | | | X | X | | | X | | X |
+S$ = ERR$ | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = ERRL | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = ERRN | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = ERROR( X ) | X | X | | | | | | | | X | X | | | | X | | | | X | | | X | | |
+N = ERROR( X, A$ ) | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+S$ = ERROR$ | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = EXAM( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = EXEC( A$ ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
+N = EXF( ... ) | | | | | | | | | | | | | | | | | X | | | | | | | |
+N = EXP( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = FALSE | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = FETCH( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = FILEATTR( X, Y ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = FILES | X | X | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = FILES( A$ ) | X | X | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = FILL( X, Y ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = FIX( X ) | X | | X | | X | X | X | X | X | X | X | | X | X | X | | | | X | X | X | X | | |
+N = FLOAT( X ) | | | | X | | | | | | | | | | | | | | | | | | | | |
+N = FLOW | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = FP( X ) | X | | | | | | X | | X | | | | | | | | | | | | | | | |
+N = FRAC( X ) | X | | | | | | | | X | | X | | | | | | | | | | | | | |
+N = FRE | X | | | X | | | | | | X | X | | | | X | | | X | X | | | X | | X |
+N = FRE( A$ ) | X | | | | | | | | | X | X | | | | X | | | X | X | | | X | | X |
+N = FRE( X ) | X | | | | | | | | | X | X | | | | X | | | X | X | | | X | | X |
+N = FREE | | | | | | | | | | X | X | X | | | | | | | | | | | | |
+N = FREE( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = FREE( A$ ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = FREEFILE | X | | | | | | | | X | | | | | | | | | | | | | | | |
+N = GET( X ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+N = GET( X ) | | | | | | | | | | | | | | | | X | | | | | | | | |
+N = GET( X, Y ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+N = GRAD | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = GRADIAN | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = HCS( X ) | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+N = HEX( A$ ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
+S$ = HEX$( X ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+S$ = HEX$( X, Y ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = HOME | X | | | | | | | | X | X | X | | | | | | | | | | | | | |
+N = HSN( X ) | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+N = HTN( X ) | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+S$ = INCH$ | | | | | | | | | | | | | | | | | | X | | | | | | X |
+N = INDEX( A$, B$ ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = INITIALIZE | | | | X | | | | | | | | | | | | | | | | | | | | |
+S$ = INKEY$ | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
+N = INP( X ) | X | | | X | | | | | X | X | X | | | | X | | | | X | | | X | | |
+S$ = INPUT$( X ) | X | | | | | | | | X | | X | | | | X | | | | X | | | X | | |
+S$ = INPUT$( X, Y ) | X | | | | | | | | X | | | | | | X | | | | X | | | X | | |
+N = INSTR( A$, B$ ) | X | X | | | | | | | X | | X | | | | X | | | | X | | | X | | |
+N = INSTR( A$, B$, X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = INSTR( X, A$, B$ ) | X | X | | | | | | | X | | X | | | | X | | | X | X | | | X | | X |
+N = INT( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = INT( X ) | | | | X | | | | | X | | | | | | | | | | | | | | | |
+N = IP( X ) | X | | | | | | X | | X | | | | | | | | | | | | | | | |
+S$ = KEY | X | | | | | | | | | | X | | | | | | | | | | | | | |
+S$ = KEY$ | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = KILL( A$ ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+N = LBOUND( ... ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+S$ = LCASE$( A$ ) | X | | | X | | | X | | X | | | | | | X | | | | X | | | X | | |
+S$ = LEFT( A$, X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
+S$ = LEFT$( A$, X ) | X | X | | X | | | X | | X | X | X | X | | | X | | | | X | | | X | X | |
+N = LEN( A$ ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | X | X | X | X | X |
+N = LGT( X ) | | | X | | | | | | | X | X | | | | | | | | | X | X | | | |
+S$ = LIN( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = LN( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = LNO( X ) | | | | | | | | | | | | X | | | | | | | | | | | | |
+N = LOC( X ) | X | X | | | | | X | X | X | | | | X | X | X | | | | X | | | X | | |
+N = LOCATE( X, Y ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+N = LOCK( X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = LOF( X ) | X | X | | | | | X | X | X | | | | X | X | X | | | | X | | | X | | |
+N = LOG( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = LOG10( X ) | X | | | | | | X | | X | X | X | | | | | | | | X | | | | | |
+N = LOG2( X ) | X | | | | | | X | | X | | | | | | | | | | | | | | | |
+N = LOGE( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+S$ = LOWER$( A$ ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = LPOS | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+S$ = LTRIM$( A$ ) | X | | | | | | X | | X | | | | | | X | | | | X | | | X | | |
+N = LTW( X ) | | | X | | | | | | | | | | | | | | | | | X | X | | | |
+N = LWIDTH( X ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = MATCH( A$, B$, X ) | | | | X | | | | | X | | | X | | | | | | | | | | | | |
+S$ = MAX( A$, B$ ) | X | | X | | | | | | | | X | X | | | | | | | | X | X | | | |
+N = MAX( X, Y ) | X | | X | | | | X | | X | | X | X | | | | | | | | X | X | | | |
+N = MAXBYT | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MAXCUR | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MAXDBL | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MAXDEV | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MAXINT | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MAXLEN | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = MAXLEN( A$ ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = MAXLNG | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MAXLVL | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MAXNUM | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = MAXSNG | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MEM | | | | | | | | | | X | X | | | | | | | | | | | | | |
+S$ = MID( A$, X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
+S$ = MID( A$, X, Y ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
+S$ = MID$( A$, X ) | X | X | | X | | | X | | X | X | X | X | | | X | | | X | X | | | X | X | X |
+S$ = MID$( A$, X, Y ) | X | X | | X | | | X | | X | X | X | X | | | X | | | X | X | | | X | X | X |
+N = MIN( X, Y ) | X | | X | | | | X | | X | | X | X | | | | | | | | X | X | | | |
+S$ = MIN( A$, B$ ) | X | | X | | | | | | | | X | X | | | | | | | | X | X | | | |
+N = MINBYT | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MINCUR | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MINDBL | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MINDEV | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MININT | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MINLNG | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MINNUM | X | | | | | | | | | | | | | | | | | | | | | | | |
+N = MINSNG | X | | | | | | | | | | | | | | | | | | | | | | | |
+S$ = MKC$( X ) | X | | | | | | | | | | | | | | | | | | | | | | | |
+S$ = MKD$( X ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+N = MKDIR( A$ ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+S$ = MKI$( X ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+S$ = MKL$( X ) | X | | | | | | | | | | | | | | X | | | X | X | | | X | | X |
+S$ = MKS$( X ) | X | X | | | | | | | X | | | | | | X | | | X | X | | | X | | X |
+N = MOD( X, Y ) | | | | | | | X | | | | | | | | | | | | | | | | | |
+N = NAME( A$, B$ ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = NAME( ... ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
+N = NOFLOW | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = NOTRACE | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = NULL( X ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = NUM | X | | | | | | | X | | | X | | | X | | | | | | | | | | |
+N = NUM( A$ ) | X | | X | | | | | | | | X | | | | | | | | | X | X | | | |
+S$ = NUM$( X ) | X | | X | | X | X | X | X | | X | X | | X | X | X | | | | X | X | X | X | | |
+S$ = OCT$( X ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+S$ = OCT$( X, Y ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = OPEN( A$, X, B$ ) | X | X | | | | | | | X | | | X | | | X | | | | X | | | X | | |
+N = OPEN( A$, X, B$, Y ) | X | X | | | | | | | X | | | X | | | X | | | | X | | | X | | |
+N = ORD( A$ ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = OUT( X, Y ) | X | | | X | | | | | X | X | X | X | | | X | | | | X | | | X | | |
+N = PAD( X ) | | | | | | | | | | | | X | | | | | | | | | | | | |
+N = PAUSE( X ) | X | | | | | | | | | | X | X | | | | | | | | | | | | |
+N = PDL( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = PEEK( X ) | X | | | X | | | | | X | X | X | X | | | X | | | X | X | | | X | | X |
+N = PI | X | | | | | | X | | X | X | X | | | | | | | | X | | | | | |
+N = PI( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = PIN( X ) | | | | | | | | | | X | X | X | | | | | | | | | | | | |
+N = POKE( X, Y ) | X | | | X | | | | | X | X | X | X | | | X | | | X | X | | | X | | X |
+N = POS | X | X | | X | | | | | X | | | X | | | X | | | X | X | | | X | | X |
+N = POS( X ) | X | | | | | | | | X | | X | X | | | X | | | X | X | | | X | | X |
+N = POS( A$, B$ ) | X | | | | | | X | | X | | X | | | | | | | | | | | | | |
+N = POS( A$, B$, X ) | X | | | | | | X | | X | | X | | | | | | | | | | | | | |
+N = PRECISION( X ) | | | | | | | | | | | X | | | | | | | | | | | | | |
+N = PTR( ... ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
+N = PUT( X ) | | | | | | | | | | | | | | | | X | | | | | | | | |
+N = PUT( X ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+N = PUT( X, Y ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+N = RAD | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = RAD( X ) | X | | X | | | | X | | X | | X | | | | | | | | | X | X | | | |
+N = RADIAN | X | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = RAN | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = RAN( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = RANDOM | | | | | X | | | X | | X | X | | X | X | | | | | | | | | | |
+N = RANDOM( X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
+N = RANDOMIZE | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X | X | X | X | X | |
+N = RANDOMIZE( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | | X | X | X | X | | |
+N = REMAINDER( X, Y ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = RENAME( A$, B$ ) | | | | X | | | | | | | | | | | | | | X | | | | | | X |
+S$ = REPEAT$( X, A$ ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+S$ = REPEAT$( X, Y ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = RESET | X | | | | | | | | | X | X | | | | X | | | | X | | | X | | |
+N = RESIDUE | | | | | | | | | | | | | | | | | | X | | | | | | |
+S$ = RIGHT( A$, X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
+S$ = RIGHT$( A$, X ) | X | X | | X | | | X | | X | X | X | X | | | X | | | X | X | | | X | X | X |
+N = RMDIR( A$ ) | X | X | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = RND | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = RND( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = ROUND( X, Y ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+S$ = RTRIM$( A$ ) | X | | | | | | X | | X | | | | | | X | | | | X | | | X | | |
+N = SCALE( X ) | | | | | | | | | | | | | | | | | | X | | | | | | X |
+N = SEC( X ) | X | | X | | | | X | | | | | | | | | | | | | X | X | | | |
+N = SEEK( X ) | X | | | | | | X | | | | | | | | X | | | | X | | | X | | |
+N = SEEK( X, Y ) | X | | | | | | | | | | | | | | X | | | | X | | | X | | |
+N = SEG( X ) | | | | | | | | | | | | X | | | | | | | | | | | | |
+S$ = SEG( A$, X, Y ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+S$ = SEG$( A$, X, Y ) | X | | | | | | | | X | | X | | | | | | | | | | | | | |
+N = SGN( X ) | X | X | X | X | X | X | X | X | X | | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = SHELL( A$ ) | X | | | | | | | | X | | | | | | X | | | | X | | | X | | |
+N = SIN( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | X |
+N = SIND( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = SING( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = SINH( X ) | X | | | | | | X | | | | X | | | | | | | | | | | | | |
+N = SIZE( A$ ) | | | | X | | | | | | | | | | | | | | | | | | | | |
+N = SIZE( ... ) | | | | | | | X | | | | | | | | | | | | | | | | | |
+N = SLEEP( X ) | X | | | | | | | | X | X | X | | | | | | | | X | | | | | |
+N = SNH( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+S$ = SPA( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+S$ = SPACE( X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
+S$ = SPACE$( X ) | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
+S$ = SPC( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = SQR( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = SQRT( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+S$ = STR( X, Y ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+S$ = STR$( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | X | X | X | X | X |
+S$ = STRING( X, Y ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+S$ = STRING$( X, A$ ) | X | X | | | | | X | | X | X | X | | | | X | | | | X | | | X | | |
+S$ = STRING$( X, Y ) | X | X | | | | | X | | X | X | X | | | | X | | | | X | | | X | | |
+S$ = STRIP$( A$ ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = STUFF( X, Y ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+S$ = TAB( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = TAN( X ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X |
+N = TAND( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = TANG( X ) | X | | | | | | | | | | X | | | | | | | | | | | | | |
+N = TANH( X ) | X | | | | | | X | | | | X | | | | | | | | | | | | | |
+N = TI | | | | | | | | | | X | X | | | | | | | | | | | | | |
+S$ = TI$ | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = TIM | | | X | | | | | X | | X | X | | | X | | | | | | X | X | | | |
+N = TIM( X ) | | | | | | | | X | | X | X | | X | X | | | | | | | | | | |
+N = TIME | X | | | | | | X | | X | X | X | | | | | | | | X | | | | | |
+N = TIME( X ) | | | | | | | | | | X | X | | | | | | | | X | | | | | |
+S$ = TIME$ | X | X | | | | | X | | X | X | X | | | | X | | | | X | | | X | | |
+S$ = TIME$( X ) | X | | | | | | | | | | X | | | | | | | | X | | | | | |
+N = TIMER | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+N = TOP | | | | | | | | | | | X | | | | | | | | | | | | | |
+N = TRACE | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = TRACE( X ) | | | | | | | | | | | | | | | | | | X | | | | | | |
+S$ = TRIM$( A$ ) | X | | | | | | X | | | | | | | | X | | | | X | | | X | | |
+N = TROFF | X | X | | | | | X | | X | X | X | | | | X | | | | X | | | X | | X |
+N = TRON | X | X | | | | | X | | X | X | X | | | | X | | | | X | | | X | | X |
+N = TRUE | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = TRUNCATE( X, Y ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+N = UBOUND( ... ) | X | | | | | | X | | | | | | | | | | | | | | | | | |
+S$ = UCASE$( A$ ) | X | | | X | | | X | | X | | | | | | X | | | | X | | | X | | |
+N = UNLOCK( X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = UNSAVE( A$ ) | | | | | X | | | X | | | | X | X | X | | | | | X | | | | | |
+S$ = UPPER$( A$ ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = USR( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = USR0( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = USR1( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = USR2( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = USR3( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = USR4( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = USR5( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = USR6( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = USR7( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = USR8( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = USR9( ... ) | | | | | | | | | | | | | | | X | | | X | | | | X | | X |
+N = UUF( ... ) | | | | | | | | | | | | | | | | X | | | | | | | | |
+N = VAL( A$ ) | X | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | X | X | X | X | X | X |
+N = VARPTR( ... ) | | | | | | | | | | | | | | | X | | | | | | | | | |
+N = VTAB( X ) | | | | | | | | | | X | X | | | | | | | | | | | | | |
+N = WAIT( X ) | X | | | | | | | | | X | X | | | | | | | | X | | | | | |
+N = WAIT( X, Y ) | X | | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
+N = WAIT( X, Y, Z ) | X | | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
+N = WIDTH( X ) | X | X | | | | | | | X | | | | | | X | | | | X | | | X | | |
+N = WIDTH( X, Y ) | X | X | | | | | | | X | X | X | | | | X | | | | X | | | X | | |
+N = ZONE( X ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+N = ZONE( X, Y ) | | | | | | | | | X | | | | | | | | | | | | | | | |
+
+
+
diff --git a/Junk/Bwbasic-1.1-Manual.txt b/Junk/Bwbasic-1.1-Manual.txt
new file mode 100644
index 0000000..c331447
--- /dev/null
+++ b/Junk/Bwbasic-1.1-Manual.txt
@@ -0,0 +1,441 @@
+
+
+ Bywater BASIC Interpreter/Shell, version 1.10
+ ---------------------------------------------
+
+ Copyright (c) 1992, Ted A. Campbell
+ for bwBASIC version 1.10, 1 November 1992
+
+
+CONTENTS:
+
+ 1. DESCRIPTION
+ 2. TERMS OF USE
+ 3. COMMANDS AND FUNCTIONS IMPLEMENTED
+ 4. SOME NOTES ON USAGE
+ 5. UNIMPLEMENTED COMMANDS AND FUNCTIONS
+ 6. SOME NOTES ON COMPILATION
+ 7. THE STORY OF BYWATER BASIC
+ 8. COMMUNICATIONS
+
+
+1. DESCRIPTION
+
+ The Bywater BASIC Interpreter (bwBASIC) implements a large
+ superset of the ANSI Standard for Minimal BASIC (X3.60-1978)
+ in ANSI C and offers shell program facilities as an extension
+ of BASIC.
+
+ The set of BASIC commands and functions implemented is fairly
+ limited (see section three below), although more commands and
+ functions are implemented than appear in the specification
+ for Minimal BASIC. There are no commands that are terminal- or
+ hardware specific. (Seriously -- CLS may work under bwBASIC
+ on your DOS-based pc, but that is because bwBASIC shells
+ out to DOS when it does not recognize CLS and executes CLS there.)
+
+ The interpreter is slow. Whenever faced with a choice between
+ conceptual clarity and speed, I have consistently chosen
+ the former. The interpreter is the simplest design available,
+ and utilizes no system of intermediate code, which would speed
+ up considerably its operation. As it is, each line is interpreted
+ afresh as the interpreter comes to it.
+
+ bwBASIC implements one feature not available in previous BASIC
+ interpreters: a shell command can be entered interactively at the
+ bwBASIC prompt, and the interpreter will execute it under a
+ command shell. For instance, the command "dir *.bas" can be
+ entered in bwBASIC (under DOS, or "ls -l *.bas" under UNIX) and
+ it will be executed as from the operating system command line.
+ Shell commands can also be given on numbered lines in a bwBASIC
+ program, so that bwBASIC can be used as a shell programming
+ language. bwBASIC's implementation of the RMDIR, CHDIR, MKDIR,
+ NAME, KILL, ENVIRON, and ENVIRON$() commands and functions
+ offer further shell-processing capabilities.
+
+
+2. TERMS OF USE:
+
+ The bwBASIC source code and executables produced from it can be
+ used subject to the following statement which is included in
+ the header to all the source code files:
+
+ All U.S. and international copyrights are claimed by the
+ author. The author grants permission to use this code
+ and software based on it under the following conditions:
+ (a) in general, the code and software based upon it may be
+ used by individuals and by non-profit organizations; (b) it
+ may also be utilized by governmental agencies in any country,
+ with the exception of military agencies; (c) the code and/or
+ software based upon it may not be sold for a profit without
+ an explicit and specific permission from the author, except
+ that a minimal fee may be charged for media on which it is
+ copied, and for copying and handling; (d) the code must be
+ distributed in the form in which it has been released by the
+ author; and (e) the code and software based upon it may not
+ be used for illegal activities.
+
+
+3. BASIC COMMANDS AND FUNCTIONS IMPLEMENTED:
+
+ ABS( number )
+ ASC( string$ )
+ ATN( number )
+ CHAIN [MERGE] file-name [, line-number] [, ALL]
+ CHR$( number )
+ CINT( number )
+ CLEAR
+ CLOSE [[#]file-number]...
+ COMMON variable [, variable...]
+ COS( number )
+ CSNG( number )
+ CVD( string$ )
+ CVI( string$ )
+ CVS( string$ )
+ DATA constant[,constant]...
+ DATE$
+ DEF FNname(arg...)] = expression
+ DEFDBL letter[-letter](, letter[-letter])...
+ DEFINT letter[-letter](, letter[-letter])...
+ DEFSNG letter[-letter](, letter[-letter])...
+ DEFSTR letter[-letter](, letter[-letter])...
+ DELETE line[-line]
+ DIM variable(elements...)[variable(elements...)]...
+ END
+ ENVIRON variable-string = string
+ ENVIRON$( variable-string )
+ EOF( device-number )
+ ERASE variable[, variable]...
+ ERL
+ ERR
+ ERROR number
+ EXP( number )
+ FIELD [#] device-number, number AS string-variable [, number AS string-variable...]
+ FOR counter = start TO finish [STEP increment]
+ GET [#] device-number [, record-number]
+ GOSUB line
+ GOTO line
+ HEX$( number )
+ IF expression THEN statement [ELSE statement]
+ INPUT [# device-number]|[;]["prompt string";]list of variables
+ INSTR( [start-position,] string-searched$, string-pattern$ )
+ INT( number )
+ KILL file-name
+ LEFT$( string$, number-of-spaces )
+ LEN( string$ )
+ LET variable = expression
+ LINE INPUT [[#] device-number,]["prompt string";] string-variable$
+ LIST line[-line]
+ LOAD file-name
+ LOC( device-number )
+ LOF( device-number )
+ LOG( number )
+ LSET string-variable$ = expression
+ MERGE file-name
+ MID$( string$, start-position-in-string[, number-of-spaces ] )
+ MKD$( double-value# )
+ MKI$( integer-value% )
+ MKS$( single-value! )
+ NAME old-file-name AS new-file-name
+ NEW
+ NEXT counter
+ OCT$( number )
+ ON variable GOTO|GOSUB line[,line,line,...]
+ ON ERROR GOSUB line
+ OPEN O|I|R, [#]device-number, file-name [,record length]
+ file-name FOR INPUT|OUTPUT|APPEND AS [#]device-number [LEN = record-length]
+ OPTION BASE number
+ POS
+ PRINT [# device-number,][USING format-string$;] expressions...
+ PUT [#] device-number [, record-number]
+ RANDOMIZE number
+ READ variable[, variable]...
+ REM string
+ RESTORE line
+ RETURN
+ RIGHT$( string$, number-of-spaces )
+ RND( number )
+ RSET string-variable$ = expression
+ RUN [line][file-name]
+ SAVE file-name
+ SGN( number )
+ SIN( number )
+ SPACE$( number )
+ SPC( number )
+ SQR( number )
+ STOP
+ STR$( number )
+ STRING$( number, ascii-value|string$ )
+ SWAP variable, variable
+ SYSTEM
+ TAB( number )
+ TAN( number )
+ TIME$
+ TIMER
+ TROFF
+ TRON
+ VAL( string$ )
+ WEND
+ WHILE expression
+ WIDTH [# device-number,] number
+ WRITE [# device-number,] element [, element ]....
+
+ If DIRECTORY_CMDS is set to TRUE when the program is compiled,
+ then the following commands will be available:
+
+ CHDIR pathname
+ MKDIR pathname
+ RMDIR pathname
+
+ If DEBUG is set to TRUE when the program is compiled then
+ the following debugging commands (unique to bwBASIC) will
+ be available:
+
+ VARS (prints a list of all variables)
+ CMDS (prints a list of all commands)
+ FNCS (prints a list of all functions)
+
+ If COMMAND_SHELL is set to TRUE when the program is compiled,
+ then the user may enter a shell command at the bwBASIC prompt.
+
+
+4. SOME NOTES ON USAGE:
+
+ An interactive environment is provided, so that a line with a
+ line number can be entered at the bwBASIC prompt and it will be
+ added to the program in memory.
+
+ Line numbers are not strictly required, but are useful if the
+ interactive enviroment is used for programming. For longer
+ program entry one might prefer to use an ASCII text editor, and
+ in this case lines can be entered without numbers. In this case,
+ however, one will not be able to alter the numberless lines
+ within the interactive environment.
+
+ Command names and function names are not case sensitive,
+ so that "Run" and "RUN" and "run" are equivalent and "abs()"
+ and "ABS()" and "Abs()" are equivalent. HOWEVER: variable
+ names ARE case sensitive in bwbASIC, so that "d$" and "D$"
+ are different variables. This differs from some BASIC
+ implementations where variable names are not case sensitive.
+
+ A filename can be specified on the command line and will be
+ LOADed and RUN immediately, so that the command line
+
+ bwbasic prog.bas
+
+ will load and execute "prog.bas".
+
+ All programs are stored as ASCII text files.
+
+ TRUE is defined as -1 and FALSE is defined as 0 in the default
+ distribution of bwBASIC. These definitions can be changed by
+ those compiling bwBASIC (see file BWBASIC.H).
+
+ Assignment must be made to variables. This differs from some
+ implementations of BASIC where assignment can be made to a
+ function. Implication: "INSTR( 3, x$, y$ ) = z$" will not
+ work under bwBASIC.
+
+ Notes on the implementation of specific commands:
+
+ CVI(), CVD(), CVS(), MKI$(), MKD$(), MKS$(): These functions
+ are implemented, but are dependent on a) the sizes for integer,
+ float, and double values on particular systems, and b) how
+ particular versions of C store these numerical values. The
+ implication is that data files created using these functions
+ on a DOS-based microcomputer may not be translated correctly
+ by bwBASIC running on a Unix-based computer. Similarly, data
+ files created by bwBASIC compiled by one version of C may not be
+ readable by bwBASIC compiled by another version of C (even under
+ the same operating system). So be careful with these.
+
+ ENVIRON: The ENVIRON command requires BASIC strings on either
+ side of the equals sign. Thus:
+
+ environ "PATH" = "/usr/bin"
+
+ It might be noted that this differs from the implementation
+ of ENVIRON in some versions of BASIC, but bwBASIC's ENVIRON
+ allows BASIC variables to be used on either side of the equals
+ sign. Note that the function ENVIRON$() is different from the
+ command, and be aware of the fact that in some operating systems
+ an environment variable set within a program will not be passed
+ to its parent shell.
+
+ ERR: Note that if PROG_ERRORS has been defined when bwBASIC is
+ compiled, the ERR variable will not be set correctly upon
+ errors. It only works when standard error messages are used.
+
+ FOR and NEXT: In this implementation of bwBASIC, a NEXT
+ statement must appear in the first position in a program
+ line; it cannot appear in a line segment beyond a colon.
+
+ INPUT: bwBASIC cannot support the optional feature of INPUT
+ that suppresses the carriage-return and line-feed at the end
+ of the input. This is because ANSI C does not provide for any
+ means of input other than CR-LF-terminated strings.
+
+
+5. UNIMPLEMENTED COMMANDS AND FUNCTIONS
+
+ There are a few items not implemented that have been so long
+ a part of standard BASICs that their absence will seem surprising.
+ In each case, though, their implementation would require opera-
+ ting-system-specific functions or terminal-specific functions
+ that ANSI C cannot provide. Some specific examples:
+
+ CALL In some versions of BASIC, CALL is used to call a
+ machine language subroutine, but machine language
+ routines are highly system-specific. In other
+ BASICs (conforming to the more complete ANSI
+ definition of BASIC), CALL is used to call a
+ named subroutine. Although it's possible that
+ bwBASIC could develop as a numberless BASIC
+ with named subroutine calls, these features
+ are not implemented in this earliest released
+ version.
+
+ CLOAD See CALL above (machine language subroutines).
+
+ CONT See RESUME below (programmer ignorance?).
+
+ DEF USR See CALL above (machine language subroutines).
+
+ EDIT EDIT would be especially nice, but requires some
+ specific knowledge of how particular computers
+ handle interaction between the screen and the
+ keyboard. This knowledge isn't available within
+ the bounds of ANSI C alone ("innerhalb die Grenzen
+ der reinen Vernunft," with apologies to Immanuel
+ Kant).
+
+ FRE() The ability to report the amount of free memory
+ remaining is system-specific due to varying patterns
+ of memory allocation and access; consequently this
+ ability is not present in ANSI C and this function
+ is not available in bwBASIC.
+
+ FILES The FILES command requires a list of files conforming
+ to a specifier; ANSI C does not provide this. When
+ COMMAND_SHELL is defined as TRUE, users might want
+ to issue operating-system commands such as "DIR"
+ (DOS) or "ls -l" (Unix) to get a list of files.
+
+ INKEY$ This function requires a keyboard scan to indicate
+ whether a key is pending. Although this facility
+ is easily available on microcomputers (it is part
+ of the minimal CP/M Operating System), it is not
+ easily available on some more complex systems.
+ Consequently, it's not part of the C standard and
+ bwBASIC has not implemented INKEY$.
+
+ INPUT$() Similar to INKEY$ above, ANSI C by itself is not
+ able to read unechoed keyboard input, and can read
+ keyboard input only after a Carriage-Return has
+ been entered.
+
+ INP Calls to hardware ports, like machine-language
+ routines, are highly system-specific and cannot
+ be implemented in ANSI C alone.
+
+ LLIST See LPRINT below.
+
+ LPOS See LPRINT below.
+
+ LPRINT and LLIST, etc., require access to a printer device,
+ and this varies from one system to another. Users
+ might try OPENing the printer device on their own
+ operating system (e.g., "/dev/lp" on Unix systems,
+ or "PRN" under DOS) and see if printing can be done
+ from bwBASIC in this way.
+
+ NULL In this case, I am convinced that NULL is no longer
+ necessary, since very few printers now require NULLs
+ at the end of lines.
+
+ OUT See INP above (calls to hardware ports).
+
+ PEEK() PEEK and POKE enabled earlier BASICs to address
+ particular memory locations. Although bwBASIC
+ could possibly implement this command (POKE) and
+ this function (PEEK()), the limitation would be
+ highly limited by the different systems for
+ memory access in different systems.
+
+ POKE see PEEK() above.
+
+ RENUM Since unnumbered lines can be entered and
+ executed under bwBASIC, it would not be
+ possible to implement a RENUM routine.
+
+ RESUME Is this possible under ANSI C? If so, I
+ simply have failed to figure it out yet.
+ Mea culpa (but not maxima).
+
+ USR See CALL and DEF USR above (machine language
+ subroutines).
+
+ VARPTR See PEEK and POKE above.
+
+ WAIT See INP and OUT above.
+
+
+6. SOME NOTES ON COMPILATION
+
+ bwBASIC is written in ANSI C and takes advantage of some of the
+ enhancements of ANSI C over the older K&R standard. The program
+ expects to find standard ANSI C include files (such as ).
+ Because there is nothing terminal- or hardware-specific about it,
+ I should hope that it would compile correctly under any ANSI C
+ compiler, but you may have to construct your own makefile.
+
+ Two makefiles are currently provided: "makefile.qcl" will compile
+ the program utilizing the Microsoft QuickC (tm) line-oriented
+ compiler on DOS-based p.c.'s, and "makefile.gcc" will compile
+ the program utilizing the ANSI option of Gnu C++. I have also
+ compiled the program utilizing Borland's Turbo C++ (tm) on DOS-
+ based machines.
+
+ No alterations to flags are necessary for varied environments,
+ but the beginning of file allows the user to set
+ some debugging flags and to control some program defaults.
+ The file has a number of language-specific message
+ sets that can be controlled by setting the appropriate language
+ flag.
+
+
+7. THE STORY OF BYWATER BASIC
+
+ This program was originally begun in 1982 by my grandmother, Mrs.
+ Verda Spell of Beaumont, TX. She was writing the program using
+ an ANSI C compiler on an Osborne I CP/M computer and although my
+ grandfather (Lockwood Spell) had bought an IBM PC with 256k of
+ RAM my grandmother would not use it, paraphrasing George Herbert
+ to the effect that "He who cannot in 64k program, cannot in 512k."
+ She had used Microsoft BASIC and although she had nothing against
+ it she said repeatedly that she didn't understand why Digital
+ Research didn't "sue the socks off of Microsoft" for version 1.0
+ of MSDOS and so I reckon that she hoped to undercut Microsoft's
+ entire market and eventually build a new software empire on
+ the North End of Beaumont. Her programming efforts were cut
+ tragically short when she was thrown from a Beaumont to Port
+ Arthur commuter train in the summer of 1986. I found the source
+ code to bwBASIC on a single-density Osborne diskette in her knitting
+ bag and eventually managed to have it all copied over to a PC
+ diskette. I have revised it slightly prior to this release. You
+ should know, though, that I myself am an historian, not a programmer.
+
+
+8. COMMUNICATIONS:
+
+ Ted A. Campbell
+ Bywater Software
+ P.O. Box 4023
+ Duke Station
+ Durham, NC 27706
+ USA
+
+ email: tcamp@acpub.duke.edu
+
+
diff --git a/Junk/Bwbasic-2.1-Manual.txt b/Junk/Bwbasic-2.1-Manual.txt
new file mode 100644
index 0000000..934691c
--- /dev/null
+++ b/Junk/Bwbasic-2.1-Manual.txt
@@ -0,0 +1,1881 @@
+
+
+
+
+ Bywater BASIC Interpreter/Shell, version 2.10
+ ---------------------------------------------
+
+ Copyright (c) 1993, Ted A. Campbell
+ for bwBASIC version 2.10, 11 October 1993
+
+
+CONTENTS:
+
+ 1. DESCRIPTION
+ 2. TERMS OF USE
+ 3. QUICK REFERENCE LIST OF COMMANDS AND FUNCTIONS
+ 4. GENERAL NOTES ON USAGE
+ 5. EXPANDED REFERENCE FOR COMMANDS AND FUNCTIONS
+ 6. PREDEFINED VARIABLES
+ 7. UNIMPLEMENTED COMMANDS AND FUNCTIONS
+ and AGENDA FOR DEVELOPMENT
+ 8. THE STORY OF BYWATER BASIC
+ 9. COMMUNICATIONS
+
+ The author wishes to express his thanks to Mr. David MacKenzie,
+ who assisted in the development Unix installation and configuration
+ for this version.
+
+
+1. DESCRIPTION
+
+ The Bywater BASIC Interpreter (bwBASIC) implements a large
+ superset of the ANSI Standard for Minimal BASIC (X3.60-1978)
+ and a significant subset of the ANSI Standard for Full BASIC
+ (X3.113-1987) in C. It also offers shell programming facilities
+ as an extension of BASIC. bwBASIC seeks to be as portable
+ as possible.
+
+ bwBASIC can be configured to emulate features, commands, and
+ functions available on different types of BASIC interpreters;
+ see the file INSTALL for further installation information.
+
+ The interpreter is fairly slow. Whenever faced with a choice
+ between conceptual clarity and speed, I have consistently chosen
+ the former. The interpreter is the simplest design available,
+ and utilizes no system of intermediate code, which would speed
+ up considerably its operation. As it is, each line is interpreted
+ afresh as the interpreter comes to it.
+
+ bwBASIC implements one feature not available in previous BASIC
+ interpreters: a shell command can be entered interactively at the
+ bwBASIC prompt, and the interpreter will execute it under a
+ command shell. For instance, the command "dir *.bas" can be
+ entered in bwBASIC (under DOS, or "ls -l *.bas" under UNIX) and
+ it will be executed as from the operating system command line.
+ Shell commands can also be given on numbered lines in a bwBASIC
+ program, so that bwBASIC can be used as a shell programming
+ language. bwBASIC's implementation of the RMDIR, CHDIR, MKDIR,
+ NAME, KILL, ENVIRON, and ENVIRON$() commands and functions
+ offer further shell-processing capabilities.
+
+
+2. TERMS OF USE:
+
+ 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.
+
+
+3. QUICK REFERENCE LIST OF COMMANDS AND FUNCTIONS
+
+ Be aware that many of these commands and functions will not be
+ available unless you have set certain flags in the header files
+ (see the expanded reference section below for dependencies).
+
+ ABS( number )
+ ASC( string$ )
+ ATN( number )
+ CALL subroutine-name
+ CASE ELSE | IF partial-expression | constant
+ CHAIN [MERGE] file-name [, line-number] [, ALL]
+ CHDIR pathname
+ CHR$( number )
+ CINT( number )
+ CLEAR
+ CLOSE [[#]file-number]...
+ CLS
+ COMMON variable [, variable...]
+ COS( number )
+ CSNG( number )
+ CVD( string$ )
+ CVI( string$ )
+ CVS( string$ )
+ DATA constant[,constant]...
+ DATE$
+ DEF FNname(arg...)] = expression
+ DEFDBL letter[-letter](, letter[-letter])...
+ DEFINT letter[-letter](, letter[-letter])...
+ DEFSNG letter[-letter](, letter[-letter])...
+ DEFSTR letter[-letter](, letter[-letter])...
+ DELETE line[-line]
+ DIM variable(elements...)[variable(elements...)]...
+ DO NUM|UNNUM
+ DO [WHILE expression]
+ EDIT
+ ELSE
+ ELSEIF
+ END IF | FUNCTION | SELECT | SUB
+ ENVIRON variable-string = string
+ ENVIRON$( variable-string )
+ EOF( device-number )
+ ERASE variable[, variable]...
+ ERL
+ ERR
+ ERROR number
+ EXP( number )
+ FIELD [#] device-number, number AS string-variable [, number AS string-variable...]
+ FILES filespec$
+ FUNCTION
+ FOR counter = start TO finish [STEP increment]
+ GET [#] device-number [, record-number]
+ GOSUB line | label
+ GOTO line | label
+ HEX$( number )
+ IF expression THEN [statement [ELSE statement]]
+ INKEY$
+ INPUT [# device-number]|[;]["prompt string";]list of variables
+ INSTR( [start-position,] string-searched$, string-pattern$ )
+ INT( number )
+ KILL file-name
+ LEFT$( string$, number-of-spaces )
+ LEN( string$ )
+ LET variable = expression
+ LINE INPUT [[#] device-number,]["prompt string";] string-variable$
+ LIST line[-line]
+ LOAD file-name
+ LOC( device-number )
+ LOCATE line, column
+ LOF( device-number )
+ LOG( number )
+ LOOP [UNTIL expression]
+ LSET string-variable$ = expression
+ MERGE file-name
+ MID$( string$, start-position-in-string[, number-of-spaces ] )
+ MKD$( number )
+ MKDIR pathname
+ MKI$( number )
+ MKS$( number )
+ NAME old-file-name AS new-file-name
+ NEW
+ NEXT [counter]
+ OCT$( number )
+ ON variable GOTO|GOSUB line[,line,line,...]
+ ON ERROR GOSUB line
+ OPEN "O"|"I"|"R", [#]device-number, file-name [,record length]
+ file-name FOR INPUT|OUTPUT|APPEND AS [#]device-number [LEN = record-length]
+ OPTION BASE number
+ POS
+ PRINT [# device-number,][USING format-string$;] expressions...
+ PUT [#] device-number [, record-number]
+ QUIT
+ RANDOMIZE number
+ READ variable[, variable]...
+ REM string
+ RESTORE line
+ RETURN
+ RIGHT$( string$, number-of-spaces )
+ RMDIR pathname
+ RND( number )
+ RSET string-variable$ = expression
+ RUN [line][file-name]
+ SAVE file-name
+ SELECT CASE expression
+ SGN( number )
+ SIN( number )
+ SPACE$( number )
+ SPC( number )
+ SQR( number )
+ STOP
+ STR$( number )
+ STRING$( number, ascii-value|string$ )
+ SUB subroutine-name
+ SWAP variable, variable
+ SYSTEM
+ TAB( number )
+ TAN( number )
+ TIME$
+ TIMER
+ TROFF
+ TRON
+ VAL( string$ )
+ WEND
+ WHILE expression
+ WIDTH [# device-number,] number
+ WRITE [# device-number,] element [, element ]....
+
+
+4. GENERAL NOTES ON USAGE:
+
+ 4.a. Interactive Environment
+
+ An interactive environment is provided if the flag INTERACTIVE
+ is defined as TRUE in bwbasic.h, so that a line with a
+ line number can be entered at the bwBASIC prompt and it will be
+ added to the program in memory.
+
+ Line numbers are not strictly required, but are useful if the
+ interactive enviroment is used for programming. For longer
+ program entry one might prefer to use an ASCII text editor, and
+ in this case lines can be entered without numbers. One can use
+ DO NUM and DO UNNUM to number or unnumber lines. See also the
+ documentation below for the pseudo-command EDIT.
+
+ 4.b. Naming Conventions
+
+ Command names and function names are not case sensitive,
+ so that "Run" and "RUN" and "run" are equivalent and "abs()"
+ and "ABS()" and "Abs()" are equivalent. HOWEVER, variable
+ names ARE case sensitive in bwbASIC, so that "d$" and "D$"
+ are different variables. This differs from some BASIC
+ implementations where variable names are not case sensitive.
+
+ Variable names can use any alphabetic characters, the period
+ and underscore characters and decimal digits (but not in the
+ first position). They can be terminated with '#' or '!' to
+ allow Microsoft-type names, even though the precision is
+ irrelevant to bwBASIC.
+
+ 4.c. Numerical Constants
+
+ Numerical constants may begin with a digit 0-9 (decimal), with
+ the "&H" or "&h" (hexadecimal) or the "&o" or "&O" (octal).
+ Decimal numbers may terminated with 'E', 'e', 'D', or 'd'
+ followed by an exponent number to denote exponential notation.
+ Decimal constants may also be terminated by the '#' or '!'
+ to comply with Microsoft-style precision terminators, although
+ the precision specified will be irrelevant to bwBASIC.
+
+ 4.d. Command-Line Execution
+
+ A filename can be specified on the command line and will be
+ LOADed and RUN immediately, so that the command line
+
+ bwbasic prog.bas
+
+ will load and execute "prog.bas".
+
+ 4.e. Program Storage
+
+ All programs are stored as ASCII text files.
+
+ 4.f. TRUE and FALSE
+
+ TRUE is defined as -1 and FALSE is defined as 0 in the default
+ distribution of bwBASIC. These definitions can be changed by
+ those compiling bwBASIC (see file BWBASIC.H).
+
+ 4.g. Assignments
+
+ Assignment must be made to variables. This differs from some
+ implementations of BASIC where assignment can be made to a
+ function. Implication: "INSTR( 3, x$, y$ ) = z$" will not
+ work under bwBASIC.
+
+ 4.h. Operators and Precedence
+
+ bwBASIC recognizes the following operators, with their level
+ of precedence given (1 = highest):
+
+ ^ 1 exponentiation
+ * 2 multiplication
+ / 2 division
+ \ 3 integer division
+ + 5 addition
+ - 5 subtraction
+ = 6 equality or assignment
+ MOD 4 modulus (remainder) arithmetic
+ <> 7 inequality
+ < 8 less than
+ > 9 greater than
+ <= 10 less than or equal to
+ =< 10 less than or equal to
+ >= 11 greater than or equal to
+ => 11 greater than or equal to
+ NOT 12 negation
+ AND 13 conjunction
+ OR 14 disjunction
+ XOR 15 exclusive or
+ IMP 16 implication
+ EQV 17 equivalence
+
+ 4.h. Numerical Precision (NOT)
+
+ bwBASIC utilizes numbers with only one level of precision. If
+ the flag NUMBER_DOUBLE is defined as TRUE in bwbasic.h, the
+ precision implemented will be that of the C "double" data type;
+ otherwise (default) the precision will be that of the C "float"
+ type. At a number of points there are commands (or pseudo-
+ commands) that seem to recognize Microsoft-style precision
+ distinctions, but for the most part these are just work-around
+ aliases to allow Microsoft-style programs to be run.
+
+
+5. EXPANDED REFERENCE FOR COMMANDS AND FUNCTIONS
+
+ The "Dependencies" listed in the folowing reference materials
+ refers to flags that must be set to TRUE in bwbasic.h for the
+ associated command or function to be implemented. These flags
+ are as follows:
+
+ (core) Commands and Functions in any implementation of
+ bwBASIC; these are the ANSI Minimal BASIC core
+
+ INTERACTIVE Commands supporting the interactive programming
+ environment
+
+ COMMON_CMDS Commands beyond ANSI Minimal BASIC which are common
+ to Full ANSI BASIC and Microsoft BASICs
+
+ COMMON_FUNCS Functions beyond the ANSI Mimimal BASIC core, but
+ common to both ANSI Full BASIC and Microsoft-style
+ BASIC varieties
+
+ UNIX_CMDS Commands which require Unix-style directory and
+ environment routines not specified in C
+
+ STRUCT_CMDS Commands related to structured programming; all
+ of these are part of the Full ANSI BASIC standard
+
+ ANSI_FUNCS Functions unique to ANSI Full BASIC
+
+ MS_CMDS Commands unique to Microsoft BASICs
+
+ MS_FUNCS Functions unique to Microsoft BASICs
+
+
+ ------------------------------------------
+
+ Function: ABS( number )
+
+ Description: ABS returns the absolute value of the argument 'number'.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: ASC( string$ )
+
+ Description: ASC returns the ASCII code for the first letter in
+ the argument string$.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: ATN( number )
+
+ Description: ATN returns the arctangent value of the argument 'number'
+ in radians.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: CALL subroutine-name
+
+ Description: CALL calls a named subroutine (see SUB and END SUB).
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: CASE ELSE | IF partial-expression | constant
+
+ Description: CASE introduces an element of a SELECT CASE statement
+ (see SELECT CASE). CASE IF introduces a conditional
+ SELECT CASE element, and CASE ELSE introduces a
+ default SELECT CASE element.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: CHAIN [MERGE] file-name [, line-number] [, ALL]
+
+ Description: CHAIN passes control to another BASIC program.
+ Variables declared COMMON (q.v.) will be passed
+ to the new program.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: CHDIR pathname$
+
+ Description: CHDIR changes the current directory to that indicated
+ by the argument pathname$.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Function: CHR$( number )
+
+ Description: CHR$ returns a one-character string with the character
+ corresponding to the ASCII code indicated by argument
+ 'number'.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Function: CINT( number )
+
+ Description: CINT returns the truncated integer for the argument
+ 'number'.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: CLEAR
+
+ Description: CLEAR sets all numerical variables to 0, and all
+ string variables to null.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: CLOSE [[#]file-number]...
+
+ Description: CLOSE closes the file indicated by file-number
+ (see OPEN).
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: CLS
+
+ Description: CLS clears the display screen (IBM and compatibles
+ only as of version 2.10).
+
+ Dependencies: IMP_IQC and IMP_CMDLOC
+
+ ------------------------------------------
+
+ Command: CMDS
+
+ Description: CMDS is a debugging command that prints a list
+ of all implemented bwBASIC commands.
+
+ Dependencies: DEBUG
+
+ ------------------------------------------
+
+ Command: COMMON variable [, variable...]
+
+ Description: COMMON designates variables to be passed to a CHAINed
+ program (see CHAIN).
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Function: COS( number )
+
+ Description: COS returns the cosine of the argument 'number'
+ in radians.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: CSNG( number )
+
+ Description: CSNG is a pseudo-function that has no effect under
+ bwBASIC. It replicates a Microsoft-type command
+ that would convert the 'number' to single-precision.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: CVD( string$ )
+
+ Description: CVD converts the argument string$ into a bwBASIC
+ number (precision is irrelevant in bwBASIC since
+ bwBASIC numbers have only one precision).
+
+ Implenentation-Specific Notes:
+
+ CVD(), CVI(), CVS(), MKI$(), MKD$(), MKS$(): These functions
+ are implemented, but are dependent on a) the sizes for integer,
+ float, and double values on particular systems, and b) how
+ particular versions of C store these numerical values. The
+ implication is that data files created using these functions
+ on a DOS-based microcomputer may not be translated correctly
+ by bwBASIC running on a Unix-based computer. Similarly, data
+ files created by bwBASIC compiled by one version of C may not be
+ readable by bwBASIC compiled by another version of C (even under
+ the same operating system). So be careful with these.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: CVI( string$ )
+
+ Description: CVI converts the argument string$ into a bwBASIC
+ number (precision is irrelevant in bwBASIC since
+ bwBASIC numbers have only one precision; see also
+ the note on CVD).
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: CVS( string$ )
+
+ Description: CVI converts the argument string$ into a bwBASIC
+ number (precision is irrelevant in bwBASIC since
+ bwBASIC numbers have only one precision; see also
+ the note on CVD).
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: DATA constant[,constant]...
+
+ Description: DATA stores numerical and string constants to be
+ accessed by READ (q.v.).
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: DATE$
+
+ Description: DATE$ returns the current date based on the computer's
+ internal clock as a string in the form "YYYY-MM-DD".
+ As implemented under bwBASIC, DATE$ cannot be used for
+ assignment (i.e., to set the system date).
+
+ Note: bwBASIC presently (v2.10) does not allow assignment
+ to a function.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Command: DEF FNname(arg...)] = expression
+
+ Description: DEF defines a user-written function. This function
+ corresponds to Microsoft-type implementation, although
+ in bwBASIC DEF is a working equivalent of FUNCTION.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: DEFDBL letter[-letter](, letter[-letter])...
+
+ Description: DEFDBL declares variables with single-letter names
+ as numerical variables (precision is irrelevant in
+ bwBASIC).
+
+ Dependencies: MS_CMDS
+
+ ------------------------------------------
+
+ Command: DEFINT letter[-letter](, letter[-letter])...
+
+ Description: DEFINT declares variables with single-letter names
+ as numerical variables (precision is irrelevant in
+ bwBASIC).
+
+ Dependencies: MS_CMDS
+
+ ------------------------------------------
+
+ Command: DEFSNG letter[-letter](, letter[-letter])...
+
+ Description: DEFSNG declares variables with single-letter names
+ as numerical variables (precision is irrelevant in
+ bwBASIC).
+
+ Dependencies: MS_CMDS
+
+ ------------------------------------------
+
+ Command: DEFSTR letter[-letter](, letter[-letter])...
+
+ Description: DEFSTR declares variables with single-letter names
+ as string variables.
+
+ Dependencies: MS_CMDS
+
+ ------------------------------------------
+
+ Command: DELETE line[-line]
+
+ Description: DELETE deletes program lines indicated by the
+ argument(s). If you want to use DELETE for non-
+ numbered programs, first use DO NUM, then DELETE,
+ then DO UNNUM.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: DIM variable(elements...)[variable(elements...)]...
+
+ Description: DIM specifies variables that have more than one
+ element in a single dimension, i.e., arrayed
+ variables.
+
+ Note: As implemented under bwBASIC, DIM accepts only
+ parentheses as delimiters for variable fields.
+ (Some BASICs allow the use of square brackets.)
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: DO NUM|UNNUM
+
+ Description: DO NUM numbers all lines in a program. The first
+ line is given the number 10, and subsequent lines
+ are numbered consecutively in multiples of 10. DO
+ UNNUM removes all line numbers from a program.
+ NOTE that these functions do nothing to line
+ numbers, e.g., following a GOSUB or GOTO statement;
+ these commands cannot be used as a replacement for
+ RENUM (available in some systems, but not bwBASIC).
+ With these commands, however, one can develop
+ unnumbered programs by entering new lines with numbers,
+ then running DO UNNUM to remove the line numbers.
+ Together with LOAD and SAVE (q.v.) one can use
+ bwBASIC as a primitive text editor.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: DO [WHILE expression]
+
+ Description: DO implements a number of forms of program loops.
+ DO...LOOP simply loops; the only way out is by
+ EXIT; DO WHILE...LOOP loops while "expression" is
+ true (this is equivalent to the older WHILE-WEND
+ loop, also implemented in bwBASIC); DO...LOOP UNTIL
+ loops until the expression following UNTIL is true.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: EDIT
+
+ Description: EDIT is a pseudo-command which calls the text editor
+ specified in the variable BWB.EDITOR$ to edit the
+ program in memory. After the call to the text editor,
+ the (edited) prgram is reloaded into memory. The user
+ normally must specific a valid path and filename in
+ BWB.EDITOR$ before this command will be useful.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: ELSE
+
+ Description: ELSE introduces a default condition in a multi-line IF
+ statement.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: ELSEIF
+
+ Description: ELSEIF introduces a secondary condition in a multi-
+ line IF statement.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: END IF | FUNCTION | SELECT | SUB
+
+ Description: END IF ends a multi-line IF statement. END FUNCTION
+ ends a multi-line function definition. END SELECT
+ ends a SELECT CASE statement. END SUB ends a multi-
+ line subroutine definition.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: ENVIRON variable-string$ = string$
+
+ Description: ENVIRON sets the environment variable identified by
+ variable-string$ to string$.
+
+ It might be noted that this differs from the implementation
+ of ENVIRON in some versions of BASIC, but bwBASIC's ENVIRON
+ allows BASIC variables to be used on either side of the equals
+ sign. Note that the function ENVIRON$() is different from the
+ command, and be aware of the fact that in some operating systems
+ an environment variable set within a program will not be passed
+ to its parent shell.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Function: ENVIRON$( variable-string$ )
+
+ Description: ENVIRON$ returns the environment variable associated with
+ the name variable-string$.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: EOF( device-number )
+
+ Description: EOF returns TRUE (-1) if the device associated with
+ device-number is at the end-of-file, otherwise it
+ returns FALSE (0).
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: ERASE variable[, variable]...
+
+ Description: ERASE eliminates arrayed variables from a program.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Function: ERL
+
+ Description: ERL returns the line number of the most recent error.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: ERR
+
+ Description: ERR returns the error number of the most recent error.
+
+ Note that if PROG_ERRORS has been defined when bwBASIC is
+ compiled, the ERR variable will not be set correctly upon
+ errors. It only works when standard error messages are used.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: ERROR number
+
+ Description: ERROR simulates an error, i.e., displays the message
+ appropriate for that error. This command is helpful
+ in writing ON ERROR GOSUB routines that can identify
+ a few errors for special treatment and then ERROR ERR
+ (i.e., default handling) for all others.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: EXIT [FOR]
+
+ Description: EXIT by itself exits from a DO...LOOP loop;
+ EXIT FOR exits from a FOR...NEXT loop.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Function: EXP( number )
+
+ Description: EXP returns the exponential value of 'number'.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: FIELD [#] device-number, number AS string-variable$ [, number AS string-variable$...]
+
+ Description: FIELD allocates space in a random file buffer for device
+ indicated by device-number, allocating 'number' bytes
+ and assigning the bytes at this position to the variable
+ string-variable$.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: FILES filespec$
+
+ Description: FILES is a pseudocommand that invokes the directory program
+ specified in the variable BWB.FILES$ with the argument
+ filespec$. Normally, the user must set this variable
+ before FILES can be used. E.g., for PC-type computers,
+
+ BWB.FILES$ = "DIR"
+
+ will work, for Unix machines,
+
+ BWB.FILES$ = "ls -l"
+
+ etc.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: FNCS
+
+ Description: CMDS is a debugging command that prints a list
+ of all pre-defined bwBASIC functions.
+
+ Dependencies: DEBUG
+
+ ------------------------------------------
+
+ Command: FUNCTION
+
+ Description: FUNCTION introduces a function definition, normally
+ ending with END FUNCTION. In bwBASIC, FUNCTION and
+ DEF are qorking equivalents, so either can be used
+ with single-line function definitions or with multi-
+ line definitions terminated by END FUNCTION.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: FOR counter = start TO finish [STEP increment]
+
+ Description: FOR initiates a FOR-NEXT loop with the variable
+ 'counter' initially set to 'start' and incrementing
+ in 'increment' steps (default is 1) until 'counter'
+ equals 'finish'.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: GET [#] device-number [, record-number]
+
+ Description: GET reads the next reacord from a random-access file
+ or device into the buffer associated with that file.
+ If record-number is specified, the GET command reads the
+ specified record.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: GOSUB line | label
+
+ Description: GOSUB initiates a subroutine call to the line (or label)
+ specified. The subroutine must end with RETURN.
+
+ Dependencies: (core), but STRUCT_CMDS for labels
+
+ ------------------------------------------
+
+ Command: GOTO line | label
+
+ Description: GOTO branches program execution to the specified line
+ (or label).
+
+ Dependencies: (core), but STRUCT_CMDS for labels
+
+ ------------------------------------------
+
+ Function: HEX$( number )
+
+ Description: HEX$ returns a string giving the hexadecimal (base 16)
+ value for the 'number'.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: IF expression THEN [statement [ELSE statement]]
+
+ Description: IF evaluates 'expression' and performs the THEN
+ statement if it is true or (optionally) the
+ ELSE statement if it is FALSE. If STRUCT_CMDS
+ is set to TRUE, bwBASIC allows multi-line IF
+ statements with ELSE and ELSEIF cases, ending
+ with END IF.
+
+ Dependencies: (core), STRUCT_CMDS for multi-line IF statements
+
+ ------------------------------------------
+
+ Function: INKEY$
+
+ Description: INKEY$ reads the status of the keyboard, and a single
+ keypress, if available. If a keypress is not available,
+ then INKEY$ immediately returns a null string ("").
+ Currently (v2.10) implemented in bwx_iqc.c only.
+
+ Dependencies: IMP_IQC and IMP_CMDLOC
+
+ ------------------------------------------
+
+ Command: INPUT [# device-number]|[;]["prompt string";]list of variables
+
+ Description: INPUT allows input from the terminal or a device
+ specified by device-number. If terminal, the "prompt
+ string" is output, and input is assigned to the
+ appropriate variables specified.
+
+ bwBASIC does not support the optional feature of INPUT
+ that suppresses the carriage-return and line-feed at the end
+ of the input. This is because C alone does not provide for any
+ means of input other than CR-LF-terminated strings.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: INSTR( [start-position,] string-searched$, string-pattern$ )
+
+ Description: INSTR returns the position at which string-pattern$
+ occurs in string-searched$, beginning at start-position.
+ As implemented in bwBASIC, INSTR cannot be used for
+ assignments.
+
+ Note: bwBASIC presently (v2.10) does not allow assignment
+ to a function.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: INT( number )
+
+ Description: INT returns the largest integer less than or equal to
+ the argument 'number'. NOTE that this is not a "truncated"
+ integer function, for which see CINT.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: KILL file-name$
+
+ Description: KILL deletes the file specified by file-name$.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Function: LEFT$( string$, number-of-spaces )
+
+ Description: LEFT$ returns a substring a string$ with number-of-spaces
+ from the left (beginning) of the string). As implemented
+ under bwBASIC, it cannot be used for assignment.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: LEN( string$ )
+
+ Description: LEN returns the length in bytes of string$.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Command: LET variable = expression
+
+ Description: LET assigns the value of 'expression' to the variable.
+ As currently implemented, bwBASIC supports implied LET
+ statements (e.g., "X = 4.5678" at the beginning of
+ a line or line segment, but does not support assignment
+ to multiple variables (e.g., "x, y, z = 3.141596").
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: LINE INPUT [[#] device-number,]["prompt string";] string-variable$
+
+ Description: LINE INPUT reads entire line from the keyboard or a file
+ or device into string-variable$. If input is from the
+ keyboard (stdin), then "prompt string" will be printed
+ first. Unlike INPUT, LINE INPUT reads a whole line,
+ not stopping for comma-delimited data items.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: LIST line[-line]
+
+ Description: LIST lists program lines as specified in its argument.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: LOAD file-name
+
+ Description: LOAD loads an ASCII BASIC program into memory.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Function: LOC( device-number )
+
+ Description: LOC returns the next record that GET or PUT statements
+ will use.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: LOCATE line, column
+
+ Description: LOCATE addresses trhe curor to a specified line and
+ column. Currently (v2.10) implemented in bwx_iqc.c only.
+
+ Dependencies: IMP_IQC and IMP_CMDLOC
+
+ ------------------------------------------
+
+ Function: LOF( device-number )
+
+ Description: LOF returns the length of a file (specified by device-number)
+ in bytes.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: LOG( number )
+
+ Description: LOG returns the natural logarithm of the argument 'number'.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: LOOP [UNTIL expression]
+
+ Description: LOOP terminates a program loop: see DO.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: LSET string-variable$ = expression
+
+ Description: LSET transfers data from 'expression' to the left-hand
+ side of a string variable or random access buffer field.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: MERGE file-name
+
+ Description: MERGE adds program lines from 'file-name' to the program
+ in memory. Unlike LOAD, it does not clear the program
+ currently in memory.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Function: MID$( string$, start-position-in-string[, number-of-spaces ] )
+
+ Description: MID$ returns a substring of string$ beginning at
+ start-position-in-string and continuing for
+ number-of-spaces bytes.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: MKDIR pathname$
+
+ Description: MKDIR creates a new directory path as specified by
+ pathname$.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Function: MKD$( number )
+
+ Description: MKD$, MKI$, and MKS$ are all equivalent in bwBASIC.
+ They convert the numerical value 'number' into a string
+ which can be stored in a more compressed form in a file
+ (especially for random file access). Since bwBASIC does
+ not recognize differences in precision, these commands
+ are effectively equivalent.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: MKI$( number )
+
+ Description: Equivalent to MKD$ (q.v.)
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: MKS$( number )
+
+ Description: Equivalent to MKD$ (q.v.).
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: NAME old-file-name AS new-file-name
+
+ Description: NAME renames an existing file (old-file-name) as
+ new-file-name.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Command: NEW
+
+ Description: NEW deletes the program in memory and clears all
+ variables.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: NEXT [counter-variable]
+
+ Description: NEXT comes at the end of a FOR-NEXT loop; see FOR.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: OCT$( number )
+
+ Description: OCT$ returns a string giving the octal (base 8)
+ representation of 'number'.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: ON variable GOTO|GOSUB line[,line,line,...]
+
+ Description: ON either branches (GOTO) or calls a subroutine
+ (GOSUB) based on the rounded value of variable;
+ if it is 1, the first line is called, if 2, the second
+ line is called, etc.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: ON ERROR GOSUB line|label
+
+ Description: ON ERROR sets up an error handling subroutine. See
+ also ERROR.
+
+ Dependencies: COMMON_CMDS, STRUCT_CMDS for labels
+
+ ------------------------------------------
+
+ Command: OPEN "O"|"I"|"R", [#]device-number, file-name [,record length]
+ file-name FOR INPUT|OUTPUT|APPEND AS [#]device-number [LEN = record-length]
+
+ Description: OPEN allocates random access memory for access to a disk
+ file or other device. Note that two quite different forms
+ of the OPEN statement are supported. In the first form,
+ "O" (note that these letters must be encased in quotation
+ marks) denotes sequential output, "I" denotes sequential
+ input, and "R" denotes random-access input and output.
+ Once OPEN, any number of operations can be performed
+ on a device (see WRITE #, INPUT #, PRINT #, etc.).
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: OPTION BASE number
+
+ Description: OPTION BASE sets the lowest value for array subscripts,
+ either 0 or 1.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: POS
+
+ Description: POS returns the current cursor position in the line.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Command: PRINT [# device-number,][USING format-string$;] expressions...
+
+ Description: PRINT outputs text to the screen or to a file or device
+ specified by device-number. In the current implementation
+ of bwBASIC, expressions to be printed must be separated by
+ the comma (tabbed output), the semicolon (immediate
+ sequential output) or the plus sign (immediate sequential
+ output by string concatenation). Expressions separated
+ by blanks or tabs are not supported. If USING is specified,
+ a number of formatting marks may appear in the format
+ string:
+
+ ! prints the first character of a string
+
+ \\ prints 2+x characters of a string, where x =
+ the number of spaces between the backslashes
+
+ & variable-length string field
+
+ # represents a single digit in output format for
+ a number
+
+ . decimal point in a number
+
+ + sign of a number (will output + or -)
+
+ - trailing minus after a number
+
+ ** fill leading spaces with asterisks
+
+ $$ output dollar sign in front of a number
+
+ ^^ output number in exponential format
+
+ _ output next character literally
+
+ As currently implemented, the exponential format
+ will be that used by the C compiler.
+
+ Dependencies: (core), COMMON_FUNCS for USING
+
+ ------------------------------------------
+
+ Command: PUT [#] device-number [, record-number]
+
+ Description: PUT outputs the next available record or the record
+ specified by record-number to the file or device
+ denoted by device-number.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: QUIT
+
+ Description: QUIT is a synonym for SYSTEM; with INTERACTIVE
+ environment, it exits the program to the
+ operating system (or the calling program).
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: RANDOMIZE number
+
+ Description: RANDOMIZE seeds the random number generator (see RND).
+ Under bwBASIC, the TIMER function (q.v.) can be used
+ to supply a 'number' seed for the random number
+ generator.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: READ variable[, variable]...
+
+ Description: READ reads values from DATA statements and assigns these
+ values to the named variables. Variable types in a READ
+ statement must match the data types in DATA statements
+ as they are occurred. See also DATA and RESTORE.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: REM string
+
+ Description: REM allows remarks to be included in a program. As
+ currently implemented, the entire line following
+ REM is ignored by the interpreter (thus, even if
+ MULTISEG_LINES is set, a REM line will not be able
+ to find a segment delimiter (":") followed by another
+ line segment with command. bwBASIC does not currently
+ implement the Microsoft-style use of the single quotation
+ mark to denote remarks.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: RESTORE line
+
+ Description: RESTORE resets the line and position counters for DATA
+ and READ statements to the top of the program file or
+ to the beginning of the specified line. (Currently this
+ must be a line number.)
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: RETURN
+
+ Description: RETURN concludes a subroutine called by GOSUB.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: RIGHT$( string$, number-of-spaces )
+
+ Description: RIGHT$ returns a substring a string$ with number-of-spaces
+ from the right (end) of the string). As implemented
+ under bwBASIC, it cannot be used for assignment.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: RMDIR pathname
+
+ Description: RMDIR deletes the directory path indicated by pathname.
+
+ Dependencies: UNIX_CMDS
+
+ ------------------------------------------
+
+ Function: RND( number )
+
+ Description: RND returns a pseudo-random number. The 'number' value
+ is ignored by bwBASIC if supplied. The RANDOMIZE
+ command (q.v.) reseeds the random-number generator.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: RSET string-variable$ = expression
+
+ Description: RSET transfers data from 'expression' to the right-hand
+ side of a string variable or random access buffer field.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: RUN [line][file-name$]
+
+ Description: RUN executes the program in memory. If a file-name$ is
+ supplied, then the specified file is loaded into memory
+ and executed. If a line number is supplied, then execution
+ begins at that line.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: SAVE file-name$
+
+ Description: SAVE saves the program in memory to file-name$. bwBASIC
+ only saves files in ASCII format.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Command: SELECT CASE expression
+
+ Description: SELECT CASE introduces a multi-line conditional selection
+ statement. The expression given as the argument to SELECT
+ CASE will be evaluated by CASE statements following. The
+ SELECT CASE statement conclludes with an END SELECT
+ statement.
+
+ As currently implemented, CASE statements may be followed
+ by string values, but in this case only simple comparisons
+ (equals, not equals) can be performed.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Function: SGN( number )
+
+ Description: SGN returns the sign of the argument 'number', +1
+ for positive numbers, 0 for 0, and -1 for negative numbers.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: SIN( number )
+
+ Description: SIN returns the sine of the argument 'number'
+ in radians.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: SPACE$( number )
+
+ Description: SPACE$ returns a string of blank spaces 'number'
+ bytes long.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: SPC( number )
+
+ Description: SPC returns a string of blank spaces 'number'
+ bytes long.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Function: SQR( number )
+
+ Description: SQR returns the square root of the argument 'number'.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Command: STOP
+
+ Description: STOP interrupts program execution. As implemented under
+ bwBASIC, STOP issues a SIGINT signal.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: STR$( number )
+
+ Description: STR$ returns a string giving the decimal (base 10)
+ representation of the argument 'number'.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Function: STRING$( number, ascii-value|string$ )
+
+ Description: STRING$ returns a string 'number' bytes long consisting
+ of either the first character of string$ or the character
+ answering to the ASCII value ascii-value.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: SUB subroutine-name
+
+ Description: SUB introduces a named, multi-line subroutine. The
+ subroutine is called by a CALL statement, and concludes
+ with an END SUB statement.
+
+ Dependencies: STRUCT_CMDS
+
+ ------------------------------------------
+
+ Command: SWAP variable, variable
+
+ Description: SWAP swaps the values of two variables. The two variables
+ must be of the same type (either numerical or string).
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: SYSTEM
+
+ Description: SYSTEM exits from bwBASIC to the calling program or
+ (more usually) the operating system.
+
+ Dependencies: INTERACTIVE
+
+ ------------------------------------------
+
+ Function: TAB( number )
+
+ Description: TAB outputs spaces until the column indicated by
+ 'number' has been reached.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: TAN( number )
+
+ Description: TAN returns the tangent of the argument 'number'
+ in radians.
+
+ Dependencies: (core)
+
+ ------------------------------------------
+
+ Function: TIME$
+
+ Description: TIME$ returns the current time based on the computer's
+ internal clock as a string in the form "HH-MM-SS".
+ As implemented under bwBASIC, TIME$ cannot be used for
+ assignment (i.e., to set the system time).
+
+ Note: bwBASIC presently (v2.10) does not allow assignment
+ to a function.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Function: TIMER
+
+ Description: TIMER returns the time in the system clock in seconds
+ elapsed since midnight.
+
+ Dependencies: MS_FUNCS
+
+ ------------------------------------------
+
+ Command: TROFF
+
+ Description: TROFF turns of the trace facility; see TRON.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: TRON
+
+ Description: TRON turns on the trace facility. This facility will print
+ each line number in square brackets as the program is
+ executed. This is useful in debugging programs with
+ line numbers. To debug an unnumbered program with
+ TRON, call DO NUM first, but remember to call DO UNNUM
+ before you save the program later.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Function: VAL( string$ )
+
+ Description: VAL returns the numerical value of the string$.
+
+ Dependencies: COMMON_FUNCS
+
+ ------------------------------------------
+
+ Command: VARS
+
+ Description: VARS is a debugging command which prints a list of
+ all variables defined which have global scope.
+
+ Dependencies: DEBUG
+
+ ------------------------------------------
+
+ Command: WEND
+
+ Description: WEND concludes a WHILE-WEND loop; see WHILE.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: WHILE expression
+
+ Description: WHILE initiates a WHILE-WEND loop. The loop ends with
+ WEND, and execution reiterates through the loop as
+ long as the 'expression' is TRUE (-1).
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: WIDTH [# device-number,] number
+
+ Description: WIDTH sets screen or device output to 'number'
+ columns. device-number specifies the device
+ or file for oputput.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+ Command: WRITE [# device-number,] element [, element ]....
+
+ Description: WRITE outputs variables to the screen or to a file
+ or device specified by device-number. Commas
+ are inserted between expressions output, and strings
+ are enclosed in quotation marks.
+
+ Dependencies: COMMON_CMDS
+
+ ------------------------------------------
+
+
+6. PREDEFINED VARIABLES
+
+ BWB.EDITOR$
+ BWB.FILES$
+ BWB.PROMPT$
+ BWB.IMPLEMENTATION$
+
+ The commands EDIT and FILES are pseudo-commands that launch
+ shell programs named in the variables BWB.EDITOR$ and BWB.FILES$,
+ respectively. The default values for these variables can
+ be changed in bwbasic.h (DEF_EDITOR and DEF_FILES), or they
+ can be changed on the fly by the user. An idea might be to
+ initialize these variables in "profile.bas" for specific
+ implementations; for instance, BWB.FILES$ might be defined as
+ "ls -l" on Unix systems or "dir" on DOS systems.
+
+ The preset variable BWB.PROMPT$ can be used to set the prompt
+ string for bwBASIC. Again, it is suggested that a user-
+ selected promptcan be set up in a "profile.bas" to be
+ initialized each time bwBASIC starts. Note that special
+ characters can be added to the prompt string, e.g.,
+
+ BWB.PROMPT$ = "Ok"+CHR$(10)
+
+ will give an "Ok" prompt followed by a linefeed.
+
+ The preset variable BWB.IMPLEMENTATION$ will return "TTY" for
+ the bwx_tty implementation and will return "IQC" for the
+ IBM PC or Compatibles with QuickC (bwx_iqc) implementation.
+ This may be useful in determing which commands and functions
+ (specifically CLS, LOCATE, and INKEY$) may be available.
+
+
+7. UNIMPLEMENTED COMMANDS AND FUNCTIONS, and AGENDA FOR DEVELOPMENT
+
+ There are some items not implemented that have been so long
+ a part of standard BASICs that their absence will seem surprising.
+ In each case, though, their implementation would require opera-
+ ting-system-specific functions or terminal-specific functions
+ that cannot be universally provided. Some specific examples:
+
+ CLOAD Relies on CP/M or MSDOS conventions for binary
+ executable files.
+
+ CONT See RESUME below (programmer ignorance?).
+
+ DEF USR Relies on CP/M or MSDOS conventions for binary
+ executable files.
+
+ FRE() The ability to report the amount of free memory
+ remaining is system-specific due to varying patterns
+ of memory allocation and access; consequently this
+ ability is not present in ANSI or earlier versions
+ of C and this function is not available in bwBASIC.
+
+ INPUT$() C by itself is not able to read unechoed keyboard
+ input, and can read keyboard input only after a
+ Carriage-Return has been entered.
+
+ INP Calls to hardware ports, like machine-language
+ routines, are highly system-specific and cannot
+ be implemented in C alone.
+
+ LLIST See LPRINT below.
+
+ LPOS See LPRINT below.
+
+ LPRINT and LLIST, etc., require access to a printer device,
+ and this varies from one system to another. Users
+ might try OPENing the printer device on their own
+ operating system (e.g., "/dev/lp" on Unix systems,
+ or "PRN" under DOS) and see if printing can be done
+ from bwBASIC in this way.
+
+ NULL In this case, I am convinced that NULL is no longer
+ necessary, since very few printers now require NULLs
+ at the end of lines.
+
+ OUT See INP above (calls to hardware ports).
+
+ PEEK() PEEK and POKE enabled earlier BASICs to address
+ particular memory locations. Although bwBASIC
+ could possibly implement this command (POKE) and
+ this function (PEEK()), the limitation would be
+ highly limited by the different systems for
+ memory access in different systems.
+
+ POKE see PEEK() above.
+
+ RENUM Since unnumbered lines can be entered and
+ executed under bwBASIC, it would not be
+ possible to implement a RENUM routine.
+ Instead, bwBASIC uses DO NUM and DO UNNUM.
+
+ RESUME Is this possible under C? If so, I
+ simply have failed to figure it out yet.
+ Mea culpa (but not maxima).
+
+ USR See CALL and DEF USR above (machine language
+ subroutines).
+
+ VARPTR See PEEK and POKE above.
+
+ WAIT See INP and OUT above.
+
+ There are other commands, functions, and implementation details
+ that I am working on, and which are on the agenda list for future
+ versions of bwBASIC. These agenda include:
+
+ PARACT i.e., the ability to execute PARallel ACTions. This
+ is described in ANSI BASIC, although I have not seen it
+ implemented before. It will offer a rough, non-
+ preemptive form of multitasking within the scope
+ of a BASIC program. Programmers will note points at which
+ there are already hooks for PARACT in bwBASIC.
+
+ XMEM PC-type computers need to be able to use extended
+ memory. If we could use extended memory for program
+ lines, variables, and function defitions, we could
+ write much longer programs. This would entail,
+ however, a fairly serious rewriting of the program
+ to utilize memory handles for these storage features
+ instead of direct memory pointers.
+
+ Windows The addition of memory handles in addition to the
+ non-preemptive execution of program lines (in a
+ crude form, already present) will make it possible
+ to develop implementations for Windows and perhaps
+ for other graphical user interfaces. But what form
+ should this take? I have in mind presently a BASIC
+ that would run in the background, appearing only
+ as an icon in the GUI space, with pop-up editors
+ and output windows. Thus, the interpreted language
+ would serve a purpose something like 'cron' (a task
+ scheduler) under Unix systems. You may have some
+ reflections that would help me in this.
+
+ Graphics Here we face fairly critical differences in different
+ styles and implementations of graphics, e.g., between
+ GWBASIC, ANSI BASIC, VisualBASIC, etc. But it's
+ possible that Graphics commands and functions could
+ be added. These would all be implementation-specific.
+
+ The ANSI Standard for full BASIC does not specify which particular
+ commands or functions must be implemented, and in fact the standard
+ is very robust. Perhaps no implementation of BASIC would ever
+ include all of the items, but some ANSI commands and functions which
+ remain unimplemented are:
+
+ ACCESS
+ ANGLE
+ AREA
+ ARITHMETIC
+ ARRAY
+ ASK
+ BSTR
+ BVAL
+ CEIL
+ CELLS
+ CLIP
+ COLLATE
+ CONNECT
+ COSH
+ DATUM
+ DEBUG
+ DECIMAL
+ DECLARE
+ DEGREES
+ DEVICE
+ DISCONNECT
+ DISPLAY
+ DOT
+ DRAW
+ ERASE
+ EVENT
+ EXCEPTION
+ GRAPH
+ HANDLER
+ IMAGE
+ KEY
+ LCASE
+ LINES
+ LOG10
+ LOG2
+ MAT
+ MIX
+ MULTIPOINT
+ OUTIN
+ OUTPUT
+ PARACT
+ PICTURE
+ PIXEL
+ PLOT
+ POINTS
+ RADIANS
+ RECEIVE
+ RENUMBER
+ REWRITE
+ ROTATE
+ ROUND
+ SEIZE
+ SEND
+ SHIFT
+ SINH
+ TANH
+ TIMEOUT
+ TRACE
+ TRANSFORM
+ TRUNCATE
+ UBOUND
+ UCASE
+ VIEWPORT
+ WAIT
+ VIEWPORT
+ ZONEWIDTH
+
+
+8. THE STORY OF BYWATER BASIC
+
+ This program was originally begun in 1982 by my grandmother, Mrs.
+ Verda Spell of Beaumont, TX. She was writing the program using
+ an ANSI C compiler on an Osborne I CP/M computer and although my
+ grandfather (Lockwood Spell) had bought an IBM PC with 256k of
+ RAM my grandmother would not use it, paraphrasing George Herbert
+ to the effect that "He who cannot in 64k program, cannot in 512k."
+ She had used Microsoft BASIC and although she had nothing against
+ it she said repeatedly that she didn't understand why Digital
+ Research didn't "sue the socks off of Microsoft" for version 1.0
+ of MSDOS and so I reckon that she hoped to undercut Microsoft's
+ entire market and eventually build a new software empire on
+ the North End of Beaumont. Her programming efforts were cut
+ tragically short when she was thrown from a Beaumont to Port
+ Arthur commuter train in the summer of 1986. I found the source
+ code to bwBASIC on a single-density Osborne diskette in her knitting
+ bag and eventually managed to have it all copied over to a PC
+ diskette. I have revised it slightly prior to this release. You
+ should know, though, that I myself am an historian, not a programmer.
+
+
+9. COMMUNICATIONS:
+
+ email: tcamp@delphi.com
+
diff --git a/Junk/COPYING b/Junk/COPYING
new file mode 100644
index 0000000..86cf81a
--- /dev/null
+++ b/Junk/COPYING
@@ -0,0 +1,341 @@
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C) 19yy
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
diff --git a/Junk/bwb_cmd.c b/Junk/bwb_cmd.c
new file mode 100644
index 0000000..be2ba2d
--- /dev/null
+++ b/Junk/bwb_cmd.c
@@ -0,0 +1,10219 @@
+/***************************************************************
+
+ bwb_cmd.c Miscellaneous Commands
+ for Bywater BASIC Interpreter
+
+ Copyright (c) 1993, Ted A. Campbell
+ Bywater Software
+
+ email: tcamp@delphi.com
+
+ Copyright and Permissions Information:
+
+ All U.S. and international rights are claimed by the author,
+ Ted A. Campbell.
+
+ This software 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.
+
+***************************************************************/
+
+/*---------------------------------------------------------------*/
+/* NOTE: Modifications marked "JBV" were made by Jon B. Volkoff, */
+/* 11/1995 (eidetics@cerf.net). */
+/* */
+/* Those additionally marked with "DD" were at the suggestion of */
+/* Dale DePriest (daled@cadence.com). */
+/* */
+/* Version 3.00 by Howard Wulf, AF5NE */
+/* */
+/* Version 3.10 by Howard Wulf, AF5NE */
+/* */
+/* Version 3.20 by Howard Wulf, AF5NE */
+/* */
+/* Version 3.20A by Ken Martin Mainly corrected fprint issues */
+/* */
+/*---------------------------------------------------------------*/
+
+
+
+#include "bwbasic.h"
+
+static void bwb_copy_file (char *Source, char *Target);
+static LineType *bwb_delete (LineType * l);
+static void bwb_display_file (char *Source);
+static LineType *bwb_load (LineType * Line, char *Prompt, int IsNew);
+static void bwb_new (void);
+static LineType *bwb_run_filename_or_linenumber (LineType * L);
+static LineType *bwb_save (LineType * Line, char *Prompt);
+static LineType *bwb_system (LineType * l);
+static LineType *bwb_xlist (LineType * l, FILE * file);
+static LineType *bwx_run (LineType * Line, char *ProgramName);
+static void CommandOptionVersion (int n, char *OutputLine);
+static void CommandUniqueID (int i, char *UniqueID);
+static void CommandVector (int i, char *Vector);
+static VariableType *find_variable_by_type (char *name, int dimensions,
+ char VariableTypeCode);
+static void FixUp (char *Name);
+static LineType *H14_RENAME (LineType * l);
+static int line_read_matrix_redim (LineType * l, VariableType * v);
+static void ProcessEscapeChars (const char *Input, char *Output);
+static int xl_line (FILE * file, LineType * l);
+
+
+/*
+ fprintf( file, "------------------------------------------------------------\n");
+ 123456789012345678901234567890123456789012345678901234567890
+ fprintf( file, " SYNTAX: %s\n", IntrinsicCommandTable[n].Syntax);
+ sprintf( tbuf, "DESCRIPTION: %s\n", IntrinsicCommandTable[n].Description);
+ fprintf( file, " " );
+ fprintf( file, " [%c] %s\n", X, bwb_vertable[i].Name);
+ 1234567890123
+*/
+#define LEFT_LENGTH 13
+#define RIGHT_LENGTH 47
+#define TOTAL_LENGTH ( LEFT_LENGTH + RIGHT_LENGTH )
+
+/*
+--------------------------------------------------------------------------------------------
+ EDIT, RENUM, RENUMBER
+--------------------------------------------------------------------------------------------
+*/
+
+static LineType *
+bwx_run (LineType * Line, char *ProgramName)
+{
+ size_t n;
+ char *tbuf;
+
+ assert (Line != NULL);
+ assert( My != NULL );
+
+ if (is_empty_string (ProgramName))
+ {
+ WARN_BAD_FILE_NAME;
+ return (Line);
+ }
+ if (is_empty_string (My->ProgramFilename))
+ {
+ WARN_BAD_FILE_NAME;
+ return (Line);
+ }
+ n = bwb_strlen (ProgramName) + 1 + bwb_strlen (My->ProgramFilename);
+ if ((tbuf = (char *) calloc (n + 1 /* NulChar */ , sizeof (char))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (Line);
+ }
+ bwb_strcpy (tbuf, ProgramName);
+ bwb_strcat (tbuf, " ");
+ bwb_strcat (tbuf, My->ProgramFilename);
+ system (tbuf);
+ free (tbuf);
+ tbuf = NULL;
+
+ /* open edited file for read */
+ bwb_NEW (Line); /* Relocated by JBV (bug found by DD) */
+ if (bwb_fload (NULL) == FALSE)
+ {
+ WARN_BAD_FILE_NAME;
+ return (Line);
+ }
+ return (Line);
+}
+
+
+
+/***************************************************************
+
+ FUNCTION: bwb_edit()
+
+ DESCRIPTION: This function implements the BASIC EDIT
+ program by shelling out to a default editor
+ specified by the variable BWB.EDITOR$.
+
+ SYNTAX: EDIT
+
+***************************************************************/
+
+LineType *
+bwb_EDIT (LineType * Line)
+{
+ /*
+ SYNTAX: EDIT
+ */
+
+ assert (Line != NULL);
+ assert( My != NULL );
+
+ return bwx_run (Line, My->OptionEditString);
+}
+
+/***************************************************************
+
+ FUNCTION: bwb_renum()
+
+ DESCRIPTION: This function implements the BASIC RENUM
+ command by shelling out to a default
+ renumbering program called "renum".
+ Added by JBV 10/95
+
+ SYNTAX: RENUM
+
+***************************************************************/
+
+LineType *
+bwb_RENUM (LineType * Line)
+{
+ /*
+ SYNTAX: RENUM
+ */
+
+ assert (Line != NULL);
+ assert( My != NULL );
+
+ return bwx_run (Line, My->OptionRenumString);
+}
+
+LineType *
+bwb_RENUMBER (LineType * Line)
+{
+ /*
+ SYNTAX: RENUMBER
+ */
+
+ assert (Line != NULL);
+ assert( My != NULL );
+
+ return bwx_run (Line, My->OptionRenumString);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ REM
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_REM (LineType * L)
+{
+ /*
+ SYNTAX: REM comment
+ */
+ /*
+ This line holds BASIC comments.
+ */
+
+ assert (L != NULL);
+
+ line_skip_eol (L);
+ return L;
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ IMAGE
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_IMAGE (LineType * L)
+{
+ /*
+ SYNTAX: IMAGE print-using-format
+ */
+
+ assert (L != NULL);
+
+ line_skip_eol (L);
+ return L;
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ LET
+--------------------------------------------------------------------------------------------
+*/
+
+
+LineType *
+bwb_LET (LineType * L)
+{
+ /*
+ SYNTAX: LET variable [,...] = expression
+ */
+ VariableType *v;
+ VariantType x;
+ VariantType *X;
+
+ assert (L != NULL);
+ X = &x;
+ CLEAR_VARIANT (X);
+ /* read the list of variables */
+ do
+ {
+ if ((v = line_read_scalar (L)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ }
+ while (line_skip_seperator (L));
+
+ /* skip the equal sign */
+ if (line_skip_EqualChar (L))
+ {
+ /* OK */
+ }
+ else if (line_skip_word (L, "EQ"))
+ {
+ /* OK */
+ }
+ else if (line_skip_word (L, ".EQ."))
+ {
+ /* OK */
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+
+ /* evaluate the expression */
+ if (line_read_expression (L, X)) /* bwb_LET */
+ {
+ /* save the value */
+ if (line_is_eol (L) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+ L->position = L->Startpos;
+
+ /* for each variable, assign the value */
+ do
+ {
+ /* read a variable */
+ if ((v = line_read_scalar (L)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ assert (v != NULL);
+ assert (X != NULL);
+ if (var_set (v, X) == FALSE)
+ {
+ WARN_TYPE_MISMATCH;
+ goto EXIT;
+ }
+ }
+ while (line_skip_seperator (L));
+
+ /* we are now at the equals sign */
+ line_skip_eol (L);
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ }
+EXIT:
+ RELEASE_VARIANT (X);
+ return L;
+}
+
+
+LineType *
+bwb_CONST (LineType * L)
+{
+ /*
+ SYNTAX: CONST variable [,...] = expression
+ */
+ VariableType *v;
+ VariantType x;
+ VariantType *X;
+
+ assert (L != NULL);
+
+ X = &x;
+ CLEAR_VARIANT (X);
+ /* read the list of variables */
+ do
+ {
+ if ((v = line_read_scalar (L)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ }
+ while (line_skip_seperator (L));
+ /* we are now at the equals sign */
+
+ /* skip the equal sign */
+ if (line_skip_EqualChar (L))
+ {
+ /* OK */
+ }
+ else if (line_skip_word (L, "EQ"))
+ {
+ /* OK */
+ }
+ else if (line_skip_word (L, ".EQ."))
+ {
+ /* OK */
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+
+ /* evaluate the expression */
+ if (line_read_expression (L, X)) /* bwb_LET */
+ {
+ /* save the value */
+ if (line_is_eol (L) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+
+ /* for each variable, assign the value */
+ L->position = L->Startpos;
+ do
+ {
+ /* read a variable */
+ if ((v = line_read_scalar (L)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ assert (v != NULL);
+ assert (X != NULL);
+ if (var_set (v, X) == FALSE)
+ {
+ WARN_TYPE_MISMATCH;
+ goto EXIT;
+ }
+ }
+ while (line_skip_seperator (L));
+ /* we are now at the equals sign */
+
+ /* for each variable, mark as constant */
+ L->position = L->Startpos;
+ do
+ {
+ /* read a variable */
+ if ((v = line_read_scalar (L)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ assert (v != NULL);
+ v->VariableFlags |= VARIABLE_CONSTANT;
+ }
+ while (line_skip_seperator (L));
+ /* we are now at the equals sign */
+
+ line_skip_eol (L);
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ }
+EXIT:
+ RELEASE_VARIANT (X);
+ return L;
+}
+
+LineType *
+bwb_DEC (LineType * L)
+{
+ /*
+ SYNTAX: DEC variable [,...]
+ */
+ VariableType *v;
+ VariantType x;
+ VariantType *X;
+
+ assert (L != NULL);
+
+ X = &x;
+ CLEAR_VARIANT (X);
+ /* read the list of variables */
+ do
+ {
+ if ((v = line_read_scalar (L)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ if (v->VariableTypeCode == StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ goto EXIT;
+ }
+ }
+ while (line_skip_seperator (L));
+ /* we are now at the end of the line */
+
+ if (line_is_eol (L) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+ L->position = L->Startpos;
+
+ /* for each variable, assign the value */
+ do
+ {
+ /* read a variable */
+ if ((v = line_read_scalar (L)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ assert (v != NULL);
+ assert (X != NULL);
+ if (var_get (v, X) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ X->Number--;
+ if (var_set (v, X) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ }
+ while (line_skip_seperator (L));
+ /* we are now at the end of the line */
+EXIT:
+ RELEASE_VARIANT (X);
+ return L;
+}
+
+LineType *
+bwb_INC (LineType * L)
+{
+ /*
+ SYNTAX: INC variable [,...]
+ */
+ VariableType *v;
+ VariantType x;
+ VariantType *X;
+
+ assert (L != NULL);
+
+ X = &x;
+ CLEAR_VARIANT (X);
+ /* read the list of variables */
+ do
+ {
+ if ((v = line_read_scalar (L)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ if (v->VariableTypeCode == StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ goto EXIT;
+ }
+ }
+ while (line_skip_seperator (L));
+ /* we are now at the end of the line */
+
+ if (line_is_eol (L) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+ L->position = L->Startpos;
+
+ /* for each variable, assign the value */
+ do
+ {
+ /* read a variable */
+ if ((v = line_read_scalar (L)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ assert (v != NULL);
+ assert (X != NULL);
+ if (var_get (v, X) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ X->Number++;
+ if (var_set (v, X) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ }
+ while (line_skip_seperator (L));
+ /* we are now at the end of the line */
+EXIT:
+ RELEASE_VARIANT (X);
+ return L;
+}
+
+
+
+/*
+--------------------------------------------------------------------------------------------
+ GO
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_GO (LineType * L)
+{
+
+ assert (L != NULL);
+ WARN_SYNTAX_ERROR;
+ return L;
+}
+
+LineType *
+bwb_THEN (LineType * L)
+{
+
+ assert (L != NULL);
+ WARN_SYNTAX_ERROR;
+ return L;
+}
+
+LineType *
+bwb_TO (LineType * L)
+{
+
+ assert (L != NULL);
+ WARN_SYNTAX_ERROR;
+ return L;
+}
+
+LineType *
+bwb_STEP (LineType * L)
+{
+
+ assert (L != NULL);
+ WARN_SYNTAX_ERROR;
+ return L;
+}
+
+LineType *
+bwb_OF (LineType * L)
+{
+
+ assert (L != NULL);
+ WARN_SYNTAX_ERROR;
+ return L;
+}
+
+LineType *
+bwb_AS (LineType * L)
+{
+
+ assert (L != NULL);
+ WARN_SYNTAX_ERROR;
+ return L;
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ AUTO
+--------------------------------------------------------------------------------------------
+*/
+
+
+LineType *
+bwb_BUILD (LineType * L)
+{
+ /*
+ SYNTAX: BUILD
+ SYNTAX: BUILD start
+ SYNTAX: BUILD start, increment
+ */
+
+ assert (L != NULL);
+ return bwb_AUTO (L);
+}
+
+LineType *
+bwb_AUTO (LineType * L)
+{
+ /*
+ SYNTAX: AUTO
+ SYNTAX: AUTO start
+ SYNTAX: AUTO start , increment
+ */
+
+ assert (L != NULL);
+ assert( My != NULL );
+
+ My->AutomaticLineNumber = 0;
+ My->AutomaticLineIncrement = 0;
+
+ if (line_is_eol (L))
+ {
+ /* AUTO */
+ My->AutomaticLineNumber = 10;
+ My->AutomaticLineIncrement = 10;
+ return L;
+ }
+ if (line_read_line_number (L, &My->AutomaticLineNumber))
+ {
+ /* AUTO ### ... */
+ if (My->AutomaticLineNumber < MINLIN || My->AutomaticLineNumber > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return L;
+ }
+ if (line_is_eol (L))
+ {
+ /* AUTO start */
+ My->AutomaticLineIncrement = 10;
+ return L;
+ }
+ else if (line_skip_seperator (L))
+ {
+ /* AUTO ### , ... */
+ if (line_read_line_number (L, &My->AutomaticLineIncrement))
+ {
+ /* AUTO start , increment */
+ if (My->AutomaticLineIncrement < MINLIN
+ || My->AutomaticLineIncrement > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return L;
+ }
+ return L;
+ }
+ }
+ }
+ My->AutomaticLineNumber = 0;
+ My->AutomaticLineIncrement = 0;
+ WARN_SYNTAX_ERROR;
+ return L;
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ BREAK
+--------------------------------------------------------------------------------------------
+*/
+
+
+LineType *
+bwb_BREAK (LineType * l)
+{
+ /*
+ SYNTAX: BREAK
+ SYNTAX: BREAK line [,...]
+ SYNTAX: BREAK line - line
+ */
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->StartMarker != NULL );
+ assert( My->EndMarker != NULL );
+
+ if (line_is_eol (l))
+ {
+ /* BREAK */
+ /* remove all line breaks */
+ LineType *x;
+ for (x = My->StartMarker->next; x != My->EndMarker; x = x->next)
+ {
+ x->LineFlags &= ~LINE_BREAK;
+ }
+ return (l);
+ }
+ else
+ {
+ do
+ {
+ int head;
+ int tail;
+
+ if (line_read_line_sequence (l, &head, &tail))
+ {
+ /* BREAK 's' - 'e' */
+ LineType *x;
+ if (head < MINLIN || head > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ if (tail < MINLIN || tail > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ if (head > tail)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* valid range */
+ /* now go through and list appropriate lines */
+ for (x = My->StartMarker->next; x != My->EndMarker; x = x->next)
+ {
+ if (head <= x->number && x->number <= tail)
+ {
+ if (x->LineFlags & LINE_NUMBERED)
+ {
+ x->LineFlags |= LINE_BREAK;
+ }
+ }
+ }
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ while (line_skip_seperator (l));
+ }
+ return (l);
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ DSP
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_DSP (LineType * l)
+{
+ /*
+ SYNTAX: DSP
+ SYNTAX: DSP variablename [,...]
+ */
+ VariableType *v;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+
+ if (line_is_eol (l))
+ {
+ /* DSP */
+ /* remove all variable displays */
+ for (v = My->VariableHead; v != NULL; v = v->next)
+ {
+ v->VariableFlags &= ~VARIABLE_DISPLAY; /* bwb_DSP() */
+ }
+ return (l);
+ }
+ /* DSP variablename [,...] */
+ do
+ {
+ char varname[NameLengthMax + 1];
+
+ if (line_read_varname (l, varname))
+ {
+ /* mark the variable */
+ for (v = My->VariableHead; v != NULL; v = v->next)
+ {
+ if (bwb_stricmp (v->name, varname) == 0)
+ {
+ v->VariableFlags |= VARIABLE_DISPLAY; /* bwb_DSP() */
+ }
+ }
+ }
+ }
+ while (line_skip_seperator (l));
+ return (l);
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ GOTO
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_GO_TO (LineType * l)
+{
+
+ assert (l != NULL);
+ return bwb_GOTO (l);
+}
+
+LineType *
+bwb_GOTO (LineType * l)
+{
+ /*
+ SYNTAX: GOTO line ' standard GOTO
+ SYNTAX: GOTO expression ' calculated GOTO
+ SYNTAX: GOTO expression OF line,... ' indexed GOTO, same as ON expression GOTO line,...
+ SYNTAX: GOTO line [,...] ON expression ' indexed GOTO, same as ON expression GOTO line,...
+ */
+ int Value;
+ int LineNumber;
+ LineType *x;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ Value = 0;
+ LineNumber = 0;
+ if (l->LineFlags & (LINE_USER))
+ {
+ WARN_ILLEGAL_DIRECT;
+ return (l);
+ }
+
+ if (line_is_eol (l))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_integer_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if (line_is_eol (l))
+ {
+ /* GOTO linenumber */
+ /* 'Value' is the line number */
+ LineNumber = Value;
+ }
+ else if (line_skip_word (l, "OF"))
+ {
+ /* GOTO expression OF line, ... */
+ /* 'Value' is an index into a list of line numbers */
+ if (line_read_index_item (l, Value, &LineNumber))
+ {
+ /* found 'LineNumber' */
+ }
+ else if (My->CurrentVersion->OptionFlags & (OPTION_BUGS_ON) ) /* GOTO X OF ... */
+ {
+ /* silently fall-thru to the following line */
+ line_skip_eol (l);
+ return (l);
+ }
+ else
+ {
+ /* ERROR */
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ }
+ else if (My->CurrentVersion->OptionVersionValue & (S70 | I70 | I73))
+ {
+ /* GOTO line [,...] ON expression */
+ while (line_skip_seperator (l))
+ {
+ if (line_read_integer_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ if (line_skip_word (l, "ON") == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_integer_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* 'Value' is an index into a list of line numbers */
+ l->position = l->Startpos;
+ if (line_read_index_item (l, Value, &LineNumber))
+ {
+ /* found 'LineNumber' */
+ }
+ else
+ {
+ /* silently fall-thru to the following line */
+ line_skip_eol (l);
+ return (l);
+ }
+ line_skip_eol (l);
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if (LineNumber < MINLIN || LineNumber > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ /* valid range */
+ x = NULL;
+#if THE_PRICE_IS_RIGHT
+ if (l->OtherLine != NULL)
+ {
+ /* look in the cache */
+ if (l->OtherLine->number == LineNumber)
+ {
+ x = l->OtherLine; /* found in cache */
+ }
+ }
+#endif /* THE_PRICE_IS_RIGHT */
+ if (x == NULL)
+ {
+ x = find_line_number (LineNumber); /* not found in the cache */
+ }
+ if (x != NULL)
+ {
+ /* FOUND */
+ line_skip_eol (l);
+ x->position = 0;
+#if THE_PRICE_IS_RIGHT
+ l->OtherLine = x; /* save in cache */
+#endif /* THE_PRICE_IS_RIGHT */
+ return x;
+ }
+ /* NOT FOUND */
+ WARN_UNDEFINED_LINE;
+ return (l);
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ GOSUB
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_GO_SUB (LineType * l)
+{
+
+ assert (l != NULL);
+ return bwb_GOSUB (l);
+}
+
+LineType *
+bwb_GOSUB (LineType * l)
+{
+ /*
+ SYNTAX: GOSUB line ' standard GOSUB
+ SYNTAX: GOSUB expression ' calculated GOSUB
+ SYNTAX: GOSUB expression OF line,... ' indexed GOSUB, same as ON expression GOSUB line,...
+ SYNTAX: GOSUB line [,...] ON expression ' indexed GOSUB, same as ON expression GOSUB line,...
+ */
+ int Value;
+ int LineNumber;
+ LineType *x;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ Value = 0;
+ LineNumber = 0;
+ x = NULL;
+ if (l->LineFlags & (LINE_USER))
+ {
+ WARN_ILLEGAL_DIRECT;
+ return (l);
+ }
+
+ if (line_is_eol (l))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_integer_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if (line_is_eol (l))
+ {
+ /* GOSUB linenumber */
+ /* 'Value' is the line number */
+ LineNumber = Value;
+ }
+ else if (line_skip_word (l, "OF"))
+ {
+ /* GOSUB linenumber [,...] OF expression */
+ /* 'Value' is an index into a list of line numbers */
+ if (line_read_index_item (l, Value, &LineNumber))
+ {
+ /* found 'LineNumber' */
+ }
+ else if (My->CurrentVersion->OptionFlags & (OPTION_BUGS_ON) ) /* GOSUB X OF ... */
+ {
+ /* silently fall-thru to the following line */
+ line_skip_eol (l);
+ return (l);
+ }
+ else
+ {
+ /* ERROR */
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ }
+ else if (My->CurrentVersion->OptionVersionValue & (S70 | I70 | I73))
+ {
+ /* GOSUB line [,...] ON expression */
+ while (line_skip_seperator (l))
+ {
+ if (line_read_integer_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ if (line_skip_word (l, "ON") == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_integer_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* 'Value' is an index into a list of line numbers */
+ l->position = l->Startpos;
+ if (line_read_index_item (l, Value, &LineNumber))
+ {
+ /* found 'LineNumber' */
+ }
+ else
+ {
+ /* silently fall-thru to the following line */
+ line_skip_eol (l);
+ return (l);
+ }
+ line_skip_eol (l);
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if (LineNumber < MINLIN || LineNumber > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ /* valid range */
+ x = NULL;
+#if THE_PRICE_IS_RIGHT
+ if (l->OtherLine != NULL)
+ {
+ /* look in the cache */
+ if (l->OtherLine->number == LineNumber)
+ {
+ x = l->OtherLine; /* found in cache */
+ }
+ }
+#endif /* THE_PRICE_IS_RIGHT */
+ if (x == NULL)
+ {
+ x = find_line_number (LineNumber); /* not found in the cache */
+ }
+ if (x != NULL)
+ {
+ /* FOUND */
+ line_skip_eol (l);
+ /* save current stack level */
+ My->StackHead->line = l;
+ /* increment exec stack */
+ if (bwb_incexec ())
+ {
+ /* set the new position to x and return x */
+ x->position = 0;
+ My->StackHead->line = x;
+ My->StackHead->ExecCode = EXEC_GOSUB;
+#if THE_PRICE_IS_RIGHT
+ l->OtherLine = x; /* save in cache */
+#endif /* THE_PRICE_IS_RIGHT */
+ return x;
+ }
+ else
+ {
+ /* ERROR */
+ WARN_OUT_OF_MEMORY;
+ return My->EndMarker;
+ }
+ }
+ /* NOT FOUND */
+ WARN_UNDEFINED_LINE;
+ return (l);
+}
+
+
+
+/*
+--------------------------------------------------------------------------------------------
+ RETURN
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_RETURN (LineType * l)
+{
+ /*
+ SYNTAX: RETURN
+ */
+
+ assert (l != NULL);
+ assert (My != NULL);
+ assert (My->CurrentVersion != NULL);
+ assert (My->StackHead != NULL);
+
+ if (My->CurrentVersion->OptionVersionValue & (S70 | I70 | I73))
+ {
+ /* RETURN [comment] */
+ line_skip_eol (l);
+ }
+
+ if (My->CurrentVersion->OptionVersionValue & (C77))
+ {
+ /* CBASIC-II: RETURN exits the first FUNCTION or GOSUB */
+
+ while (My->StackHead->ExecCode != EXEC_GOSUB
+ && My->StackHead->ExecCode != EXEC_FUNCTION)
+ {
+ bwb_decexec ();
+ if (My->StackHead == NULL)
+ {
+ WARN_RETURN_WITHOUT_GOSUB;
+ return (l);
+ }
+ if (My->StackHead->ExecCode == EXEC_NORM) /* End of the line? */
+ {
+ WARN_RETURN_WITHOUT_GOSUB;
+ return (l);
+ }
+ }
+ }
+ else
+ {
+ /* RETURN exits the first GOSUB */
+
+ while (My->StackHead->ExecCode != EXEC_GOSUB)
+ {
+ bwb_decexec ();
+ if (My->StackHead == NULL)
+ {
+ WARN_RETURN_WITHOUT_GOSUB;
+ return (l);
+ }
+ if (My->StackHead->ExecCode == EXEC_NORM) /* End of the line? */
+ {
+ WARN_RETURN_WITHOUT_GOSUB;
+ return (l);
+ }
+ }
+ }
+
+
+ /* decrement the EXEC stack counter */
+
+ bwb_decexec ();
+ assert (My->StackHead != NULL);
+ return My->StackHead->line;
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ POP
+--------------------------------------------------------------------------------------------
+*/
+
+
+LineType *
+bwb_POP (LineType * l)
+{
+ /*
+ SYNTAX: POP
+ */
+ StackType *StackItem;
+
+ assert (l != NULL);
+ assert (My != NULL);
+ assert (My->CurrentVersion != NULL);
+ assert (My->StackHead != NULL);
+
+ StackItem = My->StackHead;
+ while (StackItem->ExecCode != EXEC_GOSUB)
+ {
+ StackItem = StackItem->next;
+ if (StackItem == NULL)
+ {
+ WARN_RETURN_WITHOUT_GOSUB;
+ return (l);
+ }
+ if (StackItem->ExecCode == EXEC_NORM)
+ {
+ /* End of the line */
+ WARN_RETURN_WITHOUT_GOSUB;
+ return (l);
+ }
+ }
+ /* hide the GOSUB */
+ StackItem->ExecCode = EXEC_POPPED;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ ON
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_ON (LineType * l)
+{
+ /*
+ SYNTAX: ON expression GOTO line,... ' expression evaluates to an index
+ SYNTAX: ON expression GOSUB line,... ' expression evaluates to an index
+ */
+ int Value;
+ int command;
+ int LineNumber;
+ LineType *x;
+
+ assert (l != NULL);
+ assert (My != NULL);
+ assert (My->CurrentVersion != NULL);
+
+ Value = 0;
+ command = 0;
+ LineNumber = 0;
+ x = NULL;
+ if (l->LineFlags & (LINE_USER))
+ {
+ WARN_ILLEGAL_DIRECT;
+ return (l);
+ }
+
+ if (line_is_eol (l))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_integer_expression (l, &Value) == FALSE)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ if (line_skip_word (l, "GO"))
+ {
+ if (line_skip_word (l, "TO"))
+ {
+ command = C_GOTO;
+ }
+ else if (line_skip_word (l, "SUB"))
+ {
+ command = C_GOSUB;
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ else if (line_skip_word (l, "GOTO"))
+ {
+ command = C_GOTO;
+ }
+ else if (line_skip_word (l, "GOSUB"))
+ {
+ command = C_GOSUB;
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ /* 'Value' is an index into a list of line numbers */
+ if (line_read_index_item (l, Value, &LineNumber))
+ {
+ /* found 'LineNumber' */
+ }
+ else if (My->CurrentVersion->OptionFlags & (OPTION_BUGS_ON) ) /* ON X GOTO|GOSUB ... */
+ {
+ /* silently fall-thru to the following line */
+ line_skip_eol (l);
+ return (l);
+ }
+ else
+ {
+ /* ERROR */
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+
+ if (LineNumber < MINLIN || LineNumber > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ /* valid range */
+ x = NULL;
+#if THE_PRICE_IS_RIGHT
+ if (l->OtherLine != NULL)
+ {
+ /* look in the cache */
+ if (l->OtherLine->number == LineNumber)
+ {
+ x = l->OtherLine; /* found in cache */
+ }
+ }
+#endif /* THE_PRICE_IS_RIGHT */
+ if (x == NULL)
+ {
+ x = find_line_number (LineNumber); /* not found in the cache */
+ }
+ if (x != NULL)
+ {
+ /* FOUND */
+ if (command == C_GOTO)
+ {
+ /* ON ... GOTO ... */
+ line_skip_eol (l);
+ x->position = 0;
+#if THE_PRICE_IS_RIGHT
+ l->OtherLine = x; /* save in cache */
+#endif /* THE_PRICE_IS_RIGHT */
+ return x;
+ }
+ else if (command == C_GOSUB)
+ {
+ /* ON ... GOSUB ... */
+ line_skip_eol (l);
+ /* save current stack level */
+ My->StackHead->line = l;
+ /* increment exec stack */
+ if (bwb_incexec ())
+ {
+ /* set the new position to x and return x */
+ x->position = 0;
+ My->StackHead->line = x;
+ My->StackHead->ExecCode = EXEC_GOSUB;
+#if THE_PRICE_IS_RIGHT
+ l->OtherLine = x; /* save in cache */
+#endif /* THE_PRICE_IS_RIGHT */
+ return x;
+ }
+ else
+ {
+ /* ERROR */
+ WARN_OUT_OF_MEMORY;
+ return My->EndMarker;
+ }
+ }
+ else
+ {
+ /* ERROR */
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ /* NOT FOUND */
+ WARN_UNDEFINED_LINE;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ PAUSE
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_PAUSE (LineType * l)
+{
+ /*
+ SYNTAX: PAUSE
+ */
+ char *pstring;
+ char *tbuf;
+ int tlen;
+
+ assert (l != NULL);
+ assert (My != NULL);
+ assert (My->CurrentVersion != NULL);
+ assert (My->ConsoleOutput != NULL);
+ assert (My->ConsoleInput != NULL);
+
+ pstring = My->ConsoleOutput;
+ tbuf = My->ConsoleInput;
+ tlen = MAX_LINE_LENGTH;
+ if (My->CurrentVersion->OptionVersionValue & (S70 | I70 | I73))
+ {
+ /* PAUSE [comment] */
+ line_skip_eol (l);
+ }
+ sprintf (pstring, "PAUSE AT %d\n", l->number);
+ bwx_input (pstring, FALSE, tbuf, tlen);
+ return (l);
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ STOP
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_STOP (LineType * l)
+{
+ /*
+ SYNTAX: STOP
+ */
+
+ assert (l != NULL);
+ assert (My != NULL);
+ assert (My->CurrentVersion != NULL);
+
+ if (My->CurrentVersion->OptionVersionValue & (S70 | I70 | I73))
+ {
+ /* STOP [comment] */
+ line_skip_eol (l);
+ }
+ My->ContinueLine = l->next;
+ bwx_STOP (TRUE);
+ return bwb_END (l);
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ END
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_END (LineType * l)
+{
+ /*
+ SYNTAX: END
+ */
+
+ assert (l != NULL);
+ assert (My != NULL);
+ assert (My->CurrentVersion != NULL);
+
+ if (My->CurrentVersion->OptionVersionValue & (S70 | I70 | I73))
+ {
+ /* END [comment] */
+ line_skip_eol (l);
+ }
+ My->ContinueLine = l->next;
+ bwx_STOP (FALSE);
+ return My->EndMarker;
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ RUN
+--------------------------------------------------------------------------------------------
+*/
+
+static LineType *
+bwb_run_filename_or_linenumber (LineType * L)
+{
+ LineType *current = NULL;
+ VariantType x;
+ VariantType *X;
+
+ assert (L != NULL);
+ assert (My != NULL);
+ assert (My->StartMarker != NULL);
+
+ X = &x;
+ CLEAR_VARIANT (X);
+ if (line_read_expression (L, X) == FALSE) /* bwb_run_filename_or_linenumber */
+ {
+ WARN_SYNTAX_ERROR;
+ return L;
+ }
+ if (X->VariantTypeCode == StringTypeCode)
+ {
+ /* RUN "filename" */
+ /* RUN A$ */
+ if (is_empty_string (X->Buffer))
+ {
+ WARN_BAD_FILE_NAME;
+ return L;
+ }
+ /* open the file and execute it */
+ bwb_new (); /* clear memory */
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ My->ProgramFilename = bwb_strdup (X->Buffer);
+ if (bwb_fload (NULL) == FALSE)
+ {
+ WARN_BAD_FILE_NAME;
+ return L;
+ }
+ /*
+ **
+ ** FORCE SCAN
+ **
+ */
+ if (bwb_scan () == FALSE)
+ {
+ WARN_CANT_CONTINUE;
+ return L;
+ }
+ current = My->StartMarker->next;
+ }
+ else
+ {
+ /* RUN 100 */
+ /* RUN N */
+ /* execute the line */
+ int LineNumber;
+
+
+ LineNumber = (int) bwb_rint (X->Number);
+ /*
+ **
+ ** FORCE SCAN
+ **
+ */
+ if (bwb_scan () == FALSE)
+ {
+ WARN_CANT_CONTINUE;
+ goto EXIT;
+ }
+ current = find_line_number (LineNumber); /* RUN 100 */
+ if (current == NULL)
+ {
+ WARN_CANT_CONTINUE;
+ return L;
+ }
+ }
+EXIT:
+ RELEASE_VARIANT (X);
+ return current;
+}
+
+LineType *
+bwb_RUNNH (LineType * L)
+{
+
+ assert (L != NULL);
+ return bwb_RUN (L);
+}
+
+LineType *
+bwb_RUN (LineType * L)
+{
+ /*
+ SYNTAX: RUN
+ SYNTAX: RUN filename$
+ SYNTAX: RUN linenumber
+ */
+ LineType *current;
+
+ assert (L != NULL);
+ assert (My != NULL);
+ assert (My->EndMarker != NULL);
+ assert (My->DefaultVariableType != NULL);
+
+ /* clear the STACK */
+ bwb_clrexec ();
+ if (bwb_incexec ())
+ {
+ /* OK */
+ }
+ else
+ {
+ /* ERROR */
+ WARN_OUT_OF_MEMORY;
+ return My->EndMarker;
+ }
+
+ if (line_is_eol (L))
+ {
+ /* RUN */
+
+ var_CLEAR ();
+
+ /* if( TRUE ) */
+ {
+ int n;
+ for (n = 0; n < 26; n++)
+ {
+ My->DefaultVariableType[n] = DoubleTypeCode;
+ }
+ }
+ /*
+ **
+ ** FORCE SCAN
+ **
+ */
+ if (bwb_scan () == FALSE)
+ {
+ WARN_CANT_CONTINUE;
+ return My->EndMarker;
+ }
+ current = My->StartMarker->next;
+ }
+ else
+ {
+ /* RUN 100 : RUN filename$ */
+ current = bwb_run_filename_or_linenumber (L);
+ if (current == NULL)
+ {
+ WARN_UNDEFINED_LINE;
+ return My->EndMarker;
+ }
+ }
+ current->position = 0;
+
+ assert (My->StackHead != NULL);
+ My->StackHead->line = current;
+ My->StackHead->ExecCode = EXEC_NORM;
+
+ /* RUN */
+ WARN_CLEAR; /* bwb_RUN */
+ My->ContinueLine = NULL;
+ SetOnError (0);
+
+ /* if( TRUE ) */
+ {
+ time_t t;
+ struct tm *lt;
+
+ time (&t);
+ lt = localtime (&t);
+ My->StartTimeInteger = lt->tm_hour;
+ My->StartTimeInteger *= 60;
+ My->StartTimeInteger += lt->tm_min;
+ My->StartTimeInteger *= 60;
+ My->StartTimeInteger += lt->tm_sec;
+ /* number of seconds since midnight */
+ }
+
+ return current;
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ CONT
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_CONTINUE (LineType * l)
+{
+ /*
+ SYNTAX: CONTINUE
+ */
+
+ assert (l != NULL);
+ return bwb_CONT (l);
+}
+
+LineType *
+bwb_CONT (LineType * l)
+{
+ /*
+ SYNTAX: CONT
+ */
+ LineType *current;
+
+ assert (l != NULL);
+ assert (My != NULL);
+ assert (My->EndMarker != NULL);
+ assert (My->StartMarker != NULL);
+
+ current = NULL;
+ /* see if there is an element */
+ if (line_is_eol (l))
+ {
+ /* CONT */
+ current = My->ContinueLine;
+ }
+ else
+ {
+ /* CONT 100 */
+ int LineNumber;
+
+ LineNumber = 0;
+ if (line_read_line_number (l, &LineNumber))
+ {
+ current = find_line_number (LineNumber); /* CONT 100 */
+ }
+ }
+
+
+ if (current == NULL || current == My->EndMarker)
+ {
+ /* same as RUN */
+ current = My->StartMarker->next;
+ }
+ /*
+ **
+ ** FORCE SCAN
+ **
+ */
+ if (bwb_scan () == FALSE)
+ {
+ WARN_CANT_CONTINUE;
+ return (l);
+ }
+ current->position = 0;
+ bwb_clrexec ();
+ if (bwb_incexec ())
+ {
+ /* OK */
+ My->StackHead->line = current;
+ My->StackHead->ExecCode = EXEC_NORM;
+ }
+ else
+ {
+ /* ERROR */
+ WARN_OUT_OF_MEMORY;
+ return My->EndMarker;
+ }
+
+
+ /* CONT */
+ My->ContinueLine = NULL;
+ return current;
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ NEW
+--------------------------------------------------------------------------------------------
+*/
+
+void
+bwb_xnew (LineType * l)
+{
+ LineType *current;
+ LineType *previous;
+ int wait;
+
+ assert (l != NULL);
+ assert (My != NULL);
+ assert (My->EndMarker != NULL);
+
+ previous = NULL; /* JBV */
+ wait = TRUE;
+ for (current = l->next; current != My->EndMarker; current = current->next)
+ {
+ assert (current != NULL);
+ if (wait == FALSE)
+ {
+ free (previous);
+ previous = NULL;
+ }
+ wait = FALSE;
+ previous = current;
+ }
+ l->next = My->EndMarker;
+}
+
+static void
+bwb_new ()
+{
+ assert (My != NULL);
+ assert (My->StartMarker != NULL);
+ assert (My->DefaultVariableType != NULL);
+
+
+ /* clear program in memory */
+ bwb_xnew (My->StartMarker);
+
+ /* clear all variables */
+ var_CLEAR ();
+ /* if( TRUE ) */
+ {
+ int n;
+ for (n = 0; n < 26; n++)
+ {
+ My->DefaultVariableType[n] = DoubleTypeCode;
+ }
+ }
+
+ /* NEW */
+ WARN_CLEAR; /* bwb_new */
+ My->ContinueLine = NULL;
+ SetOnError (0);
+}
+
+LineType *
+bwb_NEW (LineType * l)
+{
+ /*
+ SYNTAX: NEW
+ */
+
+ assert (l != NULL);
+ assert (My != NULL);
+ assert (My->CurrentVersion != NULL);
+
+ bwb_new ();
+ if (My->CurrentVersion->OptionVersionValue & (D64 | G65 | G67 | G74))
+ {
+ if (line_is_eol (l))
+ {
+ /* NEW */
+ char *tbuf;
+ int tlen;
+
+ tbuf = My->ConsoleInput;
+ tlen = MAX_LINE_LENGTH;
+ /* prompt for the program name */
+ bwx_input ("NEW PROBLEM NAME:", FALSE, tbuf, tlen);
+ if (is_empty_string (tbuf))
+ {
+ WARN_BAD_FILE_NAME;
+ return l;
+ }
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ My->ProgramFilename = bwb_strdup (tbuf);
+ }
+ else
+ {
+ /* NEW filename$ */
+ /* the parameter is the program name */
+
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (is_empty_string (Value))
+ {
+ WARN_BAD_FILE_NAME;
+ return l;
+ }
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ My->ProgramFilename = Value;
+ }
+ }
+ else
+ {
+ /* ignore any parameters */
+ line_skip_eol (l);
+ }
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ SCRATCH
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_SCRATCH (LineType * l)
+{
+ /*
+ SYNTAX: SCRATCH -- same as NEW
+ SYNTAX: SCRATCH # filenumber -- close file and re-open for output
+ */
+
+ assert (l != NULL);
+
+ if (line_is_eol (l))
+ {
+ /* SCRATCH */
+ bwb_new ();
+ return (l);
+ }
+ if (line_skip_FilenumChar (l))
+ {
+ /* SCRATCH # X */
+ int FileNumber;
+
+ if (line_read_integer_expression (l, &FileNumber) == FALSE)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (FileNumber < 0)
+ {
+ /* SCRATCH # -1 is silently ignored */
+ return (l);
+ }
+ if (FileNumber == 0)
+ {
+ /* SCRATCH # 0 is silently ignored */
+ return (l);
+ }
+ My->CurrentFile = find_file_by_number (FileNumber);
+ if (My->CurrentFile == NULL)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (My->CurrentFile->DevMode != DEVMODE_CLOSED)
+ {
+ My->CurrentFile->DevMode = DEVMODE_CLOSED;
+ }
+ if (My->CurrentFile->cfp != NULL)
+ {
+ bwb_fclose (My->CurrentFile->cfp);
+ My->CurrentFile->cfp = NULL;
+ }
+ if (My->CurrentFile->buffer != NULL)
+ {
+ free (My->CurrentFile->buffer);
+ My->CurrentFile->buffer = NULL;
+ }
+ My->CurrentFile->width = 0;
+ My->CurrentFile->col = 1;
+ My->CurrentFile->row = 1;
+ My->CurrentFile->delimit = ',';
+ if (is_empty_string (My->CurrentFile->FileName))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (bwb_strcmp (My->CurrentFile->FileName, "*") != 0)
+ {
+ if ((My->CurrentFile->cfp =
+ fopen (My->CurrentFile->FileName, "w")) == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ My->CurrentFile->DevMode = DEVMODE_OUTPUT;
+ }
+ /* OK */
+ return (l);
+ }
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+/*
+============================================================================================
+ SYSTEM and so on
+============================================================================================
+*/
+static LineType *
+bwb_system (LineType * l)
+{
+ /*
+ SYNTAX: SYSTEM
+ */
+ assert (l != NULL);
+ assert (My != NULL);
+ assert (My->SYSOUT != NULL);
+ assert (My->SYSOUT->cfp != NULL);
+
+ fprintf (My->SYSOUT->cfp, "\n");
+ fflush (My->SYSOUT->cfp);
+ bwx_terminate ();
+ return (l); /* never reached */
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ BYE
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_BYE (LineType * l)
+{
+ /*
+ SYNTAX: BYE
+ */
+
+ assert (l != NULL);
+ return bwb_system (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ DOS
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_DOS (LineType * l)
+{
+ /*
+ SYNTAX: DOS
+ */
+
+ assert (l != NULL);
+ return bwb_system (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ FLEX
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_FLEX (LineType * l)
+{
+ /*
+ SYNTAX: FLEX
+ */
+
+ assert (l != NULL);
+ return bwb_system (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ GOODBYE
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_GOODBYE (LineType * l)
+{
+ /*
+ SYNTAX: GOODBYE
+ */
+
+ assert (l != NULL);
+ return bwb_system (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ MON
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_MON (LineType * l)
+{
+ /*
+ SYNTAX: MON
+ */
+
+ assert (l != NULL);
+ return bwb_system (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ QUIT
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_QUIT (LineType * l)
+{
+ /*
+ SYNTAX: QUIT
+ */
+
+ assert (l != NULL);
+ return bwb_system (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ SYSTEM
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_SYSTEM (LineType * l)
+{
+ /*
+ SYNTAX: SYSTEM
+ */
+
+ assert (l != NULL);
+ return bwb_system (l);
+}
+
+
+/*
+============================================================================================
+ LOAD and so on
+============================================================================================
+*/
+
+static LineType *
+bwb_load (LineType * Line, char *Prompt, int IsNew)
+{
+ /*
+ **
+ ** load a BASIC program from a file
+ **
+ */
+ /*
+ SYNTAX: ... [filename$]
+ */
+
+ assert (Line != NULL);
+ assert (Prompt != NULL);
+ assert (My != NULL);
+ assert (My->CurrentVersion != NULL);
+
+ if (IsNew)
+ {
+ /* TRUE == LOAD */
+ bwb_new ();
+ }
+ else
+ {
+ /* FALSE == MERGE */
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ }
+ if (line_is_eol (Line))
+ {
+ /* default is the last filename used by LOAD or SAVE */
+ /* if( My->CurrentVersion->OptionVersionValue & (D64 | G65 | G67 | G74) ) */
+ if (is_empty_string (My->ProgramFilename))
+ {
+ /* prompt for the program name */
+ char *tbuf;
+ int tlen;
+
+ tbuf = My->ConsoleInput;
+ tlen = MAX_LINE_LENGTH;
+ bwx_input (Prompt, FALSE, tbuf, tlen);
+ if (is_empty_string (tbuf))
+ {
+ WARN_BAD_FILE_NAME;
+ return (Line);
+ }
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ My->ProgramFilename = bwb_strdup (tbuf);
+ }
+ fprintf (My->SYSOUT->cfp, "Loading %s\n", My->ProgramFilename);
+ ResetConsoleColumn ();
+ }
+ else
+ {
+ /* Get an argument for filename */
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (Line, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (Line);
+ }
+ if (is_empty_string (Value))
+ {
+ WARN_BAD_FILE_NAME;
+ return (Line);
+ }
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ My->ProgramFilename = Value;
+ }
+ if (bwb_fload (NULL) == FALSE)
+ {
+ WARN_BAD_FILE_NAME;
+ return (Line);
+ }
+ if (IsNew)
+ {
+ /* TRUE == LOAD */
+ }
+ else
+ {
+ /* FALSE == MERGE */
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ }
+ /*
+ **
+ ** FORCE SCAN
+ **
+ */
+ if (bwb_scan () == FALSE)
+ {
+ WARN_CANT_CONTINUE;
+ }
+ return (Line);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ CLOAD
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_CLOAD (LineType * Line)
+{
+ /*
+ SYNTAX: CLOAD [filename$]
+ */
+
+ assert (Line != NULL);
+ return bwb_load (Line, "CLOAD FILE NAME:", TRUE);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ LOAD
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_LOAD (LineType * Line)
+{
+ /*
+ SYNTAX: LOAD [filename$]
+ */
+
+ assert (Line != NULL);
+ return bwb_load (Line, "LOAD FILE NAME:", TRUE);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ MERGE
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_MERGE (LineType * l)
+{
+ /*
+ SYNTAX: MERGE [filename$]
+ */
+
+ assert (l != NULL);
+ return bwb_load (l, "MERGE FILE NAME:", FALSE);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ OLD
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_OLD (LineType * Line)
+{
+ /*
+ SYNTAX: OLD [filename$]
+ */
+
+ assert (Line != NULL);
+ return bwb_load (Line, "OLD PROBLEM NAME:", TRUE);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ TLOAD
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_TLOAD (LineType * Line)
+{
+ /*
+ SYNTAX: TLOAD [filename$]
+ */
+
+ assert (Line != NULL);
+ return bwb_load (Line, "TLOAD FILE NAME:", TRUE);
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ RENAME
+--------------------------------------------------------------------------------------------
+*/
+static LineType *
+H14_RENAME (LineType * l)
+{
+ /*
+ SYNTAX: RENAME from$ TO to$
+ */
+ char *From;
+ char *To;
+
+ assert (l != NULL);
+
+ From = NULL;
+ To = NULL;
+ if (line_read_string_expression (l, &From) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (is_empty_string (From))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (line_skip_word (l, "TO") == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_string_expression (l, &To) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (is_empty_string (To))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (rename (From, To))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ return (l);
+}
+
+LineType *
+bwb_RENAME (LineType * l)
+{
+ /*
+ SYNTAX: RENAME filename$
+ */
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+ assert( My->ConsoleInput != NULL );
+
+ if (My->CurrentVersion->OptionVersionValue & (H14))
+ {
+ /* RENAME == change an exisiting file's name */
+ return H14_RENAME (l);
+ }
+ /* RENAME == change the BASIC program's name for a later SAVE */
+ if (line_is_eol (l))
+ {
+ /* RENAME */
+ if (My->CurrentVersion->OptionVersionValue & (D64 | G65 | G67 | G74))
+ {
+ /* prompt for the program name */
+ char *tbuf;
+ int tlen;
+
+ tbuf = My->ConsoleInput;
+ tlen = MAX_LINE_LENGTH;
+ bwx_input ("RENAME PROBLEM NAME:", FALSE, tbuf, tlen);
+ if (is_empty_string (tbuf))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ My->ProgramFilename = bwb_strdup (tbuf);
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ else
+ {
+ /* RENAME value$ */
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (is_empty_string (Value))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ My->ProgramFilename = Value;
+ }
+ return (l);
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ MAT
+--------------------------------------------------------------------------------------------
+*/
+
+extern void
+Determinant (VariableType * v)
+{
+ /* http://easy-learn-c-language.blogspot.com/search/label/Numerical%20Methods */
+ /* Numerical Methods: Determinant of nxn matrix using C */
+
+ DoubleType **matrix;
+ DoubleType ratio;
+
+ int i;
+ int j;
+ int k;
+ int n;
+
+ assert (v != NULL);
+ assert( My != NULL );
+
+
+ My->LastDeterminant = 0; /* default */
+
+ n = v->UBOUND[0] - v->LBOUND[0] + 1;
+
+ if ((matrix = (DoubleType **) calloc (n, sizeof (DoubleType *))) == NULL)
+ {
+ goto EXIT;
+ }
+ assert( matrix != NULL );
+ for (i = 0; i < n; i++)
+ {
+ if ((matrix[i] = (DoubleType *) calloc (n, sizeof (DoubleType))) == NULL)
+ {
+ goto EXIT;
+ }
+ assert( matrix[i] != NULL );
+ }
+
+ for (i = 0; i < n; i++)
+ {
+ for (j = 0; j < n; j++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+ v->VINDEX[0] = v->LBOUND[0] + i;
+ v->VINDEX[1] = v->LBOUND[1] + j;
+ if (var_get (v, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ if (variant.VariantTypeCode == StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ goto EXIT;
+ }
+ matrix[i][j] = variant.Number;
+ }
+ }
+
+ /* Conversion of matrix to upper triangular */
+
+ for (i = 0; i < n; i++)
+ {
+ for (j = 0; j < n; j++)
+ {
+ if (j > i)
+ {
+ if (matrix[i][i] == 0)
+ {
+ /* - Evaluation of an expression results in division
+ * by zero (nonfatal, the recommended recovery
+ * procedure is to supply machine infinity with the
+ * sign of the numerator and continue)
+ */
+ if (WARN_DIVISION_BY_ZERO)
+ {
+ /* ERROR */
+ goto EXIT;
+ }
+ /* CONTINUE */
+ if (matrix[j][i] < 0)
+ {
+ ratio = MINDBL;
+ }
+ else
+ {
+ ratio = MAXDBL;
+ }
+ }
+ else
+ {
+ ratio = matrix[j][i] / matrix[i][i];
+ }
+ for (k = 0; k < n; k++)
+ {
+ matrix[j][k] -= ratio * matrix[i][k];
+ }
+ }
+ }
+ }
+
+
+ My->LastDeterminant = 1; /* storage for determinant */
+
+ for (i = 0; i < n; i++)
+ {
+ DoubleType Value;
+
+ Value = matrix[i][i];
+ My->LastDeterminant *= Value;
+ }
+
+EXIT:
+ if( matrix != NULL )
+ {
+ for (i = 0; i < n; i++)
+ {
+ if( matrix[i] != NULL )
+ {
+ free (matrix[i]);
+ /* matrix[i] = NULL; */
+ }
+ }
+ free (matrix);
+ /* matrix = NULL; */
+ }
+}
+
+int
+InvertMatrix (VariableType * vOut, VariableType * vIn)
+{
+ /* http://easy-learn-c-language.blogspot.com/search/label/Numerical%20Methods */
+ /* Numerical Methods: Inverse of nxn matrix using C */
+
+ int Result;
+ DoubleType **matrix;
+ DoubleType ratio;
+
+ int i;
+ int j;
+ int k;
+ int n;
+
+ assert (vOut != NULL);
+ assert (vIn != NULL);
+
+ Result = FALSE;
+ n = vIn->UBOUND[0] - vIn->LBOUND[0] + 1;
+
+ if ((matrix = (DoubleType **) calloc (n, sizeof (DoubleType *))) == NULL)
+ {
+ goto EXIT;
+ }
+ assert( matrix != NULL );
+
+ for (i = 0; i < n; i++)
+ {
+ if ((matrix[i] =
+ (DoubleType *) calloc (n + n, sizeof (DoubleType))) == NULL)
+ {
+ goto EXIT;
+ }
+ assert( matrix[i] != NULL );
+ }
+
+ for (i = 0; i < n; i++)
+ {
+ for (j = 0; j < n; j++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ vIn->VINDEX[0] = vIn->LBOUND[0] + i;
+ vIn->VINDEX[1] = vIn->LBOUND[1] + j;
+ if (var_get (vIn, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ if (variant.VariantTypeCode == StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ goto EXIT;
+ }
+ matrix[i][j] = variant.Number;
+ }
+ }
+
+ for (i = 0; i < n; i++)
+ {
+ for (j = n; j < 2 * n; j++)
+ {
+ if (i == (j - n))
+ {
+ matrix[i][j] = 1.0;
+ }
+ else
+ {
+ matrix[i][j] = 0.0;
+ }
+ }
+ }
+
+ for (i = 0; i < n; i++)
+ {
+ for (j = 0; j < n; j++)
+ {
+ if (i != j)
+ {
+ if (matrix[i][i] == 0)
+ {
+ /* - Evaluation of an expression results in division
+ * by zero (nonfatal, the recommended recovery
+ * procedure is to supply machine infinity with the
+ * sign of the numerator and continue)
+ */
+ if (WARN_DIVISION_BY_ZERO)
+ {
+ /* ERROR */
+ goto EXIT;
+ }
+ /* CONTINUE */
+ if (matrix[j][i] < 0)
+ {
+ ratio = MINDBL;
+ }
+ else
+ {
+ ratio = MAXDBL;
+ }
+ }
+ else
+ {
+ ratio = matrix[j][i] / matrix[i][i];
+ }
+ for (k = 0; k < 2 * n; k++)
+ {
+ matrix[j][k] -= ratio * matrix[i][k];
+ }
+ }
+ }
+ }
+
+ for (i = 0; i < n; i++)
+ {
+ DoubleType a;
+
+ a = matrix[i][i];
+ if (a == 0)
+ {
+ /* - Evaluation of an expression results in division
+ * by zero (nonfatal, the recommended recovery
+ * procedure is to supply machine infinity with the
+ * sign of the numerator and continue)
+ */
+ if (WARN_DIVISION_BY_ZERO)
+ {
+ /* ERROR */
+ goto EXIT;
+ }
+ /* CONTINUE */
+ for (j = 0; j < 2 * n; j++)
+ {
+ if (matrix[i][j] < 0)
+ {
+ matrix[i][j] = MINDBL;
+ }
+ else
+ {
+ matrix[i][j] = MAXDBL;
+ }
+ }
+ }
+ else
+ {
+ for (j = 0; j < 2 * n; j++)
+ {
+ matrix[i][j] /= a;
+ }
+ }
+ }
+
+ for (i = 0; i < n; i++)
+ {
+ for (j = 0; j < n; j++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ vOut->VINDEX[0] = vOut->LBOUND[0] + i;
+ vOut->VINDEX[1] = vOut->LBOUND[0] + j;
+ variant.VariantTypeCode = vOut->VariableTypeCode;
+ variant.Number = matrix[i][j + n];
+ if (var_set (vOut, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ goto EXIT;
+ }
+ }
+ }
+ /*
+ **
+ ** Everything is OK
+ **
+ */
+ Result = TRUE;
+
+
+EXIT:
+ if (matrix != NULL)
+ {
+ for (i = 0; i < n; i++)
+ {
+ if (matrix[i] != NULL)
+ {
+ free (matrix[i]);
+ /* matrix[i] = NULL; */
+ }
+ }
+ free (matrix);
+ /* matrix = NULL; */
+ }
+ return Result;
+}
+
+static int
+line_read_matrix_redim (LineType * l, VariableType * v)
+{
+ /* get OPTIONAL parameters if the variable is dimensioned */
+
+ assert (l != NULL);
+ assert (v != NULL);
+
+ if (line_peek_LparenChar (l))
+ {
+ /* get requested size, which is <= original array size */
+ size_t array_units;
+ int n;
+ int dimensions;
+ int LBOUND[MAX_DIMS];
+ int UBOUND[MAX_DIMS];
+
+ if (line_read_array_redim (l, &dimensions, LBOUND, UBOUND) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return FALSE;
+ }
+ /* update array dimensions */
+ array_units = 1;
+ for (n = 0; n < dimensions; n++)
+ {
+ if (UBOUND[n] < LBOUND[n])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return FALSE;
+ }
+ array_units *= UBOUND[n] - LBOUND[n] + 1;
+ }
+ if (array_units > v->array_units)
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return FALSE;
+ }
+ v->dimensions = dimensions;
+ for (n = 0; n < dimensions; n++)
+ {
+ v->LBOUND[n] = LBOUND[n];
+ v->UBOUND[n] = UBOUND[n];
+ }
+ }
+ return TRUE;
+}
+
+LineType *
+bwb_MAT (LineType * l)
+{
+ /*
+ SYNTAX: MAT A = CON
+ SYNTAX: MAT A = IDN
+ SYNTAX: MAT A = ZER
+ SYNTAX: MAT A = INV B
+ SYNTAX: MAT A = TRN B
+ SYNTAX: MAT A = (k) * B
+ SYNTAX: MAT A = B
+ SYNTAX: MAT A = B + C
+ SYNTAX: MAT A = B - C
+ SYNTAX: MAT A = B * C
+ */
+ VariableType *v_A;
+ char varname_A[NameLengthMax + 1];
+
+ assert (l != NULL);
+
+ /* just a placeholder for now. this will grow. */
+
+ if (line_read_varname (l, varname_A) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ v_A = mat_find (varname_A);
+ if (v_A == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* variable MUST be numeric */
+ if (VAR_IS_STRING (v_A))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_matrix_redim (l, v_A) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_skip_EqualChar (l) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* MAT A = ... */
+ if (line_skip_word (l, "CON"))
+ {
+ /* MAT A = CON */
+ /* MAT A = CON(I) */
+ /* MAT A = CON(I,J) */
+ /* MAT A = CON(I,J,K) */
+ /* OK */
+ int i;
+ int j;
+ int k;
+
+ if (line_read_matrix_redim (l, v_A) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ /* both arrays are of the same size */
+ switch (v_A->dimensions)
+ {
+ case 1:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ variant.VariantTypeCode = v_A->VariableTypeCode;
+ variant.Number = 1;
+ v_A->VINDEX[0] = i;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ break;
+ case 2:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ variant.VariantTypeCode = v_A->VariableTypeCode;
+ variant.Number = 1;
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ break;
+ case 3:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ for (k = v_A->LBOUND[2]; k <= v_A->UBOUND[2]; k++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ variant.VariantTypeCode = v_A->VariableTypeCode;
+ variant.Number = 1;
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ v_A->VINDEX[2] = k;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ }
+ break;
+ default:
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ else if (line_skip_word (l, "IDN"))
+ {
+ /* MAT A = IDN */
+ /* MAT A = IDN(I,J) */
+ /* OK */
+ int i;
+ int j;
+
+ if (line_read_matrix_redim (l, v_A) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if (v_A->dimensions != 2)
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (v_A->LBOUND[0] != v_A->LBOUND[1])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (v_A->UBOUND[0] != v_A->UBOUND[1])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ /* square matrix */
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ variant.VariantTypeCode = v_A->VariableTypeCode;
+ if (i == j)
+ {
+ variant.Number = 1;
+ }
+ else
+ {
+ variant.Number = 0;
+ }
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ }
+ else if (line_skip_word (l, "ZER"))
+ {
+ /* MAT A = ZER */
+ /* MAT A = ZER(I) */
+ /* MAT A = ZER(I,J) */
+ /* MAT A = ZER(I,J,K) */
+ /* OK */
+ int i;
+ int j;
+ int k;
+
+ if (line_read_matrix_redim (l, v_A) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* both arrays are of the same size */
+ switch (v_A->dimensions)
+ {
+ case 1:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ variant.VariantTypeCode = v_A->VariableTypeCode;
+ variant.Number = 0;
+ v_A->VINDEX[0] = i;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ break;
+ case 2:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ variant.VariantTypeCode = v_A->VariableTypeCode;
+ variant.Number = 0;
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ break;
+ case 3:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ for (k = v_A->LBOUND[2]; k <= v_A->UBOUND[2]; k++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ variant.VariantTypeCode = v_A->VariableTypeCode;
+ variant.Number = 0;
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ v_A->VINDEX[2] = k;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ }
+ break;
+ default:
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ else if (line_skip_word (l, "INV"))
+ {
+ /* MAT A = INV B */
+ /* MAT A = INV( B ) */
+ /* OK */
+ VariableType *v_B;
+ char varname_B[NameLengthMax + 1];
+
+ if (v_A->dimensions != 2)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (v_A->LBOUND[0] != v_A->LBOUND[1] || v_A->UBOUND[0] != v_A->UBOUND[1])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (line_skip_LparenChar (l))
+ {
+ /* optional */
+ }
+ if (line_read_varname (l, varname_B) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if ((v_B = mat_find (varname_B)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* variable MUST be numeric */
+ if (VAR_IS_STRING (v_B))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_matrix_redim (l, v_B) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_skip_RparenChar (l))
+ {
+ /* optional */
+ }
+ if (v_B->dimensions != 2)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (v_B->LBOUND[0] != v_B->LBOUND[1] || v_B->UBOUND[0] != v_B->UBOUND[1])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (v_A->LBOUND[0] != v_B->LBOUND[0] || v_A->UBOUND[0] != v_B->UBOUND[0])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ /* square matrix */
+ Determinant (v_B);
+ if (My->LastDeterminant == 0)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ if (InvertMatrix (v_A, v_B) == FALSE)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ }
+ else if (line_skip_word (l, "TRN"))
+ {
+ /* MAT A = TRN B */
+ /* MAT A = TRN( B ) */
+ /* OK */
+ int i;
+ int j;
+ VariableType *v_B;
+ char varname_B[NameLengthMax + 1];
+
+ if (v_A->dimensions != 2)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_skip_LparenChar (l))
+ {
+ /* optional */
+ }
+ if (line_read_varname (l, varname_B) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if ((v_B = mat_find (varname_B)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* variable MUST be numeric */
+ if (VAR_IS_STRING (v_B))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_matrix_redim (l, v_B) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_skip_RparenChar (l))
+ {
+ /* optional */
+ }
+ if (v_B->dimensions != 2)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* MxN */
+ if (v_A->LBOUND[0] != v_B->LBOUND[1] || v_A->UBOUND[0] != v_B->UBOUND[1])
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (v_A->LBOUND[1] != v_B->LBOUND[0] || v_A->UBOUND[1] != v_B->UBOUND[0])
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* transpose matrix */
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ v_B->VINDEX[1] = i;
+ v_B->VINDEX[0] = j;
+ if (var_get (v_B, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ }
+ else if (line_peek_LparenChar (l))
+ {
+ /* MAT A = (k) * B */
+ DoubleType Multiplier;
+ VariableType *v_B;
+ int i;
+ int j;
+ int k;
+ char *E;
+ int p;
+ char varname_B[NameLengthMax + 1];
+ char *tbuf;
+
+ tbuf = My->ConsoleInput;
+ bwb_strcpy (tbuf, &(l->buffer[l->position]));
+ E = bwb_strrchr (tbuf, '*');
+ if (E == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ *E = NulChar;
+ p = 0;
+ if (buff_read_numeric_expression (tbuf, &p, &Multiplier) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ l->position += p;
+ if (line_skip_StarChar (l) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_varname (l, varname_B) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if ((v_B = mat_find (varname_B)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* variable MUST be numeric */
+ if (VAR_IS_STRING (v_B))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_matrix_redim (l, v_B) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (v_A->dimensions != v_B->dimensions)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* both arrays are of the same size */
+ switch (v_A->dimensions)
+ {
+ case 1:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ v_B->VINDEX[0] = i;
+ if (var_get (v_B, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ variant.Number *= Multiplier;
+
+ v_A->VINDEX[0] = i;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ break;
+ case 2:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ v_B->VINDEX[0] = i;
+ v_B->VINDEX[1] = j;
+ if (var_get (v_B, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ variant.Number *= Multiplier;
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ break;
+ case 3:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ for (k = v_A->LBOUND[2]; k <= v_A->UBOUND[2]; k++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ v_B->VINDEX[0] = i;
+ v_B->VINDEX[1] = j;
+ v_B->VINDEX[2] = k;
+ if (var_get (v_B, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ variant.Number *= Multiplier;
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ v_A->VINDEX[2] = k;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ }
+ break;
+ default:
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ else
+ {
+ /* MAT A = B */
+ /* MAT A = B + C */
+ /* MAT A = B - C */
+ /* MAT A = B * C */
+ VariableType *v_B;
+ char varname_B[NameLengthMax + 1];
+
+ if (line_read_varname (l, varname_B) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if ((v_B = mat_find (varname_B)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* variable MUST be numeric */
+ if (VAR_IS_STRING (v_B))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_matrix_redim (l, v_B) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_is_eol (l))
+ {
+ /* MAT A = B */
+ /* OK */
+ int i;
+ int j;
+ int k;
+
+ if (v_A->dimensions != v_B->dimensions)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* both arrays are of the same size */
+ switch (v_A->dimensions)
+ {
+ case 1:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ v_B->VINDEX[0] = i;
+ if (var_get (v_B, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_A->VINDEX[0] = i;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ break;
+ case 2:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ v_B->VINDEX[0] = i;
+ v_B->VINDEX[1] = j;
+ if (var_get (v_B, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ break;
+ case 3:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ for (k = v_A->LBOUND[2]; k <= v_A->UBOUND[2]; k++)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ v_B->VINDEX[0] = i;
+ v_B->VINDEX[1] = j;
+ v_B->VINDEX[2] = k;
+ if (var_get (v_B, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ v_A->VINDEX[2] = k;
+ if (var_set (v_A, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ }
+ break;
+ default:
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ else if (line_skip_PlusChar (l))
+ {
+ /* MAT A = B + C */
+ /* OK */
+ int i;
+ int j;
+ int k;
+ VariableType *v_C;
+ char varname_C[NameLengthMax + 1];
+
+ if (v_A->dimensions != v_B->dimensions)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* both arrays are of the same size */
+
+ if (line_read_varname (l, varname_C) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if ((v_C = mat_find (varname_C)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* variable MUST be numeric */
+ if (VAR_IS_STRING (v_C))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_matrix_redim (l, v_C) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (v_B->dimensions != v_C->dimensions)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* both arrays are of the same size */
+ switch (v_A->dimensions)
+ {
+ case 1:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ VariantType variant_L;
+ VariantType variant_R;
+ CLEAR_VARIANT (&variant_L);
+ CLEAR_VARIANT (&variant_R);
+
+ v_B->VINDEX[0] = i;
+ if (var_get (v_B, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_C->VINDEX[0] = i;
+ if (var_get (v_C, &variant_R) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ variant_L.Number += variant_R.Number;
+
+ v_A->VINDEX[0] = i;
+ if (var_set (v_A, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ break;
+ case 2:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ VariantType variant_L;
+ VariantType variant_R;
+ CLEAR_VARIANT (&variant_L);
+ CLEAR_VARIANT (&variant_R);
+
+ v_B->VINDEX[0] = i;
+ v_B->VINDEX[1] = j;
+ if (var_get (v_B, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_C->VINDEX[0] = i;
+ v_C->VINDEX[1] = j;
+ if (var_get (v_C, &variant_R) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ variant_L.Number += variant_R.Number;
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_set (v_A, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ break;
+ case 3:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ for (k = v_A->LBOUND[2]; k <= v_A->UBOUND[2]; k++)
+ {
+ VariantType variant_L;
+ VariantType variant_R;
+ CLEAR_VARIANT (&variant_L);
+ CLEAR_VARIANT (&variant_R);
+
+ v_B->VINDEX[0] = i;
+ v_B->VINDEX[1] = j;
+ v_B->VINDEX[2] = k;
+ if (var_get (v_B, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_C->VINDEX[0] = i;
+ v_C->VINDEX[1] = j;
+ v_C->VINDEX[2] = k;
+ if (var_get (v_C, &variant_R) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ variant_L.Number += variant_R.Number;
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ v_A->VINDEX[2] = k;
+ if (var_set (v_A, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ }
+ break;
+ default:
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ else if (line_skip_MinusChar (l))
+ {
+ /* MAT A = B - C */
+ /* OK */
+ int i;
+ int j;
+ int k;
+ VariableType *v_C;
+ char varname_C[NameLengthMax + 1];
+
+ if (v_A->dimensions != v_B->dimensions)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* both arrays are of the same size */
+
+ if (line_read_varname (l, varname_C) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if ((v_C = mat_find (varname_C)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* variable MUST be numeric */
+ if (VAR_IS_STRING (v_C))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_matrix_redim (l, v_C) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (v_B->dimensions != v_C->dimensions)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* both arrays are of the same dimension */
+ switch (v_A->dimensions)
+ {
+ case 1:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ VariantType variant_L;
+ VariantType variant_R;
+ CLEAR_VARIANT (&variant_L);
+ CLEAR_VARIANT (&variant_R);
+
+ v_B->VINDEX[0] = i;
+ if (var_get (v_B, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_C->VINDEX[0] = i;
+ if (var_get (v_C, &variant_R) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ variant_L.Number -= variant_R.Number;
+
+ v_A->VINDEX[0] = i;
+ if (var_set (v_A, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ break;
+ case 2:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ VariantType variant_L;
+ VariantType variant_R;
+ CLEAR_VARIANT (&variant_L);
+ CLEAR_VARIANT (&variant_R);
+
+ v_B->VINDEX[0] = i;
+ v_B->VINDEX[1] = j;
+ if (var_get (v_B, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_C->VINDEX[0] = i;
+ v_C->VINDEX[1] = j;
+ if (var_get (v_C, &variant_R) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ variant_L.Number -= variant_R.Number;
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_set (v_A, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ break;
+ case 3:
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ for (k = v_A->LBOUND[2]; k <= v_A->UBOUND[2]; k++)
+ {
+ VariantType variant_L;
+ VariantType variant_R;
+ CLEAR_VARIANT (&variant_L);
+ CLEAR_VARIANT (&variant_R);
+
+ v_B->VINDEX[0] = i;
+ v_B->VINDEX[1] = j;
+ v_B->VINDEX[2] = k;
+ if (var_get (v_B, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_C->VINDEX[0] = i;
+ v_C->VINDEX[1] = j;
+ v_C->VINDEX[2] = k;
+ if (var_get (v_C, &variant_R) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ variant_L.Number -= variant_R.Number;
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ v_A->VINDEX[2] = k;
+ if (var_set (v_A, &variant_L) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ }
+ break;
+ default:
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ else if (line_skip_StarChar (l))
+ {
+ /* MAT A = B * C */
+ int i;
+ int j;
+ int k;
+ VariableType *v_C;
+ char varname_C[NameLengthMax + 1];
+
+
+ if (v_A->dimensions != 2)
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (v_B->dimensions != 2)
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (line_read_varname (l, varname_C) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if ((v_C = mat_find (varname_C)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* variable MUST be numeric */
+ if (VAR_IS_STRING (v_C))
+ {
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+ if (line_read_matrix_redim (l, v_C) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (v_C->dimensions != 2)
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (v_A->LBOUND[0] != v_B->LBOUND[0])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (v_A->UBOUND[0] != v_B->UBOUND[0])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (v_A->LBOUND[1] != v_C->LBOUND[1])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (v_A->UBOUND[1] != v_C->UBOUND[1])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (v_B->LBOUND[1] != v_C->LBOUND[0])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (v_B->UBOUND[1] != v_C->UBOUND[0])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ for (i = v_A->LBOUND[0]; i <= v_A->UBOUND[0]; i++)
+ {
+ for (j = v_A->LBOUND[1]; j <= v_A->UBOUND[1]; j++)
+ {
+ VariantType variant_A;
+ CLEAR_VARIANT (&variant_A);
+
+ variant_A.VariantTypeCode = v_A->VariableTypeCode;
+ variant_A.Number = 0;
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_set (v_A, &variant_A) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ for (k = v_C->LBOUND[0]; k <= v_C->UBOUND[0]; k++)
+ {
+ VariantType variant_B;
+ VariantType variant_C;
+ CLEAR_VARIANT (&variant_B);
+ CLEAR_VARIANT (&variant_C);
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_get (v_A, &variant_A) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_B->VINDEX[0] = i;
+ v_B->VINDEX[1] = k;
+ if (var_get (v_B, &variant_B) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ v_C->VINDEX[0] = k;
+ v_C->VINDEX[1] = j;
+ if (var_get (v_C, &variant_C) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ variant_A.Number += variant_B.Number * variant_C.Number;
+
+ v_A->VINDEX[0] = i;
+ v_A->VINDEX[1] = j;
+ if (var_set (v_A, &variant_A) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ return (l);
+}
+
+
+
+/*
+--------------------------------------------------------------------------------------------
+ STORE
+--------------------------------------------------------------------------------------------
+*/
+
+
+LineType *
+bwb_STORE (LineType * l)
+{
+ /*
+ SYNTAX: STORE NumericArrayName
+ */
+
+ assert (l != NULL);
+ return bwb_CSAVE8 (l);
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ CSAVE*
+--------------------------------------------------------------------------------------------
+*/
+
+#define CSAVE_VERSION_1 0x20150218L
+
+LineType *
+bwb_CSAVE8 (LineType * l)
+{
+ /*
+ SYNTAX: CSAVE* NumericArrayName
+ */
+ VariableType *v = NULL;
+ FILE *f;
+ unsigned long n;
+ size_t t;
+ char varname[NameLengthMax + 1];
+
+ assert (l != NULL);
+
+ if (line_read_varname (l, varname) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ v = mat_find (varname);
+ if (v == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* variable MUST be numeric */
+ if (VAR_IS_STRING (v))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* variable MUST be an array */
+ if (v->dimensions == 0)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_matrix_redim (l, v) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* variable storage is a mess, we bypass that tradition here. */
+ t = v->array_units;
+ if (t <= 1)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* open file */
+ f = fopen (v->name, "w");
+ if (f == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* write version number */
+ n = CSAVE_VERSION_1;
+ fwrite (&n, sizeof (long), 1, f);
+ /* write total number of elements */
+ fwrite (&t, sizeof (long), 1, f);
+ /* write data */
+ fwrite (v->Value.Number, sizeof (DoubleType), t, f);
+ /* OK */
+ bwb_fclose (f);
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ RECALL
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_RECALL (LineType * l)
+{
+ /*
+ SYNTAX: RECALL NumericArrayName
+ */
+
+ assert (l != NULL);
+ return bwb_CLOAD8 (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ CLOAD*
+--------------------------------------------------------------------------------------------
+*/
+
+
+LineType *
+bwb_CLOAD8 (LineType * l)
+{
+ /*
+ SYNTAX: CLOAD* NumericArrayName
+ */
+ VariableType *v = NULL;
+ FILE *f;
+ unsigned long n;
+ size_t t;
+ char varname[NameLengthMax + 1];
+
+ assert (l != NULL);
+
+ if (line_read_varname (l, varname) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ v = mat_find (varname);
+ if (v == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ /* variable MUST be numeric */
+ if (VAR_IS_STRING (v))
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* variable MUST be an array */
+ if (v->dimensions == 0)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_matrix_redim (l, v) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* variable storage is a mess, we bypass that tradition here. */
+ t = v->array_units;
+ if (t <= 1)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* open file */
+ f = fopen (v->name, "r");
+ if (f == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ /* read version number */
+ n = 0;
+ fread (&n, sizeof (long), 1, f);
+ if (n != CSAVE_VERSION_1)
+ {
+ bwb_fclose (f);
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ /* read total number of elements */
+ n = 0;
+ fread (&n, sizeof (long), 1, f);
+ if (n != t)
+ {
+ bwb_fclose (f);
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ /* read data */
+ fread (v->Value.Number, sizeof (DoubleType), t, f);
+ /* OK */
+ bwb_fclose (f);
+ return (l);
+}
+
+
+
+
+/*
+============================================================================================
+ SAVE and so on
+============================================================================================
+*/
+
+static LineType *
+bwb_save (LineType * Line, char *Prompt)
+{
+ /*
+ SYNTAX: SAVE [filename$]
+ */
+ FILE *outfile;
+
+ assert (Line != NULL);
+ assert (Prompt != NULL);
+ assert( My != NULL );
+ assert( My->ConsoleInput != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+
+ /* Get an argument for filename */
+ if (line_is_eol (Line))
+ {
+ /* default is the last filename used by LOAD or SAVE */
+ if (is_empty_string (My->ProgramFilename) && Prompt != NULL)
+ {
+ /* prompt for the program name */
+ char *tbuf;
+ int tlen;
+
+ tbuf = My->ConsoleInput;
+ tlen = MAX_LINE_LENGTH;
+ bwx_input (Prompt, FALSE, tbuf, tlen);
+ if (is_empty_string (tbuf))
+ {
+ WARN_BAD_FILE_NAME;
+ return (Line);
+ }
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ My->ProgramFilename = bwb_strdup (tbuf);
+ }
+ assert( My->ProgramFilename != NULL );
+ fprintf (My->SYSOUT->cfp, "Saving %s\n", My->ProgramFilename);
+ ResetConsoleColumn ();
+ }
+ else
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (Line, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (Line);
+ }
+ if (is_empty_string (Value))
+ {
+ WARN_BAD_FILE_NAME;
+ return (Line);
+ }
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ }
+ My->ProgramFilename = Value;
+ }
+ assert( My->ProgramFilename != NULL );
+ if ((outfile = fopen (My->ProgramFilename, "w")) == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (Line);
+ }
+ bwb_xlist (Line, outfile);
+ bwb_fclose (outfile);
+ return (Line);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ CSAVE
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_CSAVE (LineType * Line)
+{
+ /*
+ SYNTAX: CSAVE [filename$]
+ */
+
+ assert (Line != NULL);
+ return bwb_save (Line, "CSAVE FILE NAME:");
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ REPLACE
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_REPLACE (LineType * Line)
+{
+ /*
+ SYNTAX: REPLACE [filename$]
+ */
+
+ assert (Line != NULL);
+ return bwb_save (Line, "REPLACE FILE NAME:");
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ SAVE
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_SAVE (LineType * l)
+{
+ /*
+ SYNTAX: SAVE [filename$]
+ */
+
+ assert (l != NULL);
+ return bwb_save (l, "SAVE FILE NAME:");
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ TSAVE
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_TSAVE (LineType * Line)
+{
+ /*
+ SYNTAX: TSAVE [filename$]
+ */
+
+ assert (Line != NULL);
+ return bwb_save (Line, "TSAVE FILE NAME:");
+}
+
+
+/*
+============================================================================================
+ LIST and so on
+============================================================================================
+*/
+static int
+xl_line (FILE * file, LineType * l)
+{
+ char LineExecuted;
+ char *C; /* start of comment text */
+ char *buffer; /* 0...99999 */
+
+ assert (file != NULL);
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->NumLenBuffer != NULL );
+ assert( My->CurrentVersion != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+ assert( My->SYSPRN != NULL );
+ assert( My->SYSPRN->cfp != NULL );
+
+ /*
+ ** The only difference between LIST, LLIST and SAVE is:
+ ** LIST and LLIST display an '*'
+ ** when a line has been executed
+ ** and OPTION COVERAGE ON is enabled.
+ */
+
+ buffer = My->NumLenBuffer;
+ LineExecuted = ' ';
+ if (My->CurrentVersion->OptionFlags & (OPTION_COVERAGE_ON))
+ {
+ if (l->LineFlags & LINE_EXECUTED)
+ {
+ if (file == My->SYSOUT->cfp || file == My->SYSPRN->cfp)
+ {
+ /* LIST */
+ /* LLIST */
+ LineExecuted = '*';
+ }
+ else
+ {
+ /* SAVE */
+ /* EDIT implies SAVE */
+ }
+ }
+ }
+
+ C = l->buffer;
+ if (l->LineFlags & LINE_NUMBERED)
+ {
+ /* explicitly numbered */
+ sprintf (buffer, "%*d", LineNumberDigits, l->number);
+ /* ##### xxx */
+ }
+ else
+ {
+ /* implicitly numbered */
+ if (My->LastLineNumber == l->number)
+ {
+ /* multi-statement line */
+ if (l->cmdnum == C_REM
+ && IS_CHAR (l->buffer[0], My->CurrentVersion->OptionCommentChar))
+ {
+ /* trailing comment */
+ sprintf (buffer, "%*s%c", LineNumberDigits - 1, "",
+ My->CurrentVersion->OptionCommentChar);
+ C++; /* skip comment char */
+ while (*C == ' ')
+ {
+ /* skip spaces */
+ C++;
+ }
+ /* ____' xxx */
+ }
+ else if (My->CurrentVersion->OptionStatementChar)
+ {
+ /* all other commands, add a colon */
+ sprintf (buffer, "%*s%c", LineNumberDigits - 1, "",
+ My->CurrentVersion->OptionStatementChar);
+ /* ____: xxx */
+ }
+ else
+ {
+ /*
+ The user is trying to list a multi-line statement
+ in a dialect that does NOT support multi-line statements.
+ This could occur when LOADing in one dialect and then SAVEing as another dialect, such as:
+ OPTION VERSION BASIC-80
+ LOAD "TEST1.BAS"
+ 100 REM TEST
+ 110 PRINT:PRINT:PRINT
+ OPTION VERSION MARK-I
+ EDIT
+ 100 REM TEST
+ 110 PRINT
+ PRINT
+ PRINT
+ The only thing we can reasonably do is put spaces for the line number,
+ since the user will have to edit the results manually anyways.
+ */
+ sprintf (buffer, "%*s", LineNumberDigits, "");
+ /* _____ xxx */
+ }
+ }
+ else
+ {
+ /* single-statement line */
+ sprintf (buffer, "%*s", LineNumberDigits, "");
+ /* _____ xxx */
+ }
+ }
+
+ fprintf (file, "%s", buffer);
+ fprintf (file, "%c", LineExecuted);
+
+ /* if( TRUE ) */
+ {
+ /* %INCLUDE */
+ int i;
+ for (i = 0; i < l->IncludeLevel; i++)
+ {
+ fputc (' ', file);
+ }
+ }
+ if (My->OptionIndentInteger > 0)
+ {
+ int i;
+
+ for (i = 0; i < l->Indention; i++)
+ {
+ int j;
+ for (j = 0; j < My->OptionIndentInteger; j++)
+ {
+ fputc (' ', file);
+ }
+ }
+ }
+ fprintf (file, "%s\n", C);
+
+ My->LastLineNumber = l->number;
+
+ return TRUE;
+}
+
+static LineType *
+bwb_xlist (LineType * l, FILE * file)
+{
+
+ assert (l != NULL);
+ assert (file != NULL);
+ assert( My != NULL );
+ assert( My->StartMarker != NULL );
+ assert( My->EndMarker != NULL );
+
+ /*
+ **
+ ** FORCE SCAN
+ **
+ */
+ if (bwb_scan () == FALSE)
+ {
+ /*
+ **
+ ** we are used by bwb_SAVE and bwb_EDIT
+ **
+ WARN_CANT_CONTINUE;
+ return (l);
+ */
+ }
+
+ if (line_is_eol (l))
+ {
+ /* LIST */
+ LineType *x;
+ /* now go through and list appropriate lines */
+ My->LastLineNumber = -1;
+ for (x = My->StartMarker->next; x != My->EndMarker; x = x->next)
+ {
+ xl_line (file, x);
+ }
+ fprintf (file, "\n");
+ }
+ else
+ {
+ do
+ {
+ int head;
+ int tail;
+
+ if (line_read_line_sequence (l, &head, &tail))
+ {
+ /* LIST 's' - 'e' */
+ LineType *x;
+ if (head < MINLIN || head > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ if (tail < MINLIN || tail > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ if (head > tail)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ /* valid range */
+ /* now go through and list appropriate lines */
+ My->LastLineNumber = -1;
+ for (x = My->StartMarker->next; x != My->EndMarker; x = x->next)
+ {
+ if (head <= x->number && x->number <= tail)
+ {
+ xl_line (file, x);
+ }
+ }
+ fprintf (file, "\n");
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ while (line_skip_seperator (l));
+ }
+ if (file == My->SYSOUT->cfp)
+ {
+ ResetConsoleColumn ();
+ }
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ LIST
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_LIST (LineType * l)
+{
+ /*
+ SYNTAX: LIST
+ SYNTAX: LIST line [,...]
+ SYNTAX: LIST line - line
+ */
+
+ assert (l != NULL);
+
+ return bwb_xlist (l, My->SYSOUT->cfp);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ LISTNH
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_LISTNH (LineType * l)
+{
+ /*
+ SYNTAX: LISTNH
+ SYNTAX: LISTNH line [,...]
+ SYNTAX: LISTNH line - line
+ */
+
+ assert (l != NULL);
+
+ return bwb_xlist (l, My->SYSOUT->cfp);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ LLIST
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_LLIST (LineType * l)
+{
+ /*
+ SYNTAX: LLIST
+ SYNTAX: LLIST line [,...]
+ SYNTAX: LLIST line - line
+ */
+
+ assert (l != NULL);
+
+ return bwb_xlist (l, My->SYSPRN->cfp);
+}
+
+
+
+/*
+============================================================================================
+ DELETE and so on
+============================================================================================
+*/
+
+static LineType *
+bwb_delete (LineType * l)
+{
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+ assert( My->StartMarker != NULL );
+ assert( My->EndMarker != NULL );
+
+ if (line_is_eol (l))
+ {
+ /* DELETE */
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ else if (My->CurrentVersion->OptionVersionValue & (C77))
+ {
+ /*
+ SYNTAX: DELETE filenum [,...]
+ */
+ do
+ {
+ int FileNumber;
+
+ FileNumber = 0;
+ if (line_read_integer_expression (l, &FileNumber) == FALSE)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (FileNumber <= 0)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+
+ My->CurrentFile = find_file_by_number (FileNumber);
+ if (My->CurrentFile == NULL)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (My->CurrentFile->DevMode == DEVMODE_CLOSED)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (My->CurrentFile->cfp != NULL)
+ {
+ bwb_fclose (My->CurrentFile->cfp);
+ My->CurrentFile->cfp = NULL;
+ }
+ if (My->CurrentFile->buffer != NULL)
+ {
+ free (My->CurrentFile->buffer);
+ My->CurrentFile->buffer = NULL;
+ }
+ My->CurrentFile->width = 0;
+ My->CurrentFile->col = 1;
+ My->CurrentFile->row = 1;
+ My->CurrentFile->delimit = ',';
+ My->CurrentFile->DevMode = DEVMODE_CLOSED;
+ if (My->CurrentFile->FileName == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ remove (My->CurrentFile->FileName);
+ free (My->CurrentFile->FileName);
+ My->CurrentFile->FileName = NULL;
+ }
+ while (line_skip_seperator (l));
+ /* OK */
+ return (l);
+ }
+ else
+ {
+ /*
+ SYNTAX: DELETE line [,...]
+ SYNTAX: DELETE line - line
+ */
+
+ do
+ {
+ int head;
+ int tail;
+
+ if (line_read_line_sequence (l, &head, &tail))
+ {
+ /* DELETE 's' - 'e' */
+ LineType *x;
+ LineType *previous;
+ if (head < MINLIN || head > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ if (tail < MINLIN || tail > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ if (head > tail)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ /* valid range */
+
+ /* avoid deleting ourself */
+
+ if (l->LineFlags & (LINE_USER))
+ {
+ /* console line (immediate mode) */
+ }
+ else if (head <= l->number && l->number <= tail)
+ {
+ /* 100 DELETE 100 */
+ WARN_CANT_CONTINUE;
+ return (l);
+ }
+ /* now go through and list appropriate lines */
+ previous = My->StartMarker;
+ for (x = My->StartMarker->next; x != My->EndMarker;)
+ {
+ LineType *next;
+
+ next = x->next;
+ if (x->number < head)
+ {
+ previous = x;
+ }
+ else if (head <= x->number && x->number <= tail)
+ {
+ if (x == l)
+ {
+ /* 100 DELETE 100 */
+ WARN_CANT_CONTINUE;
+ return (l);
+ }
+ bwb_freeline (x);
+ previous->next = next;
+ }
+ x = next;
+ }
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ while (line_skip_seperator (l));
+ /*
+ **
+ ** FORCE SCAN
+ **
+ */
+ if (bwb_scan () == FALSE)
+ {
+ WARN_CANT_CONTINUE;
+ return (l);
+ }
+ }
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ DELETE
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_DELETE (LineType * l)
+{
+
+ assert (l != NULL);
+
+ return bwb_delete (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ PDEL
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_PDEL (LineType * l)
+{
+
+ assert (l != NULL);
+
+ return bwb_delete (l);
+}
+
+#if FALSE /* keep the source to DONUM and DOUNNUM */
+
+/*
+--------------------------------------------------------------------------------------------
+ DONUM
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_donum (LineType * l)
+{
+ /*
+ SYNTAX: DONUM
+ */
+ LineType *current;
+ int lnumber;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->StartMarker != NULL );
+ assert( My->EndMarker != NULL );
+
+ lnumber = 10;
+ for (current = My->StartMarker->next; current != My->EndMarker;
+ current = current->next)
+ {
+ current->number = lnumber;
+
+ lnumber += 10;
+ if (lnumber > MAXLIN)
+ {
+ return (l);
+ }
+ }
+
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ DOUNUM
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_dounnum (LineType * l)
+{
+ /*
+ SYNTAX: DOUNNUM
+ */
+ LineType *current;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->StartMarker != NULL );
+ assert( My->EndMarker != NULL );
+
+ for (current = My->StartMarker->next; current != My->EndMarker;
+ current = current->next)
+ {
+ current->number = 0;
+ }
+
+ return (l);
+}
+
+#endif /* FALSE */
+
+
+
+/*
+--------------------------------------------------------------------------------------------
+ FILES
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_FILES (LineType * l)
+{
+ /*
+ SYNTAX: FILES A$ [, ...]
+ */
+ /* open a list of files in READ mode */
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ do
+ {
+ int FileNumber;
+
+ FileNumber = My->LastFileNumber;
+ FileNumber++;
+ if (FileNumber < 0)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (FileNumber == 0)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ My->CurrentFile = find_file_by_number (FileNumber);
+ if (My->CurrentFile == NULL)
+ {
+ My->CurrentFile = file_new ();
+ My->CurrentFile->FileNumber = FileNumber;
+ }
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (My->CurrentFile->FileName != NULL)
+ {
+ free (My->CurrentFile->FileName);
+ My->CurrentFile->FileName = NULL;
+ }
+ My->CurrentFile->FileName = Value;
+ Value = NULL;
+ }
+ if (My->CurrentFile->DevMode != DEVMODE_CLOSED)
+ {
+ My->CurrentFile->DevMode = DEVMODE_CLOSED;
+ }
+ if (My->CurrentFile->cfp != NULL)
+ {
+ bwb_fclose (My->CurrentFile->cfp);
+ My->CurrentFile->cfp = NULL;
+ }
+ if (My->CurrentFile->buffer != NULL)
+ {
+ free (My->CurrentFile->buffer);
+ My->CurrentFile->buffer = NULL;
+ }
+ My->CurrentFile->width = 0;
+ My->CurrentFile->col = 1;
+ My->CurrentFile->row = 1;
+ My->CurrentFile->delimit = ',';
+ if (is_empty_string (My->CurrentFile->FileName))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (bwb_strcmp (My->CurrentFile->FileName, "*") != 0)
+ {
+ if ((My->CurrentFile->cfp =
+ fopen (My->CurrentFile->FileName, "r")) == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ My->CurrentFile->DevMode = DEVMODE_INPUT;
+ }
+ My->LastFileNumber = FileNumber;
+ /* OK */
+ }
+ while (line_skip_seperator (l));
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ FILE
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_FILE (LineType * l)
+{
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ if (My->CurrentVersion->OptionVersionValue & (C77))
+ {
+ /*
+ CBASIC-II:
+ FILE file_name$ ' filename$ must be a simple string scalar (no arrays)
+ FILE file_name$ ( record_length% ) ' filename$ must be a simple string scalar (no arrays)
+ -- if the file exists,
+ then it is used,
+ else it is created.
+ -- Does not trigger IF END #
+ */
+ do
+ {
+ int FileNumber;
+ VariableType *v;
+ char varname[NameLengthMax + 1];
+
+ if (line_read_varname (l, varname) == FALSE)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (is_empty_string (varname))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ v = find_variable_by_type (varname, 0, StringTypeCode);
+ if (v == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ if (VAR_IS_STRING (v))
+ {
+ /* OK */
+ }
+ else
+ {
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+
+ FileNumber = My->LastFileNumber;
+ FileNumber++;
+ if (FileNumber < 0)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (FileNumber == 0)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ My->CurrentFile = find_file_by_number (FileNumber);
+ if (My->CurrentFile == NULL)
+ {
+ My->CurrentFile = file_new ();
+ My->CurrentFile->FileNumber = FileNumber;
+ }
+ if (My->CurrentFile->DevMode != DEVMODE_CLOSED)
+ {
+ My->CurrentFile->DevMode = DEVMODE_CLOSED;
+ }
+ if (My->CurrentFile->cfp != NULL)
+ {
+ bwb_fclose (My->CurrentFile->cfp);
+ My->CurrentFile->cfp = NULL;
+ }
+ if (My->CurrentFile->buffer != NULL)
+ {
+ free (My->CurrentFile->buffer);
+ My->CurrentFile->buffer = NULL;
+ }
+ My->CurrentFile->width = 0;
+ My->CurrentFile->col = 1;
+ My->CurrentFile->row = 1;
+ My->CurrentFile->delimit = ',';
+ /* OK */
+ if (line_skip_LparenChar (l))
+ {
+ /* RANDOM file */
+ int RecLen;
+
+ if (line_read_integer_expression (l, &RecLen) == FALSE)
+ {
+ WARN_FIELD_OVERFLOW;
+ return (l);
+ }
+ if (RecLen <= 0)
+ {
+ WARN_FIELD_OVERFLOW;
+ return (l);
+ }
+ if (line_skip_RparenChar (l) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if ((My->CurrentFile->buffer =
+ (char *) calloc (RecLen + 1 /* NulChar */ ,
+ sizeof (char))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (l);
+ }
+ My->CurrentFile->width = RecLen;
+ }
+
+ /* if( TRUE ) */
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ if (var_get (v, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ if (variant.VariantTypeCode == StringTypeCode)
+ {
+ if (My->CurrentFile->FileName != NULL)
+ {
+ free (My->CurrentFile->FileName);
+ My->CurrentFile->FileName = NULL;
+ }
+ My->CurrentFile->FileName = variant.Buffer;
+ variant.Buffer = NULL;
+ }
+ else
+ {
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+ }
+ if (is_empty_string (My->CurrentFile->FileName))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ My->CurrentFile->cfp = fopen (My->CurrentFile->FileName, "r+");
+ if (My->CurrentFile->cfp == NULL)
+ {
+ My->CurrentFile->cfp = fopen (My->CurrentFile->FileName, "w");
+ if (My->CurrentFile->cfp != NULL)
+ {
+ bwb_fclose (My->CurrentFile->cfp);
+ My->CurrentFile->cfp = fopen (My->CurrentFile->FileName, "r+");
+ }
+ }
+ if (My->CurrentFile->cfp == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (My->CurrentFile->width > 0)
+ {
+ /* RANDOM file */
+ My->CurrentFile->DevMode = DEVMODE_RANDOM;
+ }
+ else
+ {
+ /* SERIAL file */
+ My->CurrentFile->DevMode = DEVMODE_INPUT | DEVMODE_OUTPUT;
+ }
+ /* OK */
+ My->LastFileNumber = FileNumber;
+ }
+ while (line_skip_seperator (l));
+ /* OK */
+ return (l);
+ }
+ if (line_skip_FilenumChar (l))
+ {
+ /*
+ SYNTAX: FILE # X, A$
+ */
+ int FileNumber;
+
+ if (line_read_integer_expression (l, &FileNumber) == FALSE)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (line_skip_seperator (l))
+ {
+ /* OK */
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (FileNumber < 0)
+ {
+ /* "FILE # -1" is an ERROR */
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (FileNumber == 0)
+ {
+ /* "FILE # 0" is an ERROR */
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ My->CurrentFile = find_file_by_number (FileNumber);
+ if (My->CurrentFile == NULL)
+ {
+ My->CurrentFile = file_new ();
+ My->CurrentFile->FileNumber = FileNumber;
+ }
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (My->CurrentFile->FileName != NULL)
+ {
+ free (My->CurrentFile->FileName);
+ My->CurrentFile->FileName = NULL;
+ }
+ My->CurrentFile->FileName = Value;
+ Value = NULL;
+ }
+ if (My->CurrentFile->DevMode != DEVMODE_CLOSED)
+ {
+ My->CurrentFile->DevMode = DEVMODE_CLOSED;
+ }
+ if (My->CurrentFile->cfp != NULL)
+ {
+ bwb_fclose (My->CurrentFile->cfp);
+ My->CurrentFile->cfp = NULL;
+ }
+ if (My->CurrentFile->buffer != NULL)
+ {
+ free (My->CurrentFile->buffer);
+ My->CurrentFile->buffer = NULL;
+ }
+ My->CurrentFile->width = 0;
+ My->CurrentFile->col = 1;
+ My->CurrentFile->row = 1;
+ My->CurrentFile->delimit = ',';
+ if (is_empty_string (My->CurrentFile->FileName))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (bwb_strcmp (My->CurrentFile->FileName, "*") != 0)
+ {
+ if ((My->CurrentFile->cfp =
+ fopen (My->CurrentFile->FileName, "r")) == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ My->CurrentFile->DevMode = DEVMODE_INPUT;
+ }
+ /* OK */
+ return (l);
+ }
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ DELIMIT
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_DELIMIT (LineType * l)
+{
+ /*
+ SYNTAX: DELIMIT # X, A$
+ */
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSIN != NULL );
+
+ if (line_skip_FilenumChar (l))
+ {
+ /* DELIMIT # */
+ int FileNumber;
+ char delimit;
+
+ My->CurrentFile = My->SYSIN;
+
+ if (line_read_integer_expression (l, &FileNumber) == FALSE)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (line_skip_seperator (l))
+ {
+ /* OK */
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ delimit = Value[0];
+ free (Value);
+ Value = NULL;
+ if (bwb_ispunct (delimit))
+ {
+ /* OK */
+ }
+ else
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ }
+ if (FileNumber < 0)
+ {
+ /* "DELIMIT # -1" is SYSPRN */
+ My->SYSPRN->delimit = delimit;
+ return (l);
+ }
+ if (FileNumber == 0)
+ {
+ /* "DELIMIT # 0" is SYSOUT */
+ My->SYSOUT->delimit = delimit;
+ return (l);
+ }
+ /* normal file */
+ My->CurrentFile = find_file_by_number (FileNumber);
+ if (My->CurrentFile == NULL)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ My->CurrentFile->delimit = delimit;
+ /* OK */
+ return (l);
+ }
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ MARGIN
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_MARGIN (LineType * l)
+{
+ /*
+ SYNTAX: MARGIN # X, Y
+ */
+ /* set width for OUTPUT */
+ int FileNumber;
+ int Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSIN != NULL );
+
+ if (line_skip_FilenumChar (l))
+ {
+ /* MARGIN # */
+ My->CurrentFile = My->SYSIN;
+
+ if (line_read_integer_expression (l, &FileNumber) == FALSE)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (line_skip_seperator (l))
+ {
+ /* OK */
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_integer_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value < 0)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ if (FileNumber < 0)
+ {
+ /* "MARGIN # -1" is SYSPRN */
+ My->SYSPRN->width = Value;
+ return (l);
+ }
+ if (FileNumber == 0)
+ {
+ /* "MARGIN # 0" is SYSOUT */
+ My->SYSOUT->width = Value;
+ return (l);
+ }
+ /* normal file */
+ My->CurrentFile = find_file_by_number (FileNumber);
+ if (My->CurrentFile == NULL)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if ((My->CurrentFile->DevMode & DEVMODE_WRITE) == 0)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ My->CurrentFile->width = Value;
+ /* OK */
+ return (l);
+ }
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ USE
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_USE (LineType * l)
+{
+ /*
+ SYNTAX: USE parameter$ ' CALL/360, System/360, System/370
+ */
+ VariableType *v;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ if ((v = line_read_scalar (l)) == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (v->VariableTypeCode != StringTypeCode)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ if (My->UseParameterString)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ variant.VariantTypeCode = StringTypeCode;
+ variant.Buffer = My->UseParameterString;
+ variant.Length = bwb_strlen (My->UseParameterString);
+ var_set (v, &variant);
+ }
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ CHAIN
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_CHAIN (LineType * l)
+{
+ /*
+ SYNTAX: CHAIN file-name$ [, linenumber] ' most dialects
+ SYNTAX: CHAIN file-name$ [, parameter$] ' CALL/360, System/360, System/370
+ */
+ /* originally based upon bwb_load() */
+ int LineNumber;
+ LineType *x;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+ assert( My->StartMarker != NULL );
+ assert( My->EndMarker != NULL );
+
+ /* Get an argument for filename */
+ if (line_is_eol (l))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ else
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (is_empty_string (Value))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ My->ProgramFilename = NULL;
+ }
+ My->ProgramFilename = Value;
+ }
+ /* optional linenumber */
+ LineNumber = 0;
+ if (line_skip_seperator (l))
+ {
+ if (My->CurrentVersion->OptionVersionValue & (S70 | I70 | I73))
+ {
+ /* CHAIN filename$, parameter$ */
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (My->UseParameterString)
+ {
+ free (My->UseParameterString);
+ My->UseParameterString = NULL;
+ }
+ My->UseParameterString = Value;
+ }
+ }
+ else
+ {
+ /* CHAIN filename$, linenumber */
+ if (line_read_integer_expression (l, &LineNumber) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (LineNumber < MINLIN || LineNumber > MAXLIN)
+ {
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ }
+ }
+
+ /* deallocate all variables except common ones */
+ var_delcvars ();
+
+ /* remove old program from memory */
+ bwb_xnew (My->StartMarker);
+
+ /* load new program in memory */
+ if (bwb_fload (NULL) == FALSE)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ /* FIXME */
+ x = My->StartMarker;
+ if (MINLIN <= LineNumber && LineNumber <= MAXLIN)
+ {
+ /* search for a matching line number */
+ while (x->number != LineNumber && x != My->EndMarker)
+ {
+ x = x->next;
+ }
+ if (x == My->EndMarker)
+ {
+ /* NOT FOUND */
+ x = My->StartMarker;
+ }
+ }
+ x->position = 0;
+ /*
+ **
+ ** FORCE SCAN
+ **
+ */
+ if (bwb_scan () == FALSE)
+ {
+ WARN_CANT_CONTINUE;
+ return (l);
+ }
+ /* reset all stack counters */
+ bwb_clrexec ();
+ if (bwb_incexec ())
+ {
+ /* OK */
+ My->StackHead->line = x;
+ My->StackHead->ExecCode = EXEC_NORM;
+ }
+ else
+ {
+ /* ERROR */
+ WARN_OUT_OF_MEMORY;
+ return My->EndMarker;
+ }
+
+ /* run the program */
+
+ /* CHAIN */
+ WARN_CLEAR; /* bwb_CHAIN */
+ My->ContinueLine = NULL;
+ SetOnError (0);
+ return x;
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ APPEND
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_APPEND (LineType * l)
+{
+ /*
+ SYNTAX: APPEND # filenumber ' Dartmouth, Mark-I, Mark-II, GCOS
+ SYNTAX: APPEND [filename$] ' all others
+ */
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ if (My->CurrentVersion->OptionVersionValue & (D64 | G65 | G67 | G74))
+ {
+ if (line_skip_FilenumChar (l))
+ {
+ /* APPEND # filenumber */
+ int FileNumber;
+
+ if (line_read_integer_expression (l, &FileNumber) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (FileNumber < 0)
+ {
+ /* "APPEND # -1" is silently ignored */
+ return (l);
+ }
+ if (FileNumber == 0)
+ {
+ /* "APPEND # 0" is silently ignored */
+ return (l);
+ }
+ My->CurrentFile = find_file_by_number (FileNumber);
+ if (My->CurrentFile == NULL)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ /* normal file */
+ fseek (My->CurrentFile->cfp, 0, SEEK_END);
+ My->CurrentFile->DevMode = DEVMODE_APPEND;
+ /* OK */
+ return (l);
+ }
+ }
+ /* APPEND filename$ */
+ return bwb_load (l, "APPEND FILE NAME:", FALSE);
+}
+
+
+
+/*
+--------------------------------------------------------------------------------------------
+ ON ERROR and so on
+--------------------------------------------------------------------------------------------
+*/
+
+extern void
+SetOnError (int LineNumber)
+{
+ /* scan the stack looking for a FUNCTION/SUB */
+ StackType *StackItem;
+ assert( My != NULL );
+
+
+ if (My->StackHead == NULL)
+ {
+ return;
+ }
+
+ for (StackItem = My->StackHead; StackItem->next != NULL;
+ StackItem = StackItem->next)
+ {
+ LineType *current;
+
+ current = StackItem->LoopTopLine;
+ if (current != NULL)
+ {
+ switch (current->cmdnum)
+ {
+ case C_FUNCTION:
+ case C_SUB:
+ /* FOUND */
+ /* we are in a FUNCTION/SUB, so this is LOCAL */
+ StackItem->OnErrorGoto = LineNumber;
+ return;
+ /* break; */
+ }
+ }
+ }
+ /* StackItem->next == NULL */
+ /* NOT FOUND */
+ /* we are NOT in a FUNCTION/SUB */
+ assert (StackItem != NULL);
+ StackItem->OnErrorGoto = LineNumber;
+}
+
+
+extern int
+GetOnError (void)
+{
+ /* scan the stack looking for an active "ON ERROR GOTO linenumber" */
+ StackType *StackItem;
+ assert( My != NULL );
+
+
+ for (StackItem = My->StackHead; StackItem != NULL;
+ StackItem = StackItem->next)
+ {
+ if (StackItem->OnErrorGoto != 0)
+ {
+ /* FOUND */
+ return StackItem->OnErrorGoto;
+ }
+ }
+ /* NOT FOUND */
+ return 0;
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ ON ERROR
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_ON_ERROR (LineType * l)
+{
+
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ ON ERROR GOTO
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_ON_ERROR_GOTO (LineType * l)
+{
+ /* ON ERROR GOTO line */
+ int LineNumber;
+
+ assert (l != NULL);
+
+ WARN_CLEAR; /* bwb_ON_ERROR_GOTO */
+
+ /* get the line number */
+ LineNumber = 0;
+ if (line_is_eol (l))
+ {
+ /* ON ERROR GOTO */
+ SetOnError (0);
+ return (l);
+ }
+ if (line_read_integer_expression (l, &LineNumber) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* ON ERORR GOTO linenumber */
+ if (LineNumber == 0)
+ {
+ /* ON ERROR GOTO 0 */
+ SetOnError (0);
+ return (l);
+ }
+ if (LineNumber < MINLIN || LineNumber > MAXLIN)
+ {
+ /* ERROR */
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ /* OK */
+ SetOnError (LineNumber);
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ ON ERROR GOSUB
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_ON_ERROR_GOSUB (LineType * l)
+{
+ /* ON ERROR GOSUB line */
+
+ assert (l != NULL);
+ return bwb_ON_ERROR_GOTO (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ ON ERROR RESUME
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_ON_ERROR_RESUME (LineType * l)
+{
+
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ ON ERROR RESUME NEXT
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_ON_ERROR_RESUME_NEXT (LineType * l)
+{
+
+ assert (l != NULL);
+ WARN_CLEAR; /* bwb_ON_ERROR_RESUME_NEXT */
+ SetOnError (-1);
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ ON ERROR RETURN
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_ON_ERROR_RETURN (LineType * l)
+{
+
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ ON ERROR RETURN NEXT
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_ON_ERROR_RETURN_NEXT (LineType * l)
+{
+
+ assert (l != NULL);
+ return bwb_ON_ERROR_RESUME_NEXT (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ ON TIMER
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_ON_TIMER (LineType * l)
+{
+ /* ON TIMER(...) GOSUB ... */
+ DoubleType v;
+ DoubleType minv;
+ int LineNumber;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ My->IsTimerOn = FALSE; /* bwb_ON_TIMER */
+ My->OnTimerLineNumber = 0;
+ My->OnTimerCount = 0;
+
+
+ /* get the SECOMDS parameter */
+ if (line_read_numeric_expression (l, &v) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ minv = 1;
+ assert (CLOCKS_PER_SEC > 0);
+ minv /= CLOCKS_PER_SEC;
+ if (v < minv)
+ {
+ /* ERROR */
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+
+ /* get the GOSUB keyword */
+ if (line_skip_word (l, "GOSUB") == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* ON TIMER(X) GOSUB line */
+ if (line_read_integer_expression (l, &LineNumber) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (LineNumber < MINLIN || LineNumber > MAXLIN)
+ {
+ /* ERROR */
+ WARN_UNDEFINED_LINE;
+ return (l);
+ }
+ /* OK */
+ My->OnTimerLineNumber = LineNumber;
+ My->OnTimerCount = v;
+ return (l);
+}
+
+
+/*
+--------------------------------------------------------------------------------------------
+ TIMER
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_TIMER (LineType * l)
+{
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ My->IsTimerOn = FALSE; /* bwb_TIMER */
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ TIMER OFF
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_TIMER_OFF (LineType * l)
+{
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ /* TIMER OFF */
+ My->IsTimerOn = FALSE; /* bwb_TIMER_OFF */
+ My->OnTimerLineNumber = 0;
+ My->OnTimerCount = 0;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ TIMER ON
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_TIMER_ON (LineType * l)
+{
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ My->IsTimerOn = FALSE; /* bwb_TIMER_ON */
+ /* TIMER ON */
+ if (My->OnTimerCount > 0 && My->OnTimerLineNumber > 0)
+ {
+ My->OnTimerExpires = bwx_TIMER (My->OnTimerCount);
+ My->IsTimerOn = TRUE; /* bwb_TIMER_ON */
+ }
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ TIMER STOP
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_TIMER_STOP (LineType * l)
+{
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ My->IsTimerOn = FALSE; /* bwb_TIMER_STOP */
+
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ RESUME
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_RESUME (LineType * l)
+{
+ int LineNumber;
+ LineType *x;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ LineNumber = 0;
+ x = My->ERL; /* bwb_RESUME */
+ WARN_CLEAR; /* bwb_RESUME */
+
+ if (l->LineFlags & (LINE_USER))
+ {
+ WARN_ILLEGAL_DIRECT;
+ return (l);
+ }
+
+ if (x == NULL)
+ {
+ WARN_RESUME_WITHOUT_ERROR;
+ return (l);
+ }
+ /* Get optional argument for RESUME */
+ if (line_is_eol (l))
+ {
+ /* RESUME */
+ /*
+ Execution resumes at the statement which caused the error
+ For structured commands, this is the top line of the structure.
+ */
+ x->position = 0;
+ return x;
+ }
+ if (line_skip_word (l, "NEXT"))
+ {
+ /* RESUME NEXT */
+ /*
+ Execution resumes at the statement immediately following the one which caused the error.
+ For structured commands, this is the bottom line of the structure.
+ */
+ switch (x->cmdnum)
+ {
+ case C_IF8THEN:
+ /* skip to END_IF */
+ assert (x->OtherLine != NULL);
+ for (x = x->OtherLine; x->cmdnum != C_END_IF; x = x->OtherLine);
+ break;
+ case C_SELECT_CASE:
+ /* skip to END_SELECT */
+ assert (x->OtherLine != NULL);
+ for (x = x->OtherLine; x->cmdnum != C_END_SELECT; x = x->OtherLine);
+ break;
+ default:
+ x = x->next;
+ }
+ x->position = 0;
+ return x;
+ }
+ /* RESUME ### */
+ if (line_read_integer_expression (l, &LineNumber) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (LineNumber == 0)
+ {
+ /* SPECIAL CASE */
+ /* RESUME 0 */
+ /* Execution resumes at the statement which caused the error */
+ x->position = 0;
+ return x;
+ }
+ /* VERIFY LINE EXISTS */
+ x = find_line_number (LineNumber); /* RESUME 100 */
+ if (x != NULL)
+ {
+ /* FOUND */
+ x->position = 0;
+ return x;
+ }
+ /* NOT FOUND */
+ WARN_UNDEFINED_LINE;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ CMDS
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_CMDS (LineType * l)
+{
+ int n;
+ int t;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+ My->CurrentFile = My->SYSOUT;
+ fprintf (My->SYSOUT->cfp, "BWBASIC COMMANDS AVAILABLE:\n");
+
+ /* run through the command table and print comand names */
+
+ t = 0;
+ for (n = 0; n < NUM_COMMANDS; n++)
+ {
+ fprintf (My->SYSOUT->cfp, "%s", IntrinsicCommandTable[n].name);
+ if (t < 4)
+ {
+ fprintf (My->SYSOUT->cfp, "\t");
+ t++;
+ }
+ else
+ {
+ fprintf (My->SYSOUT->cfp, "\n");
+ t = 0;
+ }
+ }
+ if (t > 0)
+ {
+ fprintf (My->SYSOUT->cfp, "\n");
+ }
+ ResetConsoleColumn ();
+ return (l);
+}
+
+static void
+FixUp (char *Name)
+{
+ char *C;
+
+ assert (Name != NULL);
+
+ C = Name;
+ while (*C)
+ {
+ if (bwb_isalnum (*C))
+ {
+ /* OK */
+ }
+ else
+ {
+ /* FIX */
+ switch (*C)
+ {
+ case '!':
+ *C = '1';
+ break;
+ case '@':
+ *C = '2';
+ break;
+ case '#':
+ *C = '3';
+ break;
+ case '$':
+ *C = '4';
+ break;
+ case '%':
+ *C = '5';
+ break;
+ case '^':
+ *C = '6';
+ break;
+ case '&':
+ *C = '7';
+ break;
+ case '*':
+ *C = '8';
+ break;
+ case '(':
+ *C = '9';
+ break;
+ case ')':
+ *C = '0';
+ break;
+ default:
+ *C = '_';
+ }
+ }
+ C++;
+ }
+}
+
+
+static void
+CommandUniqueID (int i, char *UniqueID)
+{
+
+ assert (UniqueID != NULL);
+
+ bwb_strcpy (UniqueID, "C_");
+ bwb_strcat (UniqueID, IntrinsicCommandTable[i].name);
+ FixUp (UniqueID);
+}
+
+static void
+CommandVector (int i, char *Vector)
+{
+
+ assert (Vector != NULL);
+
+ bwb_strcpy (Vector, "bwb_");
+ bwb_strcat (Vector, IntrinsicCommandTable[i].name);
+ FixUp (Vector);
+}
+
+static void
+CommandOptionVersion (int n, char *OutputLine)
+{
+ int i;
+ int j;
+
+ assert (OutputLine != NULL);
+
+ bwb_strcpy (OutputLine, "");
+ j = 0;
+ for (i = 0; i < NUM_VERSIONS; i++)
+ {
+ if (IntrinsicCommandTable[n].OptionVersionBitmask & bwb_vertable[i].
+ OptionVersionValue)
+ {
+ if (j > 0)
+ {
+ bwb_strcat (OutputLine, " | ");
+ }
+ bwb_strcat (OutputLine, bwb_vertable[i].ID);
+ j++;
+ }
+ }
+}
+
+
+void
+SortAllCommands (void)
+{
+ /* sort by name */
+ int i;
+ assert( My != NULL );
+
+
+ for (i = 0; i < NUM_COMMANDS - 1; i++)
+ {
+ int j;
+ int k;
+ k = i;
+ for (j = i + 1; j < NUM_COMMANDS; j++)
+ {
+ if (bwb_stricmp
+ (IntrinsicCommandTable[j].name, IntrinsicCommandTable[k].name) < 0)
+ {
+ k = j;
+ }
+ }
+ if (k > i)
+ {
+ CommandType t;
+ bwb_memcpy (&t, &(IntrinsicCommandTable[i]), sizeof (CommandType));
+ bwb_memcpy (&(IntrinsicCommandTable[i]), &(IntrinsicCommandTable[k]),
+ sizeof (CommandType));
+ bwb_memcpy (&(IntrinsicCommandTable[k]), &t, sizeof (CommandType));
+ }
+ }
+#if THE_PRICE_IS_RIGHT
+ for (i = 0; i < 26; i++)
+ {
+ My->CommandStart[i] = -1;
+ }
+ for (i = 0; i < NUM_COMMANDS; i++)
+ {
+ int j;
+ j = VarTypeIndex (IntrinsicCommandTable[i].name[0]);
+ if (j < 0)
+ {
+ /* non-alpha */
+ }
+ else if (My->CommandStart[j] < 0)
+ {
+ /* this is the first command starting with this letter */
+ My->CommandStart[j] = i;
+ }
+ }
+#endif /* THE_PRICE_IS_RIGHT */
+}
+
+void
+SortAllFunctions (void)
+{
+ /* sort by name then number of parameters */
+ int i;
+ assert( My != NULL );
+
+
+ for (i = 0; i < NUM_FUNCTIONS - 1; i++)
+ {
+ int j;
+ int k;
+ k = i;
+ for (j = i + 1; j < NUM_FUNCTIONS; j++)
+ {
+ int n;
+ n =
+ bwb_stricmp (IntrinsicFunctionTable[j].Name,
+ IntrinsicFunctionTable[k].Name);
+ if (n < 0)
+ {
+ k = j;
+ }
+ else if (n == 0)
+ {
+ if (IntrinsicFunctionTable[j].ParameterCount <
+ IntrinsicFunctionTable[k].ParameterCount)
+ {
+ k = j;
+ }
+ }
+ }
+ if (k > i)
+ {
+ IntrinsicFunctionType t;
+ bwb_memcpy (&t, &(IntrinsicFunctionTable[i]),
+ sizeof (IntrinsicFunctionType));
+ bwb_memcpy (&(IntrinsicFunctionTable[i]), &(IntrinsicFunctionTable[k]),
+ sizeof (IntrinsicFunctionType));
+ bwb_memcpy (&(IntrinsicFunctionTable[k]), &t,
+ sizeof (IntrinsicFunctionType));
+ }
+ }
+#if THE_PRICE_IS_RIGHT
+ for (i = 0; i < 26; i++)
+ {
+ My->IntrinsicFunctionStart[i] = -1;
+ }
+ for (i = 0; i < NUM_FUNCTIONS; i++)
+ {
+ int j;
+ j = VarTypeIndex (IntrinsicFunctionTable[i].Name[0]);
+ if (j < 0)
+ {
+ /* non-alpha */
+ }
+ else if (My->IntrinsicFunctionStart[j] < 0)
+ {
+ /* this is the first command starting with this letter */
+ My->IntrinsicFunctionStart[j] = i;
+ }
+ }
+#endif /* THE_PRICE_IS_RIGHT */
+}
+
+
+void
+DumpAllCommandUniqueID (FILE * file)
+{
+ int i;
+ int j;
+ char LastUniqueID[NameLengthMax + 1];
+
+ assert (file != NULL);
+
+ j = 0;
+ LastUniqueID[0] = NulChar;
+
+ fprintf (file, "/* COMMANDS */\n");
+
+ /* run through the command table and print comand #define */
+
+ for (i = 0; i < NUM_COMMANDS; i++)
+ {
+ char UniqueID[NameLengthMax + 1];
+
+ CommandUniqueID (i, UniqueID);
+ if (bwb_stricmp (LastUniqueID, UniqueID) != 0)
+ {
+ /* not a duplicate */
+ bwb_strcpy (LastUniqueID, UniqueID);
+ j = j + 1;
+ fprintf (file, "#define %-30s %3d /* %-30s */\n", UniqueID, j,
+ IntrinsicCommandTable[i].name);
+ }
+ }
+ fprintf (file, "#define NUM_COMMANDS %d\n", j);
+ fflush (file);
+}
+
+static void
+ProcessEscapeChars (const char *Input, char *Output)
+{
+ int n;
+
+ assert (Input != NULL);
+ assert (Output != NULL);
+
+ n = 0;
+
+ while (*Input)
+ {
+ /* \a \b \f \n \r \t \v \" \\ */
+ switch (*Input)
+ {
+ case '\a':
+ *Output = '\\';
+ Output++;
+ *Output = 'a';
+ Output++;
+ break;
+ case '\b':
+ *Output = '\\';
+ Output++;
+ *Output = 'b';
+ Output++;
+ break;
+ case '\f':
+ *Output = '\\';
+ Output++;
+ *Output = 'f';
+ Output++;
+ break;
+ case '\n':
+ *Output = '\\';
+ Output++;
+ *Output = 'n';
+ Output++;
+ break;
+ case '\r':
+ *Output = '\\';
+ Output++;
+ *Output = 'r';
+ Output++;
+ break;
+ case '\t':
+ *Output = '\\';
+ Output++;
+ *Output = 't';
+ Output++;
+ break;
+ case '\v':
+ *Output = '\\';
+ Output++;
+ *Output = 'n';
+ Output++;
+ break;
+ case '\"':
+ *Output = '\\';
+ Output++;
+ *Output = '"';
+ Output++;
+ break;
+ case '\\':
+ *Output = '\\';
+ Output++;
+ *Output = '\\';
+ Output++;
+ break;
+ default:
+ *Output = *Input;
+ Output++;
+ break;
+ }
+ *Output = NulChar;
+ n++;
+ if (n > 60 && *Input == ' ')
+ {
+ *Output = '\"';
+ Output++;
+ *Output = '\n';
+ Output++;
+ *Output = ' ';
+ Output++;
+ *Output = ' ';
+ Output++;
+ *Output = '\"';
+ Output++;
+ *Output = NulChar;
+ n = 0;
+ }
+ Input++;
+ }
+}
+
+void
+DumpAllCommandTableDefinitions (FILE * file)
+{
+ /* generate bwd_cmd.c */
+
+ int i;
+
+ assert (file != NULL);
+
+ fprintf (file, "/* COMMAND TABLE */\n\n");
+ fprintf (file, "#include \"bwbasic.h\"\n\n");
+ fprintf (file,
+ "CommandType IntrinsicCommandTable[ /* NUM_COMMANDS */ ] =\n");
+ fprintf (file, "{\n");
+
+ /* run through the command table and print comand #define */
+
+ for (i = 0; i < NUM_COMMANDS; i++)
+ {
+ char tbuf[MAINTAINER_BUFFER_LENGTH + 1]; /* DumpAllCommandTableDefinitions */
+
+
+ fprintf (file, "{\n");
+
+ fprintf (file, " ");
+ CommandUniqueID (i, tbuf);
+ fprintf (file, "%s", tbuf);
+ fprintf (file, ", /* UniqueID */\n");
+
+ fprintf (file, " ");
+ fprintf (file, "\"");
+ ProcessEscapeChars (IntrinsicCommandTable[i].Syntax, tbuf);
+ fprintf (file, "%s", tbuf);
+ fprintf (file, "\"");
+ fprintf (file, ", /* Syntax */\n");
+
+ fprintf (file, " ");
+ fprintf (file, "\"");
+ ProcessEscapeChars (IntrinsicCommandTable[i].Description, tbuf);
+ fprintf (file, "%s", tbuf);
+ fprintf (file, "\"");
+ fprintf (file, ", /* Description */\n");
+
+ fprintf (file, " ");
+ fprintf (file, "\"");
+ fprintf (file, "%s", IntrinsicCommandTable[i].name);
+ fprintf (file, "\"");
+ fprintf (file, ", /* Name */\n");
+
+ fprintf (file, " ");
+ CommandOptionVersion (i, tbuf);
+ fprintf (file, "%s", tbuf);
+ fprintf (file, " /* OptionVersionBitmask */\n");
+
+ fprintf (file, "},\n");
+ }
+ fprintf (file, "};\n");
+ fprintf (file, "\n");
+ fprintf (file,
+ "const size_t NUM_COMMANDS = sizeof( IntrinsicCommandTable ) / sizeof( CommandType );\n");
+ fprintf (file, "\n");
+ fflush (file);
+}
+
+void
+DumpAllCommandSwitchStatement (FILE * file)
+{
+ int i;
+ char LastUniqueID[NameLengthMax + 1];
+
+ assert (file != NULL);
+
+ LastUniqueID[0] = NulChar;
+
+ /* run through the command table and print comand #define */
+ fprintf (file, "/* SWITCH */\n");
+ fprintf (file, "LineType *bwb_vector( LineType *l )\n");
+ fprintf (file, "{\n");
+
+ fprintf (file, " ");
+ fprintf (file, "LineType *r;\n");
+
+ fprintf (file, " ");
+ fprintf (file, "switch( l->cmdnum )\n");
+
+ fprintf (file, " ");
+ fprintf (file, "{\n");
+
+ for (i = 0; i < NUM_COMMANDS; i++)
+ {
+ char tbuf[NameLengthMax + 1];
+
+ CommandUniqueID (i, tbuf);
+ if (bwb_stricmp (LastUniqueID, tbuf) != 0)
+ {
+ /* not a duplicate */
+ bwb_strcpy (LastUniqueID, tbuf);
+
+ fprintf (file, " ");
+ fprintf (file, "case ");
+ CommandUniqueID (i, tbuf);
+ fprintf (file, "%s", tbuf);
+ fprintf (file, ":\n");
+
+ fprintf (file, " ");
+ fprintf (file, " ");
+ fprintf (file, "r = ");
+ CommandVector (i, tbuf);
+ fprintf (file, "%s", tbuf);
+ fprintf (file, "( l );\n");
+
+ fprintf (file, " ");
+ fprintf (file, " ");
+ fprintf (file, "break;\n");
+ }
+ }
+
+ fprintf (file, " ");
+ fprintf (file, "default:\n");
+
+ fprintf (file, " ");
+ fprintf (file, " ");
+ fprintf (file, "WARN_INTERNAL_ERROR;\n");
+
+ fprintf (file, " ");
+ fprintf (file, " ");
+ fprintf (file, "r = l;\n");
+
+ fprintf (file, " ");
+ fprintf (file, " ");
+ fprintf (file, "break;\n");
+
+
+ fprintf (file, " ");
+ fprintf (file, "}\n");
+
+ fprintf (file, " ");
+ fprintf (file, "return r;\n");
+
+ fprintf (file, "}\n");
+
+ fflush (file);
+}
+
+void
+FixDescription (FILE * file, const char *left, const char *right)
+{
+ char buffer[MAINTAINER_BUFFER_LENGTH + 1]; /* FixDescription */
+ int l; /* length of left side */
+ int p; /* current position */
+ int n; /* position of the last space character, zero means none yet seen */
+ int i; /* number of characters since last '\n' */
+
+ assert (left != NULL);
+ assert (right != NULL);
+
+ l = bwb_strlen (left);
+ p = 0;
+ n = 0;
+ i = 0;
+ bwb_strcpy (buffer, right);
+
+ while (buffer[p])
+ {
+ if (buffer[p] == '\n')
+ {
+ n = p;
+ i = 0;
+ }
+ if (buffer[p] == ' ')
+ {
+ n = p;
+ }
+ if (i > 45 && n > 0)
+ {
+ buffer[n] = '\n';
+ i = p - n;
+ }
+ p++;
+ i++;
+ }
+ fputs (left, file);
+ p = 0;
+ while (buffer[p])
+ {
+ if (buffer[p] == '\n')
+ {
+ fputc (buffer[p], file);
+ p++;
+ while (buffer[p] == ' ')
+ {
+ p++;
+ }
+ for (i = 0; i < l; i++)
+ {
+ fputc (' ', file);
+ }
+ }
+ else
+ {
+ fputc (buffer[p], file);
+ p++;
+ }
+ }
+ fputc ('\n', file);
+
+}
+
+void
+DumpOneCommandSyntax (FILE * file, int IsXref, int n)
+{
+
+ assert (file != NULL);
+
+ if (n < 0 || n >= NUM_COMMANDS)
+ {
+ return;
+ }
+ /* NAME */
+ {
+ FixDescription (file, " SYNTAX: ", IntrinsicCommandTable[n].Syntax);
+ }
+ /* DESCRIPTION */
+ {
+ FixDescription (file, "DESCRIPTION: ",
+ IntrinsicCommandTable[n].Description);
+ }
+ /* COMPATIBILITY */
+ if (IsXref)
+ {
+ int i;
+ fprintf (file, " VERSIONS:\n");
+ for (i = 0; i < NUM_VERSIONS; i++)
+ {
+ char X;
+ if (IntrinsicCommandTable[n].OptionVersionBitmask & bwb_vertable[i].
+ OptionVersionValue)
+ {
+ /* SUPPORTED */
+ X = 'X';
+ }
+ else
+ {
+ /* NOT SUPPORTED */
+ X = '_';
+ }
+ fprintf (file, " [%c] %s\n", X, bwb_vertable[i].Name);
+ }
+ }
+
+ fflush (file);
+}
+
+void
+DumpAllCommandSyntax (FILE * file, int IsXref,
+ OptionVersionType OptionVersionValue)
+{
+ /* for the C maintainer */
+ int i;
+
+ assert (file != NULL);
+
+ fprintf (file,
+ "============================================================\n");
+ fprintf (file,
+ " COMMANDS \n");
+ fprintf (file,
+ "============================================================\n");
+ fprintf (file, "\n");
+ fprintf (file, "\n");
+ for (i = 0; i < NUM_COMMANDS; i++)
+ {
+ if (IntrinsicCommandTable[i].OptionVersionBitmask & OptionVersionValue)
+ {
+ fprintf (file,
+ "------------------------------------------------------------\n");
+ DumpOneCommandSyntax (file, IsXref, i);
+ }
+
+ }
+ fprintf (file,
+ "------------------------------------------------------------\n");
+
+
+ fprintf (file, "\n");
+ fprintf (file, "\n");
+ fflush (file);
+}
+
+
+void
+DumpAllCommandHtmlTable (FILE * file)
+{
+ /* generate bwd_cmd.htm */
+
+ int i;
+ int j;
+
+ assert (file != NULL);
+
+
+ /* LEGEND */
+ fprintf (file, "CMDS\n");
+ fprintf (file, "LEGEND
\n");
+ fprintf (file, "\n");
+
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "ID");
+ fprintf (file, "");
+ fprintf (file, " | ");
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "NAME");
+ fprintf (file, "");
+ fprintf (file, " | ");
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "DESCRIPTION");
+ fprintf (file, "");
+ fprintf (file, " | ");
+ fprintf (file, "
\n");
+
+ for (j = 0; j < NUM_VERSIONS; j++)
+ {
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "%s", bwb_vertable[j].ID);
+ fprintf (file, " | ");
+ fprintf (file, "");
+ fprintf (file, "%s", bwb_vertable[j].Name);
+ fprintf (file, " | ");
+ fprintf (file, "");
+ fprintf (file, "%s", bwb_vertable[j].Description);
+ fprintf (file, " | ");
+ fprintf (file, "
\n");
+ }
+ fprintf (file, "
\n");
+ fprintf (file, "
\n");
+
+
+ /* DETAILS */
+ fprintf (file, "DETAILS
\n");
+ fprintf (file, "\n");
+
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "COMMAND");
+ fprintf (file, "");
+ fprintf (file, " | ");
+ for (j = 0; j < NUM_VERSIONS; j++)
+ {
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "%s", bwb_vertable[j].ID);
+ fprintf (file, "");
+ fprintf (file, " | ");
+ }
+ fprintf (file, "
\n");
+
+
+ /* run through the command table and print comand -vs- OPTION VERSION */
+
+ for (i = 0; i < NUM_COMMANDS; i++)
+ {
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "%s", (char *) IntrinsicCommandTable[i].Syntax);
+ fprintf (file, " | ");
+
+ for (j = 0; j < NUM_VERSIONS; j++)
+ {
+ fprintf (file, "");
+ if (IntrinsicCommandTable[i].OptionVersionBitmask & bwb_vertable[j].
+ OptionVersionValue)
+ {
+ fprintf (file, "X");
+ }
+ else
+ {
+ fprintf (file, " ");
+ }
+ fprintf (file, " | ");
+ }
+ fprintf (file, "
\n");
+ }
+ fprintf (file, "
\n");
+ fprintf (file, "\n");
+ fprintf (file, "\n");
+
+ fflush (file);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ HELP
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_HELP (LineType * l)
+{
+ /* HELP ... */
+ int n;
+ int Found;
+ char *C;
+ char *tbuf;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->ConsoleInput != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+ tbuf = My->ConsoleInput;
+ Found = FALSE;
+
+ C = l->buffer;
+ C += l->position;
+ bwb_strcpy (tbuf, C);
+
+ /* RTRIM$ */
+ C = tbuf;
+ if (*C != 0)
+ {
+ /* not an empty line, so remove one (or more) trailing spaces */
+ char *E;
+
+ E = bwb_strchr (tbuf, 0);
+ E--;
+ while (E >= tbuf && *E == ' ')
+ {
+ *E = 0;
+ E--;
+ }
+ }
+
+
+ /* EXACT match */
+ for (n = 0; n < NUM_COMMANDS; n++)
+ {
+ if (bwb_stricmp (IntrinsicCommandTable[n].name, tbuf) == 0)
+ {
+ fprintf (My->SYSOUT->cfp,
+ "------------------------------------------------------------\n");
+ DumpOneCommandSyntax (My->SYSOUT->cfp, FALSE, n);
+ Found = TRUE;
+ }
+ }
+
+ for (n = 0; n < NUM_FUNCTIONS; n++)
+ {
+ if (bwb_stricmp (IntrinsicFunctionTable[n].Name, tbuf) == 0)
+ {
+ fprintf (My->SYSOUT->cfp,
+ "------------------------------------------------------------\n");
+ DumpOneFunctionSyntax (My->SYSOUT->cfp, FALSE, n);
+ Found = TRUE;
+ }
+ }
+
+ if (Found == FALSE)
+ {
+ /* PARTIAL match */
+ int Length;
+ Length = bwb_strlen (tbuf);
+
+ for (n = 0; n < NUM_COMMANDS; n++)
+ {
+ if (bwb_strnicmp (IntrinsicCommandTable[n].name, tbuf, Length) == 0)
+ {
+ if (Found == FALSE)
+ {
+ fprintf (My->SYSOUT->cfp,
+ "The following topics are a partial match:\n");
+ }
+ fprintf (My->SYSOUT->cfp, "%s", IntrinsicCommandTable[n].name);
+ fprintf (My->SYSOUT->cfp, "\t");
+ Found = TRUE;
+ }
+ }
+
+ for (n = 0; n < NUM_FUNCTIONS; n++)
+ {
+ if (bwb_strnicmp (IntrinsicFunctionTable[n].Name, tbuf, Length) == 0)
+ {
+ if (Found == FALSE)
+ {
+ fprintf (My->SYSOUT->cfp,
+ "The following topics are a partial match:\n");
+ }
+ fprintf (My->SYSOUT->cfp, "%s", IntrinsicFunctionTable[n].Name);
+ fprintf (My->SYSOUT->cfp, "\t");
+ Found = TRUE;
+ }
+ }
+ if (Found == TRUE)
+ {
+ /* match */
+ fprintf (My->SYSOUT->cfp, "\n");
+ }
+ }
+ if (Found == FALSE)
+ {
+ /* NO match */
+ fprintf (My->SYSOUT->cfp, "No help found.\n");
+ }
+ ResetConsoleColumn ();
+ line_skip_eol (l);
+ return (l);
+
+}
+
+int
+NumberValueCheck (ParamTestType ParameterTests, DoubleType X)
+{
+ DoubleType XR; /* rounded value */
+ unsigned char TestNibble;
+
+
+
+ /* VerifyNumeric */
+ if (isnan (X))
+ {
+ /* INTERNAL ERROR */
+ return -1;
+ }
+ if (isinf (X))
+ {
+ /* - Evaluation of an expression results in an overflow
+ * (nonfatal, the recommended recovery procedure is to supply
+ * machine in- finity with the algebraically correct sign and
+ * continue). */
+ if (X < 0)
+ {
+ X = MINDBL;
+ }
+ else
+ {
+ X = MAXDBL;
+ }
+ if (WARN_OVERFLOW)
+ {
+ /* ERROR */
+ return -1;
+ }
+ /* CONTINUE */
+ }
+ /* OK */
+ /* VALID NUMERIC VALUE */
+ XR = bwb_rint (X);
+ ParameterTests &= 0x0000000F;
+ TestNibble = (unsigned char) ParameterTests;
+ switch (TestNibble)
+ {
+ case P1ERR:
+ /* INTERNAL ERROR */
+ return -1;
+ /* break; */
+ case P1ANY:
+ if (X < MINDBL || X > MAXDBL)
+ {
+ /* ERROR */
+ return -1;
+ }
+ /* OK */
+ return 0;
+ /* break; */
+ case P1BYT:
+ if (XR < MINBYT || XR > MAXBYT)
+ {
+ /* ERROR */
+ return -1;
+ }
+ /* OK */
+ return 0;
+ /* break; */
+ case P1INT:
+ if (XR < MININT || XR > MAXINT)
+ {
+ /* ERROR */
+ return -1;
+ }
+ /* OK */
+ return 0;
+ /* break; */
+ case P1LNG:
+ if (XR < MINLNG || XR > MAXLNG)
+ {
+ /* ERROR */
+ return -1;
+ }
+ /* OK */
+ return 0;
+ /* break; */
+ case P1CUR:
+ if (XR < MINCUR || XR > MAXCUR)
+ {
+ /* ERROR */
+ return -1;
+ }
+ /* OK */
+ return 0;
+ /* break; */
+ case P1FLT:
+ if (X < MINSNG || X > MAXSNG)
+ {
+ /* ERROR */
+ return -1;
+ }
+ /* OK */
+ return 0;
+ /* break; */
+ case P1DBL:
+ if (X < MINDBL || X > MAXDBL)
+ {
+ /* ERROR */
+ return -1;
+ }
+ /* OK */
+ return 0;
+ /* break; */
+ case P1DEV:
+ /* ERROR */
+ return -1;
+ /* break; */
+ case P1LEN:
+ if (XR < MINLEN || XR > MAXLEN)
+ {
+ /* ERROR */
+ return -1;
+ }
+ /* OK */
+ return 0;
+ /* break; */
+ case P1POS:
+ if (XR < 1 || XR > MAXLEN)
+ {
+ /* ERROR */
+ return -1;
+ }
+ /* OK */
+ return 0;
+ /* break; */
+ case P1COM:
+ /* ERROR */
+ return -1;
+ /* break; */
+ case P1LPT:
+ /* ERROR */
+ return -1;
+ /* break; */
+ case P1GTZ:
+ if (X > 0)
+ {
+ /* OK */
+ return 0;
+ }
+ break;
+ case P1GEZ:
+ if (X >= 0)
+ {
+ /* OK */
+ return 0;
+ }
+ break;
+ case P1NEZ:
+ if (X != 0)
+ {
+ /* OK */
+ return 0;
+ }
+ break;
+ }
+ /* ERROR */
+ return -1;
+}
+
+int
+StringLengthCheck (ParamTestType ParameterTests, int s)
+{
+ unsigned char TestNibble;
+
+
+ /* check for invalid string length */
+ if (s < 0 || s > MAXLEN)
+ {
+ /* INTERNAL ERROR */
+ return -1;
+ }
+ /* VALID STRING LENGTH */
+ ParameterTests &= 0x0000000F;
+ TestNibble = (unsigned char) ParameterTests;
+ switch (TestNibble)
+ {
+ case P1ERR:
+ /* INTERNAL ERROR */
+ return -1;
+ /* break; */
+ case P1ANY:
+ /* OK */
+ return 0;
+ /* break; */
+ case P1BYT:
+ if (s >= sizeof (ByteType))
+ {
+ /* OK */
+ return 0;
+ }
+ break;
+ case P1INT:
+ if (s >= sizeof (IntegerType))
+ {
+ /* OK */
+ return 0;
+ }
+ break;
+ case P1LNG:
+ if (s >= sizeof (LongType))
+ {
+ /* OK */
+ return 0;
+ }
+ break;
+ case P1CUR:
+ if (s >= sizeof (CurrencyType))
+ {
+ /* OK */
+ return 0;
+ }
+ break;
+ case P1FLT:
+ if (s >= sizeof (SingleType))
+ {
+ /* OK */
+ return 0;
+ }
+ break;
+ case P1DBL:
+ if (s >= sizeof (DoubleType))
+ {
+ /* OK */
+ return 0;
+ }
+ break;
+ case P1DEV:
+ /* ERROR */
+ return -1;
+ /* break; */
+ case P1LEN:
+ /* ERROR */
+ return -1;
+ /* break; */
+ case P1POS:
+ /* ERROR */
+ return -1;
+ /* break; */
+ case P1GEZ:
+ /* ERROR */
+ return -1;
+ /* break; */
+ case P1GTZ:
+ /* ERROR */
+ return -1;
+ /* break; */
+ case P1NEZ:
+ /* ERROR */
+ return -1;
+ /* break; */
+ }
+ /* ERROR */
+ return -1;
+}
+
+void
+IntrinsicFunctionDefinitionCheck (IntrinsicFunctionType * f)
+{
+ /* function definition check -- look for obvious errors */
+
+ assert (f != NULL);
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+
+ /* sanity check */
+ if (f->ParameterCount == PNONE || f->ParameterCount == 0xFF)
+ {
+ /* function has NO explicit parameters */
+ if (f->ParameterTypes == PNONE)
+ {
+ /* OK */
+ }
+ else
+ {
+ /* oops */
+ fprintf (My->SYSOUT->cfp, "invalid ParameterTypes <%s>\n", f->Name);
+ }
+ if (f->ParameterTests == PNONE)
+ {
+ /* OK */
+ }
+ else
+ {
+ /* oops */
+ fprintf (My->SYSOUT->cfp, "invalid ParameterTests <%s>\n", f->Name);
+ }
+ }
+ else
+ {
+ /* function HAS an explicit number of parameters */
+ int i;
+ ParamTestType ParameterTests;
+
+ ParameterTests = f->ParameterTests;
+ for (i = 0; i < f->ParameterCount; i++)
+ {
+ /* sanity check this parameter */
+ ParamTestType thischeck;
+ thischeck = ParameterTests & 0x0000000F;
+ /* verify parameter check */
+ if (f->ParameterTypes & (1 << i))
+ {
+ /* STRING */
+ if (thischeck >= P1ANY && thischeck <= P1DBL)
+ {
+ /* OK */
+ }
+ else
+ {
+ /* oops */
+ fprintf (My->SYSOUT->cfp,
+ "invalid ParameterTests <%s> parameter %d\n", f->Name,
+ i + 1);
+ }
+ }
+ else
+ {
+ /* NUMBER */
+ if (thischeck >= P1ANY && thischeck <= P1NEZ)
+ {
+ /* OK */
+ }
+ else
+ {
+ /* oops */
+ fprintf (My->SYSOUT->cfp,
+ "invalid ParameterTests <%s> parameter %d\n", f->Name,
+ i + 1);
+ }
+ }
+ ParameterTests = ParameterTests >> 4;
+ }
+ if (ParameterTests != 0)
+ {
+ /* oops */
+ fprintf (My->SYSOUT->cfp, "invalid ParameterTests <%s> parameter %d\n",
+ f->Name, i + 1);
+ }
+ }
+}
+
+void
+IntrinsicFunctionUniqueID (IntrinsicFunctionType * f, char *UniqueID)
+{
+ /* generate the function's UniqueID */
+ /* manual fixup required for duplicates */
+ char NumVar;
+ char StrVar;
+
+ assert (f != NULL);
+ assert (UniqueID != NULL);
+
+
+ NumVar = 'X';
+ StrVar = 'A';
+
+ /* F_ */
+ bwb_strcpy (UniqueID, "F_");
+ /* NAME */
+ bwb_strcat (UniqueID, f->Name);
+ /* PARAMETERS */
+ if (f->ParameterCount == PNONE || f->ParameterCount == 0xFF)
+ {
+ /* function has NO explicit parameters */
+ }
+ else
+ {
+ /* function HAS explicit parameters */
+ int i;
+ ParamBitsType ParameterTypes;
+ ParameterTypes = f->ParameterTypes;
+ for (i = 0; i < f->ParameterCount; i++)
+ {
+ char VarName[NameLengthMax + 1];
+ if (ParameterTypes & 1)
+ {
+ /* STRING */
+ sprintf (VarName, "_%c", StrVar);
+ StrVar++;
+ }
+ else
+ {
+ /* NUMBER */
+ sprintf (VarName, "_%c", NumVar);
+ NumVar++;
+ }
+ bwb_strcat (UniqueID, VarName);
+ ParameterTypes = ParameterTypes >> 1;
+ }
+ }
+ /* RETURN TYPE */
+ if (f->ReturnTypeCode == StringTypeCode)
+ {
+ bwb_strcat (UniqueID, "_S");
+ }
+ else
+ {
+ bwb_strcat (UniqueID, "_N");
+ }
+ /* fixup illegal characters, "DEF FN" "BLOAD:", "CLOAD*" */
+ FixUp (UniqueID);
+}
+
+
+void
+IntrinsicFunctionSyntax (IntrinsicFunctionType * f, char *Syntax)
+{
+ /* generate the function's Syntax */
+ char NumVar;
+ char StrVar;
+
+ assert (f != NULL);
+ assert (Syntax != NULL);
+
+
+ NumVar = 'X';
+ StrVar = 'A';
+
+ /* RETURN TYPE */
+ if (f->ReturnTypeCode == StringTypeCode)
+ {
+ bwb_strcpy (Syntax, "S$ = ");
+ }
+ else
+ {
+ bwb_strcpy (Syntax, "N = ");
+ }
+ /* NAME */
+ bwb_strcat (Syntax, f->Name);
+ /* PARAMETERS */
+ if (f->ParameterCount == PNONE)
+ {
+ /* function has NO explicit parameters */
+ }
+ else if (f->ParameterCount == 0xFF)
+ {
+ /* function has a variable number of parameters */
+ bwb_strcat (Syntax, "( ... )");
+ }
+ else
+ {
+ /* function HAS explicit parameters */
+ int i;
+ ParamBitsType ParameterTypes;
+ ParameterTypes = f->ParameterTypes;
+
+ if (f->ReturnTypeCode == StringTypeCode)
+ {
+ bwb_strcat (Syntax, "( ");
+ }
+ else
+ {
+ bwb_strcat (Syntax, "( ");
+ }
+
+ for (i = 0; i < f->ParameterCount; i++)
+ {
+ char VarName[NameLengthMax + 1];
+ if (i > 0)
+ {
+ bwb_strcat (Syntax, ", ");
+ }
+ /* verify parameter check */
+ if (ParameterTypes & 1)
+ {
+ /* STRING */
+ sprintf (VarName, "%c$", StrVar);
+ StrVar++;
+ }
+ else
+ {
+ /* NUMBER */
+ sprintf (VarName, "%c", NumVar);
+ NumVar++;
+ }
+ bwb_strcat (Syntax, VarName);
+ ParameterTypes = ParameterTypes >> 1;
+ }
+ if (f->ReturnTypeCode == StringTypeCode)
+ {
+ bwb_strcat (Syntax, " )");
+ }
+ else
+ {
+ bwb_strcat (Syntax, " )");
+ }
+ }
+}
+
+void
+DumpAllFunctionUniqueID (FILE * file)
+{
+ /* for the C maintainer */
+ int i;
+ int j;
+ char LastUniqueID[NameLengthMax + 1];
+
+ assert (file != NULL);
+
+ j = 0;
+ LastUniqueID[0] = NulChar;
+
+ fprintf (file, "/* FUNCTIONS */\n");
+ for (i = 0; i < NUM_FUNCTIONS; i++)
+ {
+ char UniqueID[NameLengthMax + 1];
+
+ IntrinsicFunctionUniqueID (&(IntrinsicFunctionTable[i]), UniqueID);
+ if (bwb_stricmp (LastUniqueID, UniqueID) != 0)
+ {
+ /* not a duplicate */
+ char Syntax[NameLengthMax + 1];
+
+ bwb_strcpy (LastUniqueID, UniqueID);
+ j = j + 1;
+ IntrinsicFunctionSyntax (&(IntrinsicFunctionTable[i]), Syntax);
+ fprintf (file, "#define %-30s %3d /* %-30s */\n", UniqueID, j, Syntax);
+ }
+ }
+ fprintf (file, "#define NUM_FUNCTIONS %d\n", j);
+ fflush (file);
+}
+
+void
+DumpAllFunctionSwitch (FILE * file)
+{
+ /* for the C maintainer */
+ int i;
+
+ assert (file != NULL);
+
+
+ fprintf (file, "/* SWITCH */\n");
+ fprintf (file, "switch( UniqueID )\n");
+ fprintf (file, "{\n");
+ for (i = 0; i < NUM_FUNCTIONS; i++)
+ {
+ char tbuf[MAINTAINER_BUFFER_LENGTH + 1]; /* DumpAllFunctionSwitch */
+
+ fprintf (file, "case ");
+ IntrinsicFunctionUniqueID (&(IntrinsicFunctionTable[i]), tbuf);
+ fprintf (file, "%s", tbuf);
+ fprintf (file, ":\n");
+ fprintf (file, " break;\n");
+ }
+ fprintf (file, "}\n");
+ fflush (file);
+}
+
+static const char *ParameterRangeID[16] = {
+ "P%dERR",
+ "P%dANY",
+ "P%dBYT",
+ "P%dINT",
+ "P%dLNG",
+ "P%dCUR",
+ "P%dFLT",
+ "P%dDBL",
+ "P%dDEV",
+ "P%dLEN",
+ "P%dPOS",
+ "P%dCOM",
+ "P%dLPT",
+ "P%dGTZ",
+ "P%dGEZ",
+ "P%dNEZ",
+};
+
+static const char *NumberVariableRange[16] = {
+ /* P1ERR */ " PARAMETER: %c is a number, INTERNAL ERROR",
+ /* P1ANY */ " PARAMETER: %c is a number",
+ /* P1BYT */ " PARAMETER: %c is a number, [0,255]",
+ /* P1INT */ " PARAMETER: %c is a number, [MININT,MAXINT]",
+ /* P1LNG */ " PARAMETER: %c is a number, [MINLNG,MAXLNG]",
+ /* P1CUR */ " PARAMETER: %c is a number, [MINCUR,MAXCUR]",
+ /* P1FLT */ " PARAMETER: %c is a number, [MINFLT,MAXFLT]",
+ /* P1DBL */ " PARAMETER: %c is a number, [MINDBL,MAXDBL]",
+ /* P1DEV */ " PARAMETER: %c is a number, RESERVED",
+ /* P1LEN */ " PARAMETER: %c is a number, [0,MAXLEN]",
+ /* P1POS */ " PARAMETER: %c is a number, [1,MAXLEN]",
+ /* P1COM */ " PARAMETER: %c is a number, RESERVED",
+ /* P1LPT */ " PARAMETER: %c is a number, RESERVED",
+ /* P1GTZ */ " PARAMETER: %c is a number, > 0",
+ /* P1GEZ */ " PARAMETER: %c is a number, >= 0",
+ /* P1NEZ */ " PARAMETER: %c is a number, <> 0",
+};
+
+static const char *StringVariableRange[16] = {
+ /* P1ERR */ " PARAMETER: %c$ is a string, INTERNAL ERROR",
+ /* P1ANY */ " PARAMETER: %c$ is a string, LEN >= 0",
+ /* P1BYT */ " PARAMETER: %c$ is a string, LEN >= 1",
+ /* P1INT */ " PARAMETER: %c$ is a string, LEN >= sizeof(INT)",
+ /* P1LNG */ " PARAMETER: %c$ is a string, LEN >= sizeof(LNG)",
+ /* P1CUR */ " PARAMETER: %c$ is a string, LEN >= sizeof(CUR)",
+ /* P1FLT */ " PARAMETER: %c$ is a string, LEN >= sizeof(FLT)",
+ /* P1DBL */ " PARAMETER: %c$ is a string, LEN >= sizeof(DBL)",
+ /* P1DEV */ " PARAMETER: %c$ is a string, RESERVED",
+ /* P1LEN */ " PARAMETER: %c$ is a string, RESERVED",
+ /* P1POS */ " PARAMETER: %c$ is a string, RESERVED",
+ /* P1COM */ " PARAMETER: %c$ is a string, RESERVED",
+ /* P1LPT */ " PARAMETER: %c$ is a string, RESERVED",
+ /* P1GTZ */ " PARAMETER: %c$ is a string, RESERVED",
+ /* P1GEZ */ " PARAMETER: %c$ is a string, RESERVED",
+ /* P1NEZ */ " PARAMETER: %c$ is a string, RESERVED",
+};
+
+void
+DumpAllFuctionTableDefinitions (FILE * file)
+{
+ /* generate bwd_fun.c */
+ int n;
+
+ assert (file != NULL);
+
+
+ fprintf (file, "/* FUNCTION TABLE */\n");
+ fprintf (file, "\n");
+ fprintf (file, "#include \"bwbasic.h\"\n");
+ fprintf (file, "\n");
+ fprintf (file,
+ "IntrinsicFunctionType IntrinsicFunctionTable[ /* NUM_FUNCTIONS */ ] =\n");
+ fprintf (file, "{\n");
+ for (n = 0; n < NUM_FUNCTIONS; n++)
+ {
+ int i;
+ int j;
+ char tbuf[MAINTAINER_BUFFER_LENGTH + 1]; /* DumpAllFuctionTableDefinitions */
+ char UniqueID[MAINTAINER_BUFFER_LENGTH + 1]; /* DumpAllFuctionTableDefinitions */
+ char Syntax[MAINTAINER_BUFFER_LENGTH + 1]; /* DumpAllFuctionTableDefinitions */
+ IntrinsicFunctionType *f;
+
+ f = &(IntrinsicFunctionTable[n]);
+
+ IntrinsicFunctionUniqueID (f, UniqueID);
+ IntrinsicFunctionSyntax (f, Syntax);
+ fprintf (file, "{\n");
+ fprintf (file, " %s, /* UniqueID */\n", UniqueID);
+ fprintf (file, " \"%s\", /* Syntax */\n", Syntax);
+ fprintf (file, " ");
+ fprintf (file, "\"");
+ ProcessEscapeChars (f->Description, tbuf);
+ fprintf (file, "%s", tbuf);
+ fprintf (file, "\"");
+ fprintf (file, ", /* Description */\n");
+ fprintf (file, " \"%s\", /* Name */\n", f->Name);
+ switch (f->ReturnTypeCode)
+ {
+ case ByteTypeCode:
+ fprintf (file, " %s, /* ReturnTypeCode */\n", "ByteTypeCode");
+ break;
+ case IntegerTypeCode:
+ fprintf (file, " %s, /* ReturnTypeCode */\n", "IntegerTypeCode");
+ break;
+ case LongTypeCode:
+ fprintf (file, " %s, /* ReturnTypeCode */\n", "LongTypeCode");
+ break;
+ case CurrencyTypeCode:
+ fprintf (file, " %s, /* ReturnTypeCode */\n", "CurrencyTypeCode");
+ break;
+ case SingleTypeCode:
+ fprintf (file, " %s, /* ReturnTypeCode */\n", "SingleTypeCode");
+ break;
+ case DoubleTypeCode:
+ fprintf (file, " %s, /* ReturnTypeCode */\n", "DoubleTypeCode");
+ break;
+ case StringTypeCode:
+ fprintf (file, " %s, /* ReturnTypeCode */\n", "StringTypeCode");
+ break;
+ default:
+ fprintf (file, " %s, /* ReturnTypeCode */\n", "INTERNAL ERROR");
+ break;
+ }
+ fprintf (file, " %d, /* ParameterCount */\n", f->ParameterCount);
+ if (f->ParameterCount == 0 || f->ParameterCount == 0xFF)
+ {
+ /* function has NO explicit parameters */
+ fprintf (file, " %s, /* ParameterTypes */\n", "PNONE");
+ fprintf (file, " %s, /* ParameterTests */\n", "PNONE");
+ }
+ else
+ {
+ /* function has explicit parameters */
+ bwb_strcpy (tbuf, " ");
+ for (i = 0; i < f->ParameterCount; i++)
+ {
+ ParamBitsType ParameterTypes;
+ ParameterTypes = f->ParameterTypes >> i;
+ ParameterTypes &= 0x1;
+ if (i > 0)
+ {
+ bwb_strcat (tbuf, " | ");
+ }
+ if (ParameterTypes)
+ {
+ sprintf (bwb_strchr (tbuf, NulChar), "P%dSTR", i + 1);
+ }
+ else
+ {
+ sprintf (bwb_strchr (tbuf, NulChar), "P%dNUM", i + 1);
+ }
+ }
+ bwb_strcat (tbuf, ", /* ParameterTypes */\n");
+ fprintf (file, "%s", tbuf);
+
+
+ bwb_strcpy (tbuf, " ");
+ for (i = 0; i < f->ParameterCount; i++)
+ {
+ ParamTestType ParameterTests;
+ ParameterTests = f->ParameterTests >> (i * 4);
+ ParameterTests &= 0xF;
+
+ if (i > 0)
+ {
+ bwb_strcat (tbuf, " | ");
+ }
+ sprintf (bwb_strchr (tbuf, 0), ParameterRangeID[ParameterTests],
+ i + 1);
+ /* Conversion may lose significant digits */
+ }
+ bwb_strcat (tbuf, ", /* ParameterTests */\n");
+ fprintf (file, "%s", tbuf);
+ }
+ bwb_strcpy (tbuf, " ");
+ j = 0;
+ for (i = 0; i < NUM_VERSIONS; i++)
+ {
+ if (f->OptionVersionBitmask & bwb_vertable[i].OptionVersionValue)
+ {
+ if (j > 0)
+ {
+ bwb_strcat (tbuf, " | ");
+ }
+ bwb_strcat (tbuf, bwb_vertable[i].ID);
+ j++;
+ }
+ }
+ bwb_strcat (tbuf, " /* OptionVersionBitmask */\n");
+ fprintf (file, "%s", tbuf);
+ fprintf (file, "},\n");
+ }
+ fprintf (file, "};\n");
+ fprintf (file, "\n");
+ fprintf (file,
+ "const size_t NUM_FUNCTIONS = sizeof( IntrinsicFunctionTable ) / sizeof( IntrinsicFunctionType );\n");
+ fprintf (file, "\n");
+ fflush (file);
+}
+
+void
+DumpOneFunctionSyntax (FILE * file, int IsXref, int n)
+{
+ IntrinsicFunctionType *f;
+ assert (file != NULL);
+
+
+
+ if (n < 0 || n >= NUM_FUNCTIONS)
+ {
+ return;
+ }
+ f = &(IntrinsicFunctionTable[n]);
+ /* NAME */
+ {
+ char UniqueID[MAINTAINER_BUFFER_LENGTH + 1]; /* DumpOneFunctionSyntax */
+ char Syntax[MAINTAINER_BUFFER_LENGTH + 1]; /* DumpOneFunctionSyntax */
+
+ IntrinsicFunctionUniqueID (f, UniqueID);
+ IntrinsicFunctionSyntax (f, Syntax);
+ fprintf (file, " SYNTAX: %s\n", Syntax);
+ }
+ /* PARAMETERS */
+ if (f->ParameterCount == PNONE || f->ParameterCount == 0xFF)
+ {
+ /* function has NO explicit parameters */
+ }
+ else
+ {
+ /* function HAS explicit parameters */
+ int i;
+ ParamBitsType ParameterTypes;
+ ParamTestType ParameterTests;
+ char NumVar;
+ char StrVar;
+ ParameterTypes = f->ParameterTypes;
+ ParameterTests = f->ParameterTests;
+ NumVar = 'X';
+ StrVar = 'A';
+ for (i = 0; i < f->ParameterCount; i++)
+ {
+ /* sanity check this parameter */
+ unsigned long thischeck;
+ char tbuf[MAINTAINER_BUFFER_LENGTH + 1]; /* DumpOneFunctionSyntax */
+
+ thischeck = ParameterTests & 0x0000000F;
+ /* verify parameter check */
+ if (ParameterTypes & 1)
+ {
+ /* STRING */
+ sprintf (tbuf, StringVariableRange[thischeck], StrVar);
+ /* Conversion may lose significant digits */
+ StrVar++;
+ }
+ else
+ {
+ /* NUMBER */
+ sprintf (tbuf, NumberVariableRange[thischeck], NumVar);
+ /* Conversion may lose significant digits */
+ NumVar++;
+ }
+ fprintf (file, "%s", tbuf);
+ fprintf (file, "\n");
+ ParameterTypes = ParameterTypes >> 1;
+ ParameterTests = ParameterTests >> 4;
+ }
+ }
+ /* DESCRIPTION */
+ {
+ FixDescription (file, "DESCRIPTION: ", f->Description);
+ }
+ /* COMPATIBILITY */
+ if (IsXref)
+ {
+ int i;
+ fprintf (file, " VERSIONS:\n");
+ for (i = 0; i < NUM_VERSIONS; i++)
+ {
+ char X;
+ if (f->OptionVersionBitmask & bwb_vertable[i].OptionVersionValue)
+ {
+ /* SUPPORTED */
+ X = 'X';
+ }
+ else
+ {
+ /* NOT SUPPORTED */
+ X = '_';
+ }
+ fprintf (file, " [%c] %s\n", X, bwb_vertable[i].Name);
+ }
+ }
+
+ fflush (file);
+}
+
+void
+DumpAllFunctionSyntax (FILE * file, int IsXref,
+ OptionVersionType OptionVersionValue)
+{
+ /* for the C maintainer */
+ int i;
+
+ assert (file != NULL);
+
+
+ fprintf (file,
+ "============================================================\n");
+ fprintf (file,
+ " FUNCTIONS \n");
+ fprintf (file,
+ "============================================================\n");
+ fprintf (file, "\n");
+ fprintf (file, "\n");
+ for (i = 0; i < NUM_FUNCTIONS; i++)
+ {
+ if (IntrinsicFunctionTable[i].OptionVersionBitmask & OptionVersionValue)
+ {
+ fprintf (file,
+ "------------------------------------------------------------\n");
+ DumpOneFunctionSyntax (file, IsXref, i);
+ }
+ }
+ fprintf (file,
+ "------------------------------------------------------------\n");
+ fprintf (file, "\n");
+ fprintf (file, "\n");
+ fflush (file);
+}
+
+void
+DumpAllFunctionHtmlTable (FILE * file)
+{
+ /* generate bwd_cmd.htm */
+ int i;
+ int j;
+
+ assert (file != NULL);
+
+
+ /* LEGEND */
+ fprintf (file, "FNCS\n");
+ fprintf (file, "LEGEND
\n");
+ fprintf (file, "\n");
+
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "ID");
+ fprintf (file, "");
+ fprintf (file, " | ");
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "NAME");
+ fprintf (file, "");
+ fprintf (file, " | ");
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "DESCRIPTION");
+ fprintf (file, "");
+ fprintf (file, " | ");
+ fprintf (file, "
\n");
+
+ for (j = 0; j < NUM_VERSIONS; j++)
+ {
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "%s", bwb_vertable[j].ID);
+ fprintf (file, " | ");
+ fprintf (file, "");
+ fprintf (file, "%s", bwb_vertable[j].Name);
+ fprintf (file, " | ");
+ fprintf (file, "");
+ fprintf (file, "%s", bwb_vertable[j].Description);
+ fprintf (file, " | ");
+ fprintf (file, "
\n");
+ }
+ fprintf (file, "
\n");
+ fprintf (file, "
\n");
+
+
+ /* DETAILS */
+ fprintf (file, "DETAILS
\n");
+ fprintf (file, "\n");
+
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "FUNCTION");
+ fprintf (file, "");
+ fprintf (file, " | ");
+ for (j = 0; j < NUM_VERSIONS; j++)
+ {
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "%s", bwb_vertable[j].ID);
+ fprintf (file, "");
+ fprintf (file, " | ");
+ }
+ fprintf (file, "
\n");
+
+
+ /* run through the command table and print comand -vs- OPTION VERSION */
+
+ for (i = 0; i < NUM_FUNCTIONS; i++)
+ {
+ fprintf (file, "");
+ fprintf (file, "");
+ fprintf (file, "%s", (char *) IntrinsicFunctionTable[i].Syntax);
+ fprintf (file, " | ");
+
+ for (j = 0; j < NUM_VERSIONS; j++)
+ {
+ fprintf (file, "");
+ if (IntrinsicFunctionTable[i].OptionVersionBitmask & bwb_vertable[j].
+ OptionVersionValue)
+ {
+ fprintf (file, "X");
+ }
+ else
+ {
+ fprintf (file, " ");
+ }
+ fprintf (file, " | ");
+ }
+ fprintf (file, "
\n");
+ }
+ fprintf (file, "
\n");
+ fprintf (file, "\n");
+ fprintf (file, "\n");
+
+ fflush (file);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ FNCS
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_FNCS (LineType * l)
+{
+ int n;
+ int t;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+
+ My->CurrentFile = My->SYSOUT;
+ fprintf (My->SYSOUT->cfp, "BWBASIC FUNCTIONS AVAILABLE:\n");
+
+ /* run through the command table and print comand names */
+
+ t = 0;
+ for (n = 0; n < NUM_FUNCTIONS; n++)
+ {
+ fprintf (My->SYSOUT->cfp, "%s", IntrinsicFunctionTable[n].Name);
+ if (t < 4)
+ {
+ fprintf (My->SYSOUT->cfp, "\t");
+ t++;
+ }
+ else
+ {
+ fprintf (My->SYSOUT->cfp, "\n");
+ t = 0;
+ }
+ }
+ if (t > 0)
+ {
+ fprintf (My->SYSOUT->cfp, "\n");
+ }
+ ResetConsoleColumn ();
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ MAINTAINER
+--------------------------------------------------------------------------------------------
+*/
+LineType *
+bwb_MAINTAINER (LineType * l)
+{
+
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_CMDS (LineType * l)
+{
+
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_CMDS_HTML (LineType * l)
+{
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ DumpAllCommandHtmlTable (My->SYSPRN->cfp);
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_CMDS_ID (LineType * l)
+{
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ DumpAllCommandUniqueID (My->SYSPRN->cfp);
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_CMDS_MANUAL (LineType * l)
+{
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ DumpAllCommandSyntax (My->SYSPRN->cfp, TRUE, (OptionVersionType)(-1));
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_CMDS_SWITCH (LineType * l)
+{
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ DumpAllCommandSwitchStatement (My->SYSPRN->cfp);
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_CMDS_TABLE (LineType * l)
+{
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ DumpAllCommandTableDefinitions (My->SYSPRN->cfp);
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_DEBUG (LineType * l)
+{
+
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_DEBUG_ON (LineType * l)
+{
+
+ assert (l != NULL);
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_DEBUG_OFF (LineType * l)
+{
+
+ assert (l != NULL);
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_FNCS (LineType * l)
+{
+
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_FNCS_HTML (LineType * l)
+{
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ DumpAllFunctionHtmlTable (My->SYSPRN->cfp);
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_FNCS_ID (LineType * l)
+{
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ DumpAllFunctionUniqueID (My->SYSPRN->cfp);
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_FNCS_MANUAL (LineType * l)
+{
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ DumpAllFunctionSyntax (My->SYSPRN->cfp, TRUE, (OptionVersionType)(-1));
+ DumpAllOperatorSyntax (My->SYSPRN->cfp, TRUE, (OptionVersionType)(-1));
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_FNCS_SWITCH (LineType * l)
+{
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ DumpAllFunctionSwitch (My->SYSPRN->cfp);
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_FNCS_TABLE (LineType * l)
+{
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ DumpAllFuctionTableDefinitions (My->SYSPRN->cfp);
+ return (l);
+}
+
+void
+DumpHeader (FILE * file)
+{
+ char c;
+
+ assert (file != NULL);
+ assert(My != NULL);
+ assert(My->CurrentVersion != NULL);
+
+ fprintf (file,
+ "============================================================\n");
+ fprintf (file,
+ " GENERAL \n");
+ fprintf (file,
+ "============================================================\n");
+ fprintf (file, "\n");
+ fprintf (file, "\n");
+
+ fprintf (file, "OPTION VERSION \"%s\"\n", My->CurrentVersion->Name);
+ fprintf (file, "REM INTERNAL ID: %s\n", My->CurrentVersion->ID);
+ fprintf (file, "REM DESCRIPTION: %s\n", My->CurrentVersion->Description);
+ fprintf (file, "REM REFERENCE: %s\n", My->CurrentVersion->ReferenceTitle);
+ fprintf (file, "REM %s\n",
+ My->CurrentVersion->ReferenceAuthor);
+ fprintf (file, "REM %s\n",
+ My->CurrentVersion->ReferenceCopyright);
+ fprintf (file, "REM %s\n", My->CurrentVersion->ReferenceURL1);
+ fprintf (file, "REM %s\n", My->CurrentVersion->ReferenceURL2);
+ fprintf (file, "REM\n");
+
+ if (My->CurrentVersion->OptionFlags & (OPTION_STRICT_ON))
+ {
+ fprintf (file, "OPTION STRICT ON\n");
+ }
+ else
+ {
+ fprintf (file, "OPTION STRICT OFF\n");
+ }
+
+ if (My->CurrentVersion->OptionFlags & (OPTION_ANGLE_DEGREES))
+ {
+ fprintf (file, "OPTION ANGLE DEGREES\n");
+ }
+ else if (My->CurrentVersion->OptionFlags & (OPTION_ANGLE_GRADIANS))
+ {
+ fprintf (file, "OPTION ANGLE GRADIANS\n");
+ }
+ else
+ {
+ fprintf (file, "OPTION ANGLE RADIANS\n");
+ }
+
+ if (My->CurrentVersion->OptionFlags & (OPTION_BUGS_ON))
+ {
+ fprintf (file, "OPTION BUGS ON\n");
+ }
+ else
+ {
+ fprintf (file, "OPTION BUGS OFF\n");
+ }
+
+ if (My->CurrentVersion->OptionFlags & (OPTION_LABELS_ON))
+ {
+ fprintf (file, "OPTION LABELS ON\n");
+ }
+ else
+ {
+ fprintf (file, "OPTION LABELS OFF\n");
+ }
+
+ if (My->CurrentVersion->OptionFlags & (OPTION_COMPARE_TEXT))
+ {
+ fprintf (file, "OPTION COMPARE TEXT\n");
+ }
+ else
+ {
+ fprintf (file, "OPTION COMPARE BINARY\n");
+ }
+
+ if (My->CurrentVersion->OptionFlags & (OPTION_COVERAGE_ON))
+ {
+ fprintf (file, "OPTION COVERAGE ON\n");
+ }
+ else
+ {
+ fprintf (file, "OPTION COVERAGE OFF\n");
+ }
+
+ if (My->CurrentVersion->OptionFlags & (OPTION_TRACE_ON))
+ {
+ fprintf (file, "OPTION TRACE ON\n");
+ }
+ else
+ {
+ fprintf (file, "OPTION TRACE OFF\n");
+ }
+
+ if (My->CurrentVersion->OptionFlags & (OPTION_ERROR_GOSUB))
+ {
+ fprintf (file, "OPTION ERROR GOSUB\n");
+ }
+ else
+ {
+ fprintf (file, "OPTION ERROR GOTO\n");
+ }
+
+ if (My->CurrentVersion->OptionFlags & (OPTION_EXPLICIT_ON))
+ {
+ fprintf (file, "OPTION EXPLICIT\n");
+ }
+ else
+ {
+ fprintf (file, "OPTION IMPLICIT\n");
+ }
+
+ fprintf (file, "OPTION BASE %d\n",
+ My->CurrentVersion->OptionBaseInteger);
+ fprintf (file, "OPTION RECLEN %d\n",
+ My->CurrentVersion->OptionReclenInteger);
+ fprintf (file, "OPTION DATE \"%s\"\n",
+ My->CurrentVersion->OptionDateFormat);
+ fprintf (file, "OPTION TIME \"%s\"\n",
+ My->CurrentVersion->OptionTimeFormat);
+
+ c = My->CurrentVersion->OptionStringChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT STRING \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionDoubleChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT DOUBLE \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionSingleChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT SINGLE \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionCurrencyChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT CURRENCY \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionLongChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT LONG \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionIntegerChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT INTEGER \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionByteChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT BYTE \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionQuoteChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT QUOTE \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionCommentChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT COMMENT \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionStatementChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT STATEMENT \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionPrintChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT PRINT \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionInputChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT INPUT \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionImageChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT IMAGE \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionLparenChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT LPAREN \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionRparenChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT RPAREN \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionFilenumChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT FILENUM \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionAtChar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION PUNCT AT \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingDigit;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING DIGIT \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingComma;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING COMMA \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingPeriod;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING PERIOD \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingPlus;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING PLUS \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingMinus;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING MINUS \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingExrad;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING EXRAD \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingDollar;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING DOLLAR \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingFiller;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING FILLER \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingLiteral;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING LITERAL \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingFirst;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING FIRST \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingAll;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING ALL \"%c\"\n", c);
+
+ c = My->CurrentVersion->OptionUsingLength;
+ if (!bwb_isgraph (c))
+ {
+ c = ' ';
+ };
+ fprintf (file, "OPTION USING LENGTH \"%c\"\n", c);
+
+ fprintf (file, "\n");
+ fprintf (file, "\n");
+ fflush (file);
+}
+
+LineType *
+bwb_MAINTAINER_MANUAL (LineType * l)
+{
+
+ assert (l != NULL);
+
+ DumpHeader (My->SYSPRN->cfp);
+ DumpAllCommandSyntax (My->SYSPRN->cfp, FALSE,
+ My->CurrentVersion->OptionVersionValue);
+ DumpAllFunctionSyntax (My->SYSPRN->cfp, FALSE,
+ My->CurrentVersion->OptionVersionValue);
+ DumpAllOperatorSyntax (My->SYSPRN->cfp, FALSE,
+ My->CurrentVersion->OptionVersionValue);
+ return (l);
+}
+
+LineType *
+bwb_MAINTAINER_STACK (LineType * l)
+{
+ /*
+ dump the current execution stack,
+ Leftmost is the top,
+ Rigthmost is the bottom.
+ */
+ StackType *StackItem;
+
+ assert (l != NULL);
+
+ for (StackItem = My->StackHead; StackItem != NULL;
+ StackItem = StackItem->next)
+ {
+ LineType *l;
+
+ l = StackItem->line;
+ if (l != NULL)
+ {
+ fprintf (My->SYSOUT->cfp, "%d:", l->number);
+ }
+ }
+ fprintf (My->SYSOUT->cfp, "\n");
+ ResetConsoleColumn ();
+ return (l);
+}
+
+
+/***************************************************************
+
+ FUNCTION: IntrinsicFunction_init()
+
+ DESCRIPTION: This command initializes the function
+ linked list, placing all predefined functions
+ in the list.
+
+***************************************************************/
+
+int
+IntrinsicFunction_init (void)
+{
+ int n;
+
+
+ for (n = 0; n < NUM_FUNCTIONS; n++)
+ {
+ IntrinsicFunctionDefinitionCheck (&(IntrinsicFunctionTable[n]));
+ }
+ return TRUE;
+}
+
+
+
+VariableType *
+IntrinsicFunction_deffn (int argc, VariableType * argv, UserFunctionType * f)
+{
+ /*
+ The generic handler for user defined functions.
+ When called by exp_function(), f->id will be set to the line number of a specific DEF USR.
+ */
+ VariableType *v;
+ VariableType *argn;
+ int i;
+ LineType *call_line;
+ StackType *save_elevel;
+
+ assert (argc >= 0);
+ assert (argv != NULL);
+ assert (f != NULL);
+ assert(My != NULL);
+
+ /* initialize the variable if necessary */
+
+ /* these errors should not occur */
+ if (f == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (f->line == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (argv == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (f->ParameterCount == 0xFF)
+ {
+ /* VARIANT */
+ }
+ else if (argc != f->ParameterCount)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (f->ParameterCount == 0xFF)
+ {
+ /* VARIANT */
+ f->local_variable = argv;
+ }
+ else if (argc > 0)
+ {
+ v = f->local_variable;
+ argn = argv;
+ for (i = 0; i < argc; i++)
+ {
+ argn = argn->next;
+ if (v == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (argn == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (VAR_IS_STRING (v) != VAR_IS_STRING (argn))
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (is_empty_string (v->name) == FALSE)
+ {
+ int IsError;
+ IsError = 0;
+ switch (v->VariableTypeCode)
+ {
+ case ByteTypeCode:
+ IsError = NumberValueCheck (P1BYT, PARAM_NUMBER);
+ break;
+ case IntegerTypeCode:
+ IsError = NumberValueCheck (P1INT, PARAM_NUMBER);
+ break;
+ case LongTypeCode:
+ IsError = NumberValueCheck (P1LNG, PARAM_NUMBER);
+ break;
+ case CurrencyTypeCode:
+ IsError = NumberValueCheck (P1CUR, PARAM_NUMBER);
+ break;
+ case SingleTypeCode:
+ IsError = NumberValueCheck (P1FLT, PARAM_NUMBER);
+ break;
+ case DoubleTypeCode:
+ IsError = NumberValueCheck (P1DBL, PARAM_NUMBER);
+ break;
+ case StringTypeCode:
+ IsError = StringLengthCheck (P1ANY, PARAM_LENGTH);
+ break;
+ default:
+ WARN_TYPE_MISMATCH;
+ return NULL;
+ }
+ if (IsError != 0)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return argv;
+ }
+ }
+ v = v->next;
+ }
+ }
+ /* OK */
+ call_line = f->line; /* line to call for function */
+ call_line->position = f->startpos;
+
+ if (call_line->cmdnum == C_DEF)
+ {
+ if (line_skip_EqualChar (call_line) == FALSE)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ }
+/* PUSH STACK */
+
+ save_elevel = My->StackHead;
+ if (bwb_incexec ())
+ {
+ /* OK */
+ My->StackHead->line = call_line;
+ My->StackHead->ExecCode = EXEC_FUNCTION;
+ }
+ else
+ {
+ /* ERROR */
+ WARN_OUT_OF_MEMORY;
+ return NULL;
+ }
+
+
+ /* create variable chain */
+ if (f->ParameterCount == 0xFF)
+ {
+ /* VARIANT */
+ }
+ else if (argc > 0)
+ {
+ VariableType *source = NULL; /* source variable */
+ source = f->local_variable;
+ argn = argv;
+ for (i = 0; i < argc; i++)
+ {
+ argn = argn->next;
+ /* copy the name */
+ bwb_strcpy (argn->name, source->name);
+
+ if (VAR_IS_STRING (source))
+ {
+ }
+ else
+ {
+ int IsError;
+ double Value;
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ if (var_get (argn, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return NULL;
+ }
+ if (variant.VariantTypeCode == StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ return NULL;
+ }
+ Value = variant.Number;
+ IsError = 0;
+ switch (source->VariableTypeCode)
+ {
+ case ByteTypeCode:
+ IsError = NumberValueCheck (P1BYT, Value);
+ Value = bwb_rint (Value);
+ break;
+ case IntegerTypeCode:
+ IsError = NumberValueCheck (P1INT, Value);
+ Value = bwb_rint (Value);
+ break;
+ case LongTypeCode:
+ IsError = NumberValueCheck (P1LNG, Value);
+ Value = bwb_rint (Value);
+ break;
+ case CurrencyTypeCode:
+ IsError = NumberValueCheck (P1CUR, Value);
+ Value = bwb_rint (Value);
+ break;
+ case SingleTypeCode:
+ IsError = NumberValueCheck (P1FLT, Value);
+ break;
+ case DoubleTypeCode:
+ IsError = NumberValueCheck (P1DBL, Value);
+ break;
+ case StringTypeCode:
+ WARN_TYPE_MISMATCH;
+ return NULL;
+ /* break; */
+ default:
+ WARN_TYPE_MISMATCH;
+ return NULL;
+ }
+ if (IsError != 0)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return argv;
+ }
+ variant.Number = Value;
+ if (var_set (argn, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return NULL;
+ }
+ }
+ source = source->next;
+ }
+ }
+ if (call_line->cmdnum == C_DEF)
+ {
+ VariantType x;
+ VariantType *X;
+
+ X = &x;
+ CLEAR_VARIANT (X);
+ /* the function return variable is hidden */
+ My->StackHead->local_variable = argv->next;
+ /* var_islocal() uses the LoopTopLine to find local variables */
+ My->StackHead->LoopTopLine = call_line; /* FUNCTION, SUB */
+
+ /* evaluate the expression */
+ if (line_read_expression (call_line, X) == FALSE) /* IntrinsicFunction_deffn */
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+
+ /* save the value */
+ switch (X->VariantTypeCode)
+ {
+ case ByteTypeCode:
+ case IntegerTypeCode:
+ case LongTypeCode:
+ case CurrencyTypeCode:
+ case SingleTypeCode:
+ case DoubleTypeCode:
+ if (argv->VariableTypeCode == StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ goto EXIT;
+ }
+ /* OK */
+ {
+ int IsError;
+ double Value;
+
+ IsError = 0;
+ Value = X->Number;
+ /* VerifyNumeric */
+ if (isnan (Value))
+ {
+ /*** FATAL - INTERNAL ERROR - SHOULD NEVER HAPPEN ***/
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ if (isinf (Value))
+ {
+ /* - Evaluation of an expression results in an overflow
+ * (nonfatal, the recommended recovery procedure is to supply
+ * machine in- finity with the algebraically correct sign and
+ * continue). */
+ if (Value < 0)
+ {
+ Value = MINDBL;
+ }
+ else
+ {
+ Value = MAXDBL;
+ }
+ if (WARN_OVERFLOW)
+ {
+ /* ERROR */
+ goto EXIT;
+ }
+ /* CONTINUE */
+ }
+ /* OK */
+ switch (argv->VariableTypeCode)
+ {
+ case ByteTypeCode:
+ IsError = NumberValueCheck (P1BYT, Value);
+ Value = bwb_rint (Value);
+ break;
+ case IntegerTypeCode:
+ IsError = NumberValueCheck (P1INT, Value);
+ Value = bwb_rint (Value);
+ break;
+ case LongTypeCode:
+ IsError = NumberValueCheck (P1LNG, Value);
+ Value = bwb_rint (Value);
+ break;
+ case CurrencyTypeCode:
+ IsError = NumberValueCheck (P1CUR, Value);
+ Value = bwb_rint (Value);
+ break;
+ case SingleTypeCode:
+ IsError = NumberValueCheck (P1FLT, Value);
+ break;
+ case DoubleTypeCode:
+ IsError = NumberValueCheck (P1DBL, Value);
+ break;
+ default:
+ WARN_TYPE_MISMATCH;
+ goto EXIT;
+ /* break; */
+ }
+ if (IsError != 0)
+ {
+ if (WARN_OVERFLOW)
+ {
+ /* ERROR */
+ goto EXIT;
+ }
+ /* CONTINUE */
+ }
+ /* assign Value */
+ RESULT_NUMBER = Value;
+ }
+ break;
+ case StringTypeCode:
+ if (argv->VariableTypeCode != StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ goto EXIT;
+ }
+ /* OK */
+ if (RESULT_BUFFER != My->MaxLenBuffer)
+ {
+ WARN_INTERNAL_ERROR;
+ goto EXIT;
+ }
+ if (X->Length > MAXLEN)
+ {
+ WARN_STRING_TOO_LONG; /* IntrinsicFunction_deffn */
+ X->Length = MAXLEN;
+ }
+ bwb_memcpy (RESULT_BUFFER, X->Buffer, X->Length);
+ RESULT_LENGTH = X->Length;
+ break;
+ default:
+ WARN_TYPE_MISMATCH;
+ goto EXIT;
+ /* break; */
+ }
+ EXIT:
+ RELEASE_VARIANT (X);
+
+
+ /* break variable chain */
+ My->StackHead->local_variable = NULL;
+
+
+
+/* POP STACK */
+ bwb_decexec ();
+
+ }
+ else
+ {
+ /* the function return variable is visible */
+ My->StackHead->local_variable = argv;
+ /* var_islocal() uses the LoopTopLine to find local variables */
+ My->StackHead->LoopTopLine = call_line; /* FUNCTION, SUB */
+ /* execute until function returns */
+ while (My->StackHead != save_elevel)
+ {
+ bwb_execline ();
+ }
+ }
+
+ if (f->ParameterCount == 0xFF)
+ {
+ /* VARIANT */
+ f->local_variable = NULL;
+ }
+
+ if (is_empty_string (argv->name) == FALSE)
+ {
+ int IsError;
+
+ IsError = 0;
+ switch (argv->VariableTypeCode)
+ {
+ case ByteTypeCode:
+ IsError = NumberValueCheck (P1BYT, RESULT_NUMBER);
+ break;
+ case IntegerTypeCode:
+ IsError = NumberValueCheck (P1INT, RESULT_NUMBER);
+ break;
+ case LongTypeCode:
+ IsError = NumberValueCheck (P1LNG, RESULT_NUMBER);
+ break;
+ case CurrencyTypeCode:
+ IsError = NumberValueCheck (P1CUR, RESULT_NUMBER);
+ break;
+ case SingleTypeCode:
+ IsError = NumberValueCheck (P1FLT, RESULT_NUMBER);
+ break;
+ case DoubleTypeCode:
+ IsError = NumberValueCheck (P1DBL, RESULT_NUMBER);
+ break;
+ case StringTypeCode:
+ IsError = StringLengthCheck (P1ANY, RESULT_LENGTH);
+ break;
+ default:
+ /* no check */
+ break;
+ }
+ if (IsError != 0)
+ {
+ if (WARN_OVERFLOW)
+ {
+ /* ERROR */
+ }
+ /* CONTINUE */
+ }
+ }
+ return argv;
+}
+
+/***************************************************************
+
+ FUNCTION: IntrinsicFunction_find()
+
+ DESCRIPTION: This C function attempts to locate
+ a BASIC function with the specified name.
+ If successful, it returns a pointer to
+ the C structure for the BASIC function,
+ if not successful, it returns NULL.
+
+***************************************************************/
+
+extern int
+IntrinsicFunction_name (char *name)
+{
+ /* search INTRINSIC functions */
+ IntrinsicFunctionType *f;
+ int i;
+
+ assert (name != NULL);
+ assert(My != NULL);
+ assert(My->CurrentVersion != NULL);
+
+
+#if THE_PRICE_IS_RIGHT
+ /* start with the closest function, without going over */
+ i = VarTypeIndex (name[0]);
+ if (i < 0)
+ {
+ /* non-alpha */
+ return FALSE;
+ }
+ i = My->IntrinsicFunctionStart[i]; /* first function starting with this letter */
+ if (i < 0)
+ {
+ /* NOT FOUND */
+ return FALSE;
+ }
+#else /* THE_PRICE_IS_RIGHT */
+ i = 0;
+#endif /* THE_PRICE_IS_RIGHT */
+ for (; i < NUM_FUNCTIONS; i++)
+ {
+ f = &IntrinsicFunctionTable[i];
+ if (My->CurrentVersion->OptionVersionValue & f->OptionVersionBitmask)
+ {
+ int result;
+
+ result = bwb_stricmp (f->Name, name);
+
+ if (result == 0)
+ {
+ /* FOUND */
+ return TRUE;
+ }
+ if (result > 0 /* found > searched */ )
+ {
+ /* NOT FOUND */
+ return FALSE;
+ }
+ }
+ }
+ /* NOT FOUND */
+ return FALSE;
+}
+
+
+IntrinsicFunctionType *
+IntrinsicFunction_find_exact (char *name, int ParameterCount,
+ ParamBitsType ParameterTypes)
+{
+ IntrinsicFunctionType *f;
+ int i;
+
+ assert (name != NULL);
+ assert(My != NULL);
+ assert(My->CurrentVersion != NULL);
+
+ /* search INTRINSIC functions */
+#if THE_PRICE_IS_RIGHT
+ /* start with the closest function, without going over */
+ i = VarTypeIndex (name[0]);
+ if (i < 0)
+ {
+ /* non-alpha */
+ return NULL;
+ }
+ i = My->IntrinsicFunctionStart[i]; /* first function starting with this letter */
+ if (i < 0)
+ {
+ /* NOT FOUND */
+ return NULL;
+ }
+#else /* THE_PRICE_IS_RIGHT */
+ i = 0;
+#endif /* THE_PRICE_IS_RIGHT */
+ for (; i < NUM_FUNCTIONS; i++)
+ {
+ f = &IntrinsicFunctionTable[i];
+ if (My->CurrentVersion->OptionVersionValue & f->OptionVersionBitmask)
+ {
+ if (f->ParameterCount == ParameterCount)
+ {
+ if (f->ParameterTypes == ParameterTypes)
+ {
+ int result;
+
+ result = bwb_stricmp (f->Name, name);
+
+ if (result == 0)
+ {
+ /* FOUND */
+ return f;
+ }
+ if (result > 0 /* found > searched */ )
+ {
+ /* NOT FOUND */
+ return NULL;
+ }
+ }
+ }
+ }
+ }
+ /* NOT FOUND */
+ return NULL;
+}
+
+static VariableType *
+find_variable_by_type (char *name, int dimensions, char VariableTypeCode)
+{
+ VariableType *v = NULL;
+
+ assert (name != NULL);
+
+ v = var_find (name, dimensions, FALSE);
+ if (v)
+ {
+ if (VAR_IS_STRING (v))
+ {
+ if (VariableTypeCode == StringTypeCode)
+ {
+ /* found */
+ return v;
+ }
+ }
+ else
+ {
+ if (VariableTypeCode != StringTypeCode)
+ {
+ /* found */
+ return v;
+ }
+ }
+ }
+ /* not found */
+ return NULL;
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ CHANGE
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_CHANGE (LineType * l)
+{
+ /* SYNTAX: CHANGE A$ TO X */
+ /* SYNTAX: CHANGE X TO A$ */
+ char varname[NameLengthMax + 1];
+ VariableType *v;
+ VariableType *A;
+ VariableType *X;
+ int IsStringToArray;
+
+ assert (l != NULL);
+
+ v = NULL;
+ A = NULL;
+ X = NULL;
+ IsStringToArray = FALSE;
+
+ /* get 1st variable */
+ if (line_read_varname (l, varname) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ v = find_variable_by_type (varname, 0, StringTypeCode);
+ if (v)
+ {
+ /* STRING to ARRAY */
+ A = v;
+ IsStringToArray = TRUE;
+ }
+ else
+ {
+ /* ARRAY to STRING */
+ v = find_variable_by_type (varname, 1, DoubleTypeCode);
+ if (v)
+ {
+ X = v;
+ IsStringToArray = FALSE;
+ }
+ }
+ if (v == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ /* get "TO" */
+ if (line_skip_word (l, "TO") == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* get 2nd variable */
+ if (line_read_varname (l, varname) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if (IsStringToArray)
+ {
+ /* STRING to ARRAY */
+ v = find_variable_by_type (varname, 1, DoubleTypeCode);
+ if (v == NULL)
+ {
+ v = var_find (varname, 1, TRUE);
+ }
+ if (v)
+ {
+ X = v;
+ }
+ }
+ else
+ {
+ /* ARRAY to STRING */
+ v = find_variable_by_type (varname, 0, StringTypeCode);
+ if (v == NULL)
+ {
+ v = var_find (varname, 0, TRUE);
+ }
+ if (v)
+ {
+ A = v;
+ }
+ }
+
+ if (v == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ assert(A != NULL);
+ assert(X != NULL);
+ if (IsStringToArray)
+ {
+ /* CHANGE A$ TO X */
+ int i;
+ int n;
+ char *a;
+ DoubleType *x;
+ unsigned long t;
+
+ if (A->Value.String == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return (l);
+ }
+ if (A->Value.String->sbuffer == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return (l);
+ }
+ /* variable storage is a mess, we bypass that tradition here. */
+ t = 1;
+ for (n = 0; n < X->dimensions; n++)
+ {
+ t *= X->UBOUND[n] - X->LBOUND[n] + 1;
+ }
+ if (t <= A->Value.String->length)
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ n = A->Value.String->length;
+ a = A->Value.String->sbuffer;
+ x = X->Value.Number;
+ *x = n;
+ x++;
+ for (i = 0; i < n; i++)
+ {
+ char C;
+ DoubleType V;
+
+ C = *a;
+ V = C;
+ *x = V;
+ x++;
+ a++;
+ }
+ }
+ else
+ {
+ /* CHANGE X TO A$ */
+ int i;
+ int n;
+ char *a;
+ DoubleType *x;
+ unsigned long t;
+
+ /* variable storage is a mess, we bypass that tradition here. */
+ t = 1;
+ for (n = 0; n < X->dimensions; n++)
+ {
+ t *= X->UBOUND[n] - X->LBOUND[n] + 1;
+ }
+ if (t <= 1)
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ if (t > MAXLEN)
+ {
+ WARN_STRING_TOO_LONG; /* bwb_CHANGE */
+ t = MAXLEN;
+ }
+ if (A->Value.String == NULL)
+ {
+ if ((A->Value.String =
+ (StringType *) calloc (1, sizeof (StringType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (l);
+ }
+ A->Value.String->sbuffer = NULL;
+ A->Value.String->length = 0;
+ }
+ if (A->Value.String->sbuffer != NULL)
+ {
+ free (A->Value.String->sbuffer);
+ A->Value.String->sbuffer = NULL;
+ A->Value.String->length = 0;
+ }
+ if (A->Value.String->sbuffer == NULL)
+ {
+ A->Value.String->length = 0;
+ if ((A->Value.String->sbuffer =
+ (char *) calloc (t + 1 /* NulChar */ , sizeof (char))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (l);
+ }
+ }
+ a = A->Value.String->sbuffer;
+ x = X->Value.Number;
+ n = (int) bwb_rint (*x);
+ if (n > MAXLEN)
+ {
+ WARN_STRING_TOO_LONG; /* bwb_CHANGE */
+ n = MAXLEN;
+ }
+ A->Value.String->length = n;
+ x++;
+ for (i = 0; i < n; i++)
+ {
+ char C;
+ DoubleType V;
+
+ V = *x;
+ C = V;
+ *a = C;
+ x++;
+ a++;
+ }
+ }
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ CONSOLE
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_CONSOLE (LineType * l)
+{
+ /* SYNTAX: CONSOLE */
+ /* SYNTAX: CONSOLE WIDTH width */
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ assert(My->SYSOUT != NULL);
+ assert(My->SYSOUT->cfp != NULL);
+
+
+ if (My->IsPrinter == TRUE)
+ {
+ /* reset printer column */
+ if (My->SYSPRN->col != 1)
+ {
+ fputc ('\n', My->SYSPRN->cfp);
+ My->SYSPRN->col = 1;
+ }
+ My->IsPrinter = FALSE;
+ }
+ if (line_skip_word (l, "WIDTH"))
+ {
+ int width;
+
+ width = 0;
+ if (line_read_integer_expression (l, &width) == FALSE)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ if (width < 0)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ My->SYSOUT->width = width;
+ }
+
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ LPRINTER
+--------------------------------------------------------------------------------------------
+*/
+
+
+LineType *
+bwb_LPRINTER (LineType * l)
+{
+ /* SYNTAX: LPRINTER */
+ /* SYNTAX: LPRINTER WIDTH width */
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSPRN != NULL);
+ assert(My->SYSPRN->cfp != NULL);
+ assert(My->SYSOUT != NULL);
+ assert(My->SYSOUT->cfp != NULL);
+
+
+ if (My->IsPrinter == FALSE)
+ {
+ /* reset console column */
+ if (My->SYSOUT->col != 1)
+ {
+ fputc ('\n', My->SYSOUT->cfp);
+ My->SYSOUT->col = 1;
+ }
+ My->IsPrinter = TRUE;
+ }
+ if (line_skip_word (l, "WIDTH"))
+ {
+ int width;
+
+ width = 0;
+ if (line_read_integer_expression (l, &width) == FALSE)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ if (width < 0)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ My->SYSPRN->width = width;
+ }
+ return (l);
+}
+
+extern void
+bwb_fclose (FILE * file)
+{
+ if (file == NULL)
+ {
+ /* don't close */
+ }
+ else if (file == stdin)
+ {
+ /* don't close */
+ }
+ else if (file == stdout)
+ {
+ /* don't close */
+ }
+ else if (file == stderr)
+ {
+ /* don't close */
+ }
+ else
+ {
+ fclose (file);
+ }
+}
+LineType *
+bwb_LPT (LineType * l)
+{
+ /* SYNTAX: LPT */
+ /* SYNTAX: LPT filename$ */
+ FILE *file;
+ char *filename;
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSOUT != NULL);
+ assert(My->SYSOUT->cfp != NULL);
+
+
+ file = NULL;
+ filename = NULL;
+ if (line_is_eol (l))
+ {
+ /* OK */
+ file = stderr;
+ }
+ else if (line_read_string_expression (l, &filename))
+ {
+ /* OK */
+ if (is_empty_string (filename))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ file = fopen (filename, "w");
+ free (filename);
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (file == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ bwb_fclose (My->SYSOUT->cfp);
+ My->SYSOUT->cfp = file;
+ return (l);
+}
+
+LineType *
+bwb_PTP (LineType * l)
+{
+ /* SYNTAX: PTP */
+ /* SYNTAX: PTP filename$ */
+ FILE *file;
+ char *filename;
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSOUT != NULL);
+ assert(My->SYSOUT->cfp != NULL);
+
+ file = NULL;
+ filename = NULL;
+ if (line_is_eol (l))
+ {
+ /* OK */
+ file = fopen ("PTP", "w");
+ }
+ else if (line_read_string_expression (l, &filename))
+ {
+ /* OK */
+ if (is_empty_string (filename))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ file = fopen (filename, "w");
+ free (filename);
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (file == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ bwb_fclose (My->SYSOUT->cfp);
+ My->SYSOUT->cfp = file;
+ return (l);
+}
+
+LineType *
+bwb_PTR (LineType * l)
+{
+ /* SYNTAX: PTR */
+ /* SYNTAX: PTR filename$ */
+ FILE *file;
+ char *filename;
+
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSIN != NULL);
+ assert(My->SYSIN->cfp != NULL);
+
+ file = NULL;
+ filename = NULL;
+ if (line_is_eol (l))
+ {
+ /* OK */
+ file = fopen ("PTR", "r");
+ }
+ else if (line_read_string_expression (l, &filename))
+ {
+ /* OK */
+ if (is_empty_string (filename))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ file = fopen (filename, "r");
+ free (filename);
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (file == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ bwb_fclose (My->SYSIN->cfp);
+ My->SYSIN->cfp = file;
+ return (l);
+}
+
+LineType *
+bwb_TTY (LineType * l)
+{
+ /* SYNTAX: TTY */
+ assert (l != NULL);
+
+ bwb_TTY_IN (l);
+ bwb_TTY_OUT (l);
+ return (l);
+}
+
+LineType *
+bwb_TTY_IN (LineType * l)
+{
+ /* SYNTAX: TTY IN */
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSIN != NULL);
+ assert(My->SYSIN->cfp != NULL);
+
+ bwb_fclose (My->SYSIN->cfp);
+ My->SYSIN->cfp = stdin;
+ return (l);
+}
+
+LineType *
+bwb_TTY_OUT (LineType * l)
+{
+ /* SYNTAX: TTY OUT */
+ assert (l != NULL);
+ assert(My != NULL);
+ assert(My->SYSOUT != NULL);
+ assert(My->SYSOUT->cfp != NULL);
+
+ bwb_fclose (My->SYSOUT->cfp);
+ My->SYSOUT->cfp = stdout;
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ CREATE
+--------------------------------------------------------------------------------------------
+*/
+
+LineType *
+bwb_CREATE (LineType * l)
+{
+ /* SYNTAX: CREATE filename$ [ RECL reclen ] AS filenum [ BUFF number ] [ RECS size ] */
+ int FileNumber;
+ int width;
+ int buffnum;
+ int recsnum;
+ char *filename;
+
+ assert (l != NULL);
+ assert(My != NULL);
+
+
+ FileNumber = 0;
+ width = 0;
+ buffnum = 0;
+ recsnum = 0;
+ filename = NULL;
+ if (line_read_string_expression (l, &filename) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (is_empty_string (filename))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (line_skip_word (l, "RECL"))
+ {
+ if (line_read_integer_expression (l, &width) == FALSE)
+ {
+ WARN_FIELD_OVERFLOW;
+ return (l);
+ }
+ if (width <= 0)
+ {
+ WARN_FIELD_OVERFLOW;
+ return (l);
+ }
+ }
+ if (line_skip_word (l, "AS") == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_integer_expression (l, &FileNumber) == FALSE)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (FileNumber <= 0)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (line_skip_word (l, "BUFF"))
+ {
+ if (line_read_integer_expression (l, &buffnum) == FALSE)
+ {
+ WARN_FIELD_OVERFLOW;
+ return (l);
+ }
+ if (buffnum <= 0)
+ {
+ WARN_FIELD_OVERFLOW;
+ return (l);
+ }
+ }
+ if (line_skip_word (l, "RECS"))
+ {
+ if (line_read_integer_expression (l, &recsnum) == FALSE)
+ {
+ WARN_FIELD_OVERFLOW;
+ return (l);
+ }
+ if (recsnum <= 0)
+ {
+ WARN_FIELD_OVERFLOW;
+ return (l);
+ }
+ }
+ /* now, we are ready to create the file */
+ My->CurrentFile = find_file_by_number (FileNumber);
+ if (My->CurrentFile == NULL)
+ {
+ My->CurrentFile = file_new ();
+ My->CurrentFile->FileNumber = FileNumber;
+ }
+ if (My->CurrentFile->FileName != NULL)
+ {
+ free (My->CurrentFile->FileName);
+ My->CurrentFile->FileName = NULL;
+ }
+ My->CurrentFile->FileName = filename;
+ filename = NULL;
+ if (My->CurrentFile->DevMode != DEVMODE_CLOSED)
+ {
+ My->CurrentFile->DevMode = DEVMODE_CLOSED;
+ }
+ if (My->CurrentFile->cfp != NULL)
+ {
+ bwb_fclose (My->CurrentFile->cfp);
+ My->CurrentFile->cfp = NULL;
+ }
+ if (My->CurrentFile->buffer != NULL)
+ {
+ free (My->CurrentFile->buffer);
+ My->CurrentFile->buffer = NULL;
+ }
+ My->CurrentFile->width = 0;
+ My->CurrentFile->col = 1;
+ My->CurrentFile->row = 1;
+ My->CurrentFile->delimit = ',';
+ /* truncate to zero length or create text file for update (reading and writing) */
+ if (is_empty_string (My->CurrentFile->FileName))
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if ((My->CurrentFile->cfp =
+ fopen (My->CurrentFile->FileName, "w+")) == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return (l);
+ }
+ if (width > 0)
+ {
+ My->CurrentFile->width = width;
+ My->CurrentFile->DevMode = DEVMODE_RANDOM;
+ }
+ else
+ {
+ My->CurrentFile->DevMode = DEVMODE_INPUT | DEVMODE_OUTPUT;
+ }
+ return (l);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ COPY
+--------------------------------------------------------------------------------------------
+*/
+
+static void
+bwb_copy_file (char *Source, char *Target)
+{
+ FILE *source;
+ FILE *target;
+
+ source = NULL;
+ target = NULL;
+
+ if (is_empty_string (Source))
+ {
+ WARN_BAD_FILE_NAME;
+ goto EXIT;
+ }
+ if (is_empty_string (Target))
+ {
+ WARN_BAD_FILE_NAME;
+ goto EXIT;
+ }
+ source = fopen (Source, "rb");
+ if (source == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ goto EXIT;
+ }
+ target = fopen (Target, "wb");
+ if (target == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ goto EXIT;
+ }
+ /* OK */
+ while (TRUE)
+ {
+ int C;
+
+ C = fgetc (source);
+ if (C < 0 /* EOF */ || feof (source) || ferror (source))
+ {
+ break;
+ }
+ fputc (C, target);
+ if (ferror (target))
+ {
+ break;
+ }
+ }
+ /* DONE */
+EXIT:
+ if (source)
+ {
+ fclose (source);
+ }
+ if (target)
+ {
+ fclose (target);
+ }
+}
+
+LineType *
+bwb_COPY (LineType * Line)
+{
+ /* SYNTAX: COPY source$ TO target$ */
+ char *Source;
+ char *Target;
+
+ assert (Line != NULL);
+
+ Source = NULL;
+ Target = NULL;
+ if (line_read_string_expression (Line, &Source) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+ if (line_skip_word (Line, "TO") == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+ if (line_read_string_expression (Line, &Target) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+ bwb_copy_file (Source, Target);
+EXIT:
+ if (Source)
+ {
+ free (Source);
+ }
+ if (Target)
+ {
+ free (Target);
+ }
+ return (Line);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ DISPLAY
+--------------------------------------------------------------------------------------------
+*/
+
+static void
+bwb_display_file (char *Source)
+{
+ FILE *source;
+
+ assert (My->SYSOUT != NULL);
+ assert (My->SYSOUT->cfp != NULL);
+
+ source = NULL;
+
+ if (is_empty_string (Source))
+ {
+ WARN_BAD_FILE_NAME;
+ goto EXIT;
+ }
+ source = fopen (Source, "rb");
+ if (source == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ goto EXIT;
+ }
+ /* OK */
+ while (TRUE)
+ {
+ int C;
+
+ C = fgetc (source);
+ if (C < 0 /* EOF */ || feof (source) || ferror (source))
+ {
+ break;
+ }
+ fputc (C, My->SYSOUT->cfp);
+ }
+ /* DONE */
+EXIT:
+ if (source)
+ {
+ fclose (source);
+ }
+}
+
+LineType *
+bwb_DISPLAY (LineType * Line)
+{
+ /* SYNTAX: DISPLAY source$ */
+ char *Source;
+
+ assert (Line != NULL);
+ Source = NULL;
+ if (line_read_string_expression (Line, &Source) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ goto EXIT;
+ }
+ bwb_display_file (Source);
+EXIT:
+ if (Source)
+ {
+ free (Source);
+ }
+ return (Line);
+}
+
+/*
+--------------------------------------------------------------------------------------------
+ EOF
+--------------------------------------------------------------------------------------------
+*/
+
+
+
+/* EOF */
diff --git a/Junk/bwb_var.c b/Junk/bwb_var.c
new file mode 100644
index 0000000..2e90020
--- /dev/null
+++ b/Junk/bwb_var.c
@@ -0,0 +1,5068 @@
+/***************************************************************
+
+ bwb_var.c Variable-Handling Routines
+ for Bywater BASIC Interpreter
+
+ Copyright (c) 1993, Ted A. Campbell
+ Bywater Software
+
+ email: tcamp@delphi.com
+
+ Copyright and Permissions Information:
+
+ All U.S. and international rights are claimed by the author,
+ Ted A. Campbell.
+
+ This software 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.
+
+***************************************************************/
+
+/*---------------------------------------------------------------*/
+/* NOTE: Modifications marked "JBV" were made by Jon B. Volkoff, */
+/* 11/1995 (eidetics@cerf.net). */
+/* */
+/* Those additionally marked with "DD" were at the suggestion of */
+/* Dale DePriest (daled@cadence.com). */
+/* */
+/* Version 3.00 by Howard Wulf, AF5NE */
+/* */
+/* Version 3.10 by Howard Wulf, AF5NE */
+/* */
+/* Version 3.20 by Howard Wulf, AF5NE */
+/* */
+/*---------------------------------------------------------------*/
+
+
+
+#include "bwbasic.h"
+
+
+/* Prototypes for functions visible to this file only */
+
+static void clear_virtual (VirtualType * Z);
+static void clear_virtual_by_variable (VariableType * Variable);
+static int dim_check (VariableType * variable);
+static size_t dim_unit (VariableType * v, int *pp);
+static LineType *dio_lrset (LineType * l, int rset);
+static void field_clear (FieldType * Field);
+static FieldType *field_new (void);
+static VirtualType *find_virtual_by_variable (VariableType * Variable);
+static LineType *internal_swap (LineType * l);
+static VariableType *mat_islocal (char *buffer);
+static VirtualType *new_virtual (void);
+static int var_defx (LineType * l, int TypeCode);
+static VariableType *var_islocal (char *buffer, int dimensions);
+static void var_link_new_variable (VariableType * v);
+
+extern int
+var_init (void)
+{
+ assert( My != NULL );
+
+ My->VariableHead = NULL;
+
+ return TRUE;
+}
+
+extern LineType *
+bwb_COMMON (LineType * l)
+{
+ /*
+ SYNTAX: COMMON scalar
+ SYNTAX: COMMON matrix( dimnesions ) ' COMMON A(1), B(2), C(3)
+ SYNTAX: COMMON matrix( [, [,]] ) ' COMMON A(), B(,), C(,,)
+ */
+
+ assert (l != NULL);
+
+ do
+ {
+ int dimensions;
+ VariableType *variable;
+ char varname[NameLengthMax + 1];
+
+ dimensions = 0;
+ /* get variable name and find variable */
+ if (line_read_varname (l, varname) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_skip_LparenChar (l))
+ {
+ line_skip_spaces (l); /* keep this */
+ if (bwb_isdigit (l->buffer[l->position]))
+ {
+ /* COMMON A(3) : DIM A( 5, 10, 20 ) */
+ if (line_read_integer_expression (l, &dimensions) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ else
+ {
+ /* COMMON A(,,) : DIM A( 5, 10, 20 ) */
+ dimensions++;
+ while (line_skip_seperator (l))
+ {
+ dimensions++;
+ }
+ }
+ if (line_skip_RparenChar (l) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ if ((variable = var_find (varname, dimensions, TRUE)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ /* mark as COMMON */
+ variable->VariableFlags |= VARIABLE_COMMON;
+ }
+ while (line_skip_seperator (l));
+
+ return (l);
+}
+
+extern LineType *
+bwb_ERASE (LineType * l)
+{
+ /*
+ SYNTAX: ERASE variable [, ...] ' ERASE A, B, C
+ */
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ do
+ {
+ char varname[NameLengthMax + 1];
+
+ /* get variable name and find variable */
+
+ if (line_read_varname (l, varname))
+ {
+ /* erase all matching SCALAR and ARRAY variables */
+ int dimensions;
+
+ for (dimensions = 0; dimensions < MAX_DIMS; dimensions++)
+ {
+ VariableType *variable;
+
+ variable = var_find (varname, dimensions, FALSE);
+ if (variable != NULL)
+ {
+ /* found a variable */
+ VariableType *p; /* previous variable in linked list */
+
+ /* find then previous variable in chain */
+ if (variable == My->VariableHead)
+ {
+ /* free head */
+ My->VariableHead = variable->next;
+ variable->next = NULL;
+ var_free (variable);
+ }
+ else
+ {
+ /* free tail */
+ for (p = My->VariableHead; p != NULL && p->next != variable;
+ p = p->next)
+ {
+ ;
+ }
+ if (p == NULL)
+ {
+ /* this should never happen */
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (p->next != variable)
+ {
+ /* this should never happen */
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ /* reassign linkage */
+ p->next = variable->next;
+ variable->next = NULL;
+ var_free (variable);
+ }
+ }
+ }
+ }
+ }
+ while (line_skip_seperator (l));
+ return (l);
+}
+
+static LineType *
+internal_swap (LineType * l)
+{
+ VariableType *lhs;
+ VariableType *rhs;
+
+ assert (l != NULL);
+
+ if (line_skip_LparenChar (l))
+ {
+ /* optional */
+ }
+
+ /* get left variable */
+ if ((lhs = line_read_scalar (l)) == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ /* get required comma */
+ if (line_skip_seperator (l) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ /* get right variable */
+ if ((rhs = line_read_scalar (l)) == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if (line_skip_RparenChar (l))
+ {
+ /* optional */
+ }
+
+ /* check to be sure that both variables are compatible */
+ if (VAR_IS_STRING (rhs) != VAR_IS_STRING (lhs))
+ {
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+
+ /* swap the values */
+ {
+ VariantType L;
+ VariantType R;
+ CLEAR_VARIANT (&L);
+ CLEAR_VARIANT (&R);
+
+ if (var_get (lhs, &L) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (var_get (rhs, &R) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ if (var_set (lhs, &R) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (var_set (rhs, &L) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ /* return */
+ return (l);
+}
+
+extern LineType *
+bwb_EXCHANGE (LineType * l)
+{
+ /*
+ SYNTAX: EXCHANGE variable, variable
+ SYNTAX: EXCHANGE ( variable, variable )
+ */
+
+ assert (l != NULL);
+ return internal_swap (l);
+}
+
+
+
+extern LineType *
+bwb_SWAP (LineType * l)
+{
+ /*
+ SYNTAX: SWAP variable, variable
+ SYNTAX: SWAP ( variable, variable )
+ */
+
+ assert (l != NULL);
+ return internal_swap (l);
+}
+
+extern VariableType *
+var_free (VariableType * variable)
+{
+ /*
+ Release all the memory associated with a specific variable.
+ This function returns NULL, so you can use it like this:
+ variable = var_new(...);
+ ...
+ variable = var_free( variable );
+ */
+
+
+ if (variable != NULL)
+ {
+ if (variable->next != NULL)
+ {
+ /* This allows variable chains to be easily released. */
+ variable->next = var_free (variable->next);
+ }
+ /* cleanup this variable */
+ field_free_variable (variable);
+ clear_virtual_by_variable (variable);
+ if (VAR_IS_STRING (variable))
+ {
+ if (variable->Value.String != NULL)
+ {
+ int j;
+ for (j = 0; j < variable->array_units; j++)
+ {
+ if (variable->Value.String[j].sbuffer != NULL)
+ {
+ free (variable->Value.String[j].sbuffer);
+ }
+ variable->Value.String[j].length = 0;
+ }
+ free (variable->Value.String);
+ variable->Value.String = NULL;
+ }
+ }
+ else
+ {
+ if (variable->Value.Number != NULL)
+ {
+ free (variable->Value.Number);
+ variable->Value.Number = NULL;
+ }
+ }
+ free (variable);
+ }
+ return NULL;
+}
+
+extern void
+var_CLEAR (void)
+{
+ /*
+ free all variables except PRESET
+ */
+ VariableType *variable;
+ assert( My != NULL );
+
+
+ for (variable = My->VariableHead; variable != NULL;)
+ {
+ if (variable->VariableFlags & VARIABLE_PRESET)
+ {
+ /* keep */
+ variable = variable->next;
+ }
+ else if (variable == My->VariableHead)
+ {
+ /* free head */
+ My->VariableHead = variable->next;
+ variable->next = NULL;
+ var_free (variable);
+ variable = My->VariableHead;
+ }
+ else
+ {
+ /* free tail */
+ VariableType *z;
+ z = variable->next;
+ variable->next = NULL;
+ var_free (variable);
+ variable = z;
+ }
+ }
+}
+
+extern LineType *
+bwb_CLEAR (LineType * l)
+{
+ /*
+ SYNTAX: CLEAR
+ */
+
+ assert (l != NULL);
+ var_CLEAR ();
+ line_skip_eol (l);
+ return (l);
+}
+
+
+LineType *
+bwb_CLR (LineType * l)
+{
+
+ assert (l != NULL);
+ return bwb_CLEAR (l);
+}
+
+/***********************************************************
+
+ FUNCTION: var_delcvars()
+
+ DESCRIPTION: This function deletes all variables
+ in memory except those previously marked
+ as common.
+
+***********************************************************/
+
+int
+var_delcvars (void)
+{
+ VariableType *v;
+
+ assert( My != NULL );
+
+ for (v = My->VariableHead; v != NULL;)
+ {
+ if (v->VariableFlags & VARIABLE_PRESET)
+ {
+ /* keep */
+ v = v->next;
+ }
+ else if (v->VariableFlags & VARIABLE_COMMON)
+ {
+ /* keep */
+ v = v->next;
+ }
+ else if (v == My->VariableHead)
+ {
+ /* free head */
+ My->VariableHead = v->next;
+ v->next = NULL;
+ var_free (v);
+ v = My->VariableHead;
+ }
+ else
+ {
+ /* free tail */
+ VariableType *z; /* next variable */
+
+ z = v->next;
+ v->next = NULL;
+ var_free (v);
+ v = z;
+ }
+ }
+ return TRUE;
+}
+
+/***********************************************************
+
+ FUNCTION: bwb_mid()
+
+ DESCRIPTION: This function implements the BASIC
+ MID$ command.
+
+ Same as MID$ function, except it will set
+ the desired substring and not return its
+ value. Added by JBV 10/95
+
+ SYNTAX: MID$( string-variable$, start-position-in-string
+ [, number-of-spaces ] ) = expression
+
+***********************************************************/
+
+LineType *
+bwb_MID4 (LineType * l)
+{
+ /* MID$( target$, start% [ , length% ] ) = source$ */
+ VariableType *variable;
+ VariantType target;
+ int start;
+ int length;
+ VariantType source;
+ int maxlen;
+
+ assert (l != NULL);
+
+ CLEAR_VARIANT (&source);
+ CLEAR_VARIANT (&target);
+ start = 0;
+ length = 0;
+ maxlen = 0;
+ if (line_skip_LparenChar (l) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if ((variable = line_read_scalar (l)) == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (VAR_IS_STRING (variable))
+ {
+ /* OK */
+ }
+ else
+ {
+ /* ERROR */
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+ if (var_get (variable, &target) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (target.VariantTypeCode != StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+ if (line_skip_seperator (l) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_integer_expression (l, &start) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (start < 1)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ if (start > target.Length)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ maxlen = 1 + target.Length - start;
+ if (line_skip_seperator (l))
+ {
+ if (line_read_integer_expression (l, &length) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (length < 0)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ }
+ else
+ {
+ length = -1; /* MAGIC */
+ }
+ if (line_skip_RparenChar (l) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* skip the equal sign */
+ if (line_skip_EqualChar (l) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (line_read_expression (l, &source) == FALSE) /* bwb_MID4 */
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (source.VariantTypeCode != StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+ if (length == -1 /* MAGIC */ )
+ {
+ length = source.Length;
+ }
+ length = MIN (length, maxlen);
+ length = MIN (length, source.Length);
+ if (length < 0)
+ {
+ WARN_INTERNAL_ERROR;
+ return (l);
+ }
+ if (length > 0)
+ {
+ int i;
+
+ start--; /* BASIC to C */
+ for (i = 0; i < length; i++)
+ {
+ target.Buffer[start + i] = source.Buffer[i];
+ }
+ target.Buffer[target.Length] = NulChar;
+ if (var_set (variable, &target) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ }
+ RELEASE_VARIANT (&source);
+ RELEASE_VARIANT (&target);
+ return (l);
+}
+
+
+/***********************************************************
+
+ FUNCTION: bwb_ddbl()
+
+ DESCRIPTION: This function implements the BASIC
+ DEFDBL command.
+
+ SYNTAX: DEFDBL letter[-letter](, letter[-letter])...
+
+***********************************************************/
+
+LineType *
+bwb_DEFBYT (LineType * l)
+{
+ /*
+ DEFBYT letter[-letter](, letter[-letter])...
+ */
+
+ assert (l != NULL);
+ var_defx (l, ByteTypeCode);
+ return (l);
+}
+
+LineType *
+bwb_DEFCUR (LineType * l)
+{
+ /*
+ DEFCUR letter[-letter](, letter[-letter])...
+ */
+
+ assert (l != NULL);
+ var_defx (l, CurrencyTypeCode);
+ return (l);
+}
+
+LineType *
+bwb_DEFDBL (LineType * l)
+{
+ /*
+ DEFDBL letter[-letter](, letter[-letter])...
+ */
+
+ assert (l != NULL);
+ var_defx (l, DoubleTypeCode);
+ return (l);
+}
+
+/***********************************************************
+
+ FUNCTION: bwb_dint()
+
+ DESCRIPTION: This function implements the BASIC
+ DEFINT command.
+
+ SYNTAX: DEFINT letter[-letter](, letter[-letter])...
+
+***********************************************************/
+
+LineType *
+bwb_DEFINT (LineType * l)
+{
+ /*
+ DEFINT letter[-letter](, letter[-letter])...
+ */
+
+ assert (l != NULL);
+ var_defx (l, IntegerTypeCode);
+ return (l);
+}
+
+LineType *
+bwb_DEFLNG (LineType * l)
+{
+ /*
+ DEFLNG letter[-letter](, letter[-letter])...
+ */
+
+ assert (l != NULL);
+ var_defx (l, LongTypeCode);
+ return (l);
+}
+
+/***********************************************************
+
+ FUNCTION: bwb_dsng()
+
+ DESCRIPTION: This function implements the BASIC
+ DEFSNG command.
+
+ SYNTAX: DEFSNG letter[-letter](, letter[-letter])...
+
+***********************************************************/
+
+LineType *
+bwb_DEFSNG (LineType * l)
+{
+ /*
+ DEFSNG letter[-letter](, letter[-letter])...
+ */
+
+ assert (l != NULL);
+ var_defx (l, SingleTypeCode);
+ return (l);
+}
+
+/***********************************************************
+
+ FUNCTION: bwb_dstr()
+
+ DESCRIPTION: This function implements the BASIC
+ DEFSTR command.
+
+ SYNTAX: DEFSTR letter[-letter](, letter[-letter])...
+
+***********************************************************/
+
+LineType *
+bwb_DEFSTR (LineType * l)
+{
+ /*
+ DEFSTR letter[-letter](, letter[-letter])...
+ */
+
+ assert (l != NULL);
+ var_defx (l, StringTypeCode);
+ return (l);
+}
+
+LineType *
+bwb_TEXT (LineType * l)
+{
+ /*
+ TEXT letter[-letter](, letter[-letter])...
+ */
+
+ assert (l != NULL);
+ var_defx (l, StringTypeCode);
+ return (l);
+}
+
+LineType *
+bwb_TRACE (LineType * l)
+{
+ assert (l != NULL);
+
+ return bwb_TRACE_ON(l);
+}
+
+LineType *
+bwb_TRACE_ON (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+ fprintf (My->SYSOUT->cfp, "Trace is ON\n");
+ ResetConsoleColumn ();
+ My->IsTraceOn = TRUE;
+
+ return (l);
+}
+
+LineType *
+bwb_TRACE_OFF (LineType * l)
+{
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+ fprintf (My->SYSOUT->cfp, "Trace is OFF\n");
+ ResetConsoleColumn ();
+ My->IsTraceOn = FALSE;
+
+ return (l);
+}
+
+int
+VarTypeIndex (char C)
+{
+
+ switch (C)
+ {
+ case 'A':
+ return 0;
+ case 'B':
+ return 1;
+ case 'C':
+ return 2;
+ case 'D':
+ return 3;
+ case 'E':
+ return 4;
+ case 'F':
+ return 5;
+ case 'G':
+ return 6;
+ case 'H':
+ return 7;
+ case 'I':
+ return 8;
+ case 'J':
+ return 9;
+ case 'K':
+ return 10;
+ case 'L':
+ return 11;
+ case 'M':
+ return 12;
+ case 'N':
+ return 13;
+ case 'O':
+ return 14;
+ case 'P':
+ return 15;
+ case 'Q':
+ return 16;
+ case 'R':
+ return 17;
+ case 'S':
+ return 18;
+ case 'T':
+ return 19;
+ case 'U':
+ return 20;
+ case 'V':
+ return 21;
+ case 'W':
+ return 22;
+ case 'X':
+ return 23;
+ case 'Y':
+ return 24;
+ case 'Z':
+ return 25;
+ case 'a':
+ return 0;
+ case 'b':
+ return 1;
+ case 'c':
+ return 2;
+ case 'd':
+ return 3;
+ case 'e':
+ return 4;
+ case 'f':
+ return 5;
+ case 'g':
+ return 6;
+ case 'h':
+ return 7;
+ case 'i':
+ return 8;
+ case 'j':
+ return 9;
+ case 'k':
+ return 10;
+ case 'l':
+ return 11;
+ case 'm':
+ return 12;
+ case 'n':
+ return 13;
+ case 'o':
+ return 14;
+ case 'p':
+ return 15;
+ case 'q':
+ return 16;
+ case 'r':
+ return 17;
+ case 's':
+ return 18;
+ case 't':
+ return 19;
+ case 'u':
+ return 20;
+ case 'v':
+ return 21;
+ case 'w':
+ return 22;
+ case 'x':
+ return 23;
+ case 'y':
+ return 24;
+ case 'z':
+ return 25;
+ }
+ return -1;
+}
+
+/***********************************************************
+
+ Function: var_defx()
+
+ DESCRIPTION: This function is a generalized DEFxxx handler.
+
+***********************************************************/
+
+static int
+var_defx (LineType * l, int TypeCode)
+{
+ /*
+ DEFxxx letter[-letter](, letter[-letter])...
+ */
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->DefaultVariableType != NULL );
+
+ do
+ {
+ char firstc;
+ char lastc;
+ int first;
+ int last;
+ int c;
+
+ /* find a sequence of letters for variables */
+ if (line_read_letter_sequence (l, &firstc, &lastc) == FALSE)
+ {
+ /* DEFINT 0-9 */
+ WARN_SYNTAX_ERROR;
+ return FALSE;
+ }
+ first = VarTypeIndex (firstc);
+ if (first < 0)
+ {
+ /* DEFINT 0-Z */
+ WARN_SYNTAX_ERROR;
+ return FALSE;
+ }
+ last = VarTypeIndex (lastc);
+ if (last < 0)
+ {
+ /* DEFINT A-9 */
+ WARN_SYNTAX_ERROR;
+ return FALSE;
+ }
+ if (first > last)
+ {
+ /* DEFINT Z-A */
+ WARN_SYNTAX_ERROR;
+ return FALSE;
+ }
+ for (c = first; c <= last; c++)
+ {
+ My->DefaultVariableType[c] = TypeCode; /* var_defx */
+ }
+ }
+ while (line_skip_seperator (l));
+
+ return TRUE;
+
+}
+
+/***************************************************************
+
+ FUNCTION: var_find()
+
+ DESCRIPTION: This C function attempts to find a variable
+ name matching the argument in buffer. If
+ it fails to find a matching name, it
+ sets up a new variable with that name.
+
+***************************************************************/
+
+VariableType *
+mat_find (char *name)
+{
+ /*
+ similar to var_find, but returns the first matrix found
+ */
+ VariableType *v;
+ assert( My != NULL );
+
+
+ /* check for NULL variable name */
+ if (name == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (is_empty_string (name))
+ {
+ WARN_SYNTAX_ERROR;
+ return NULL;
+ }
+ /* check for a local variable at this EXEC level */
+
+ v = mat_islocal (name);
+ if (v != NULL)
+ {
+ return v;
+ }
+ /* now run through the global variable list and try to find a match */
+ for (v = My->VariableHead; v != NULL; v = v->next)
+ {
+ assert( v != NULL );
+ if (v->dimensions > 0)
+ {
+ if (bwb_stricmp (v->name, name) == 0)
+ {
+ return v;
+ }
+ }
+ }
+ return NULL;
+}
+
+VariableType *
+var_find (char *name, int dimensions, int IsImplicit)
+{
+ VariableType *v;
+ int n;
+
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+ assert( My->DefaultVariableType != NULL );
+
+ /* check for NULL variable name */
+ if (name == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (is_empty_string (name))
+ {
+ WARN_SYNTAX_ERROR;
+ return NULL;
+ }
+ if (dimensions < 0)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+
+ /* check for a local variable at this EXEC level */
+
+ v = var_islocal (name, dimensions);
+ if (v != NULL)
+ {
+ return v;
+ }
+ /* now run through the global variable list and try to find a match */
+ for (v = My->VariableHead; v != NULL; v = v->next)
+ {
+ assert( v != NULL );
+ if (v->dimensions == dimensions)
+ {
+ if (bwb_stricmp (v->name, name) == 0)
+ {
+ return v;
+ }
+ }
+ }
+ if (IsImplicit == FALSE)
+ {
+ return NULL;
+ }
+ if (My->CurrentVersion->OptionFlags & OPTION_EXPLICIT_ON)
+ {
+ /* NO implicit creation - all variables must be created via DIM */
+ WARN_VARIABLE_NOT_DECLARED;
+ return NULL;
+ }
+ if (My->CurrentVersion->OptionFlags & OPTION_STRICT_ON)
+ {
+ if (dimensions > 0)
+ {
+ /* Implicit ARRAY is not allowed */
+ WARN_VARIABLE_NOT_DECLARED;
+ return NULL;
+ }
+ }
+
+ /* this is a IMPLICIT variable, so initialize it... */
+
+ /* initialize new variable */
+ if ((v = (VariableType *) calloc (1, sizeof (VariableType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return NULL;
+ }
+
+ /* copy the name into the appropriate structure */
+
+ assert( v != NULL );
+ bwb_strcpy (v->name, name);
+
+ /* determine variable TypeCode */
+ v->VariableTypeCode = var_nametype (name);
+ if (v->VariableTypeCode == NulChar)
+ {
+ /* variable name has no declared TypeCode */
+ n = VarTypeIndex (name[0]);
+ if (n < 0)
+ {
+ v->VariableTypeCode = DoubleTypeCode; /* default */
+ }
+ else
+ {
+ v->VariableTypeCode = My->DefaultVariableType[n];
+ }
+ }
+ v->VariableFlags = 0;
+ v->dimensions = dimensions;
+ v->array_units = 1;
+ for (n = 0; n < v->dimensions; n++)
+ {
+ v->LBOUND[n] = My->CurrentVersion->OptionBaseInteger; /* implicit lower bound */
+ v->UBOUND[n] = 10; /* implicit upper bound */
+ if (v->UBOUND[n] < v->LBOUND[n])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return NULL;
+ }
+ v->VINDEX[n] = v->LBOUND[n];
+ v->array_units *= v->UBOUND[n] - v->LBOUND[n] + 1;
+ }
+
+ /* assign array memory */
+ if (VAR_IS_STRING (v))
+ {
+ if ((v->Value.String =
+ (StringType *) calloc (v->array_units, sizeof (StringType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return NULL;
+ }
+ }
+ else
+ {
+ if ((v->Value.Number =
+ (DoubleType *) calloc (v->array_units, sizeof (DoubleType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return NULL;
+ }
+ }
+
+ /* insert variable at the beginning of the variable chain */
+ v->next = My->VariableHead;
+ My->VariableHead = v;
+ return v;
+}
+
+/***************************************************************
+
+ FUNCTION: var_new()
+
+ DESCRIPTION: This function assigns memory for a new variable.
+
+***************************************************************/
+
+VariableType *
+var_new (char *name, char TypeCode)
+{
+ VariableType *v;
+
+
+ /* get memory for new variable */
+
+ if (name == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return NULL;
+ }
+ if (is_empty_string (name))
+ {
+ WARN_SYNTAX_ERROR;
+ return NULL;
+ }
+ if ((v = (VariableType *) calloc (1, sizeof (VariableType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return NULL;
+ }
+ /* copy the name into the appropriate structure */
+
+ assert( v != NULL );
+ bwb_strcpy (v->name, name);
+
+ /* set memory in the new variable */
+ var_make (v, TypeCode);
+
+ /* and return */
+
+ return v;
+
+}
+
+
+/***************************************************************
+
+ FUNCTION: bwb_dim()
+
+ DESCRIPTION: This function implements the BASIC DIM
+ statement, allocating memory for a
+ dimensioned array of variables.
+
+ SYNTAX: DIM variable(elements...)[,variable(elements...)]
+
+***************************************************************/
+
+static void
+var_link_new_variable (VariableType * v)
+{
+ /*
+ We are called by DIM, so this is an explicitly created variable.
+ There are only two possibilities:
+ 1. We are a LOCAL variable of a SUB or FUNCTION.
+ 2. We are a GLOBAL variable.
+ */
+
+ assert (v != NULL);
+ assert( My != NULL );
+
+ if (My->StackHead != NULL)
+ {
+ StackType *StackItem;
+ for (StackItem = My->StackHead; StackItem != NULL;
+ StackItem = StackItem->next)
+ {
+ if (StackItem->LoopTopLine != NULL)
+ {
+ switch (StackItem->LoopTopLine->cmdnum)
+ {
+ case C_FUNCTION:
+ case C_SUB:
+ /* we have found a FUNCTION or SUB boundary, must be LOCAL */
+ v->next = StackItem->local_variable;
+ StackItem->local_variable = v;
+ return;
+ /* break; */
+ }
+ }
+ }
+ }
+ /* no FUNCTION or SUB on the stack, must be GLOBAL */
+ v->next = My->VariableHead;
+ My->VariableHead = v;
+}
+
+
+static VirtualType *
+new_virtual (void)
+{
+ VirtualType *Z;
+ assert( My != NULL );
+
+
+ /* look for an empty slot */
+ for (Z = My->VirtualHead; Z != NULL; Z = Z->next)
+ {
+ if (Z->Variable == NULL)
+ {
+ /* FOUND */
+ return Z;
+ }
+ }
+ /* NOT FOUND */
+ if ((Z = (VirtualType *) calloc (1, sizeof (VirtualType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return NULL;
+ }
+ Z->next = My->VirtualHead;
+ My->VirtualHead = Z;
+ return Z;
+}
+static void
+clear_virtual (VirtualType * Z)
+{
+
+ assert (Z != NULL);
+
+ Z->Variable = NULL;
+ Z->FileNumber = 0;
+ Z->FileOffset = 0;
+ Z->FileLength = 0;
+}
+static void
+clear_virtual_by_variable (VariableType * Variable)
+{
+ VirtualType *Z;
+
+ assert (Variable != NULL);
+ assert( My != NULL );
+
+ for (Z = My->VirtualHead; Z != NULL; Z = Z->next)
+ {
+ if (Z->Variable == Variable)
+ {
+ /* FOUND */
+ clear_virtual (Z);
+ }
+ }
+}
+extern void
+clear_virtual_by_file (int FileNumber)
+{
+ /* called by file_clear() */
+ VirtualType *Z;
+
+ assert( My != NULL );
+
+ for (Z = My->VirtualHead; Z != NULL; Z = Z->next)
+ {
+ if (Z->FileNumber == FileNumber)
+ {
+ /* FOUND */
+ clear_virtual (Z);
+ }
+ }
+}
+static VirtualType *
+find_virtual_by_variable (VariableType * Variable)
+{
+ VirtualType *Z;
+
+ assert (Variable != NULL);
+ assert( My != NULL );
+
+ for (Z = My->VirtualHead; Z != NULL; Z = Z->next)
+ {
+ if (Z->Variable == Variable)
+ {
+ /* FOUND */
+ return Z;
+ }
+ }
+ /* NOT FOUND */
+ return NULL;
+}
+
+LineType *
+bwb_LOCAL (LineType * l)
+{
+ /* only supported inside a FUNCTION or SUB */
+
+ assert (l != NULL);
+ return bwb_DIM (l);
+}
+
+LineType *
+bwb_DIM (LineType * l)
+{
+ int FileNumber; /* the file might not be OPEN when the variable is declared */
+ size_t FileOffset; /* from beginning of file */
+ int FileLength; /* sizeof( DoubleType ) or Fixed String Length */
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->DefaultVariableType != NULL );
+
+
+ FileNumber = 0;
+ FileOffset = 0;
+ FileLength = 0;
+ if (line_skip_FilenumChar (l))
+ {
+ /* DIM # filenum , ... */
+ if (line_read_integer_expression (l, &FileNumber) == FALSE)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (FileNumber <= 0)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (line_skip_seperator (l) == FALSE)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ FileOffset = 0;
+ FileLength = 0;
+ }
+
+ do
+ {
+ VariableType *v;
+ int n;
+ int dimensions;
+ int LBOUND[MAX_DIMS];
+ int UBOUND[MAX_DIMS];
+ char TypeCode;
+ char varname[NameLengthMax + 1];
+
+
+ /* Get variable name */
+ if (line_read_varname (l, varname) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ /* read parameters */
+ dimensions = 0;
+ if (line_peek_LparenChar (l))
+ {
+ if (line_read_array_redim (l, &dimensions, LBOUND, UBOUND) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* check array dimensions */
+ for (n = 0; n < dimensions; n++)
+ {
+ if (UBOUND[n] < LBOUND[n])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return (l);
+ }
+ }
+ }
+
+ /* determine variable TypeCode */
+ TypeCode = var_nametype (varname);
+ if (TypeCode == NulChar)
+ {
+ /* variable has no explicit TypeCode char */
+ TypeCode = line_read_type_declaration (l); /* AS DOUBLE and so on */
+ if (TypeCode == NulChar)
+ {
+ /* variable has no declared TypeCode */
+ int i;
+ i = VarTypeIndex (varname[0]);
+ if (i < 0)
+ {
+ TypeCode = DoubleTypeCode; /* default */
+ }
+ else
+ {
+ TypeCode = My->DefaultVariableType[i];
+ }
+ }
+ }
+
+ switch (TypeCode)
+ {
+ case ByteTypeCode:
+ /* DIM # file_num , var_name AS BYTE */
+ FileLength = sizeof (ByteType);
+ break;
+ case IntegerTypeCode:
+ /* DIM # file_num , var_name AS INTEGER */
+ FileLength = sizeof (IntegerType);
+ break;
+ case LongTypeCode:
+ /* DIM # file_num , var_name AS LONG */
+ FileLength = sizeof (LongType);
+ break;
+ case CurrencyTypeCode:
+ /* DIM # file_num , var_name AS CURRENCY */
+ FileLength = sizeof (CurrencyType);
+ break;
+ case SingleTypeCode:
+ /* DIM # file_num , var_name AS SINGLE */
+ FileLength = sizeof (SingleType);
+ break;
+ case DoubleTypeCode:
+ /* DIM # file_num , var_name AS DOUBLE */
+ FileLength = sizeof (DoubleType);
+ break;
+ case StringTypeCode:
+ /* DIM # file_num , var_name AS STRING * fixed_length */
+
+ FileLength = 16; /* default */
+ if (line_skip_StarChar (l) || line_skip_EqualChar (l))
+ {
+ /* optional fixed length */
+ if (line_read_integer_expression (l, &FileLength) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (FileLength <= 0)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (FileLength > MAXLEN)
+ {
+ WARN_STRING_TOO_LONG; /* bwb_DIM */
+ FileLength = MAXLEN;
+ }
+ }
+ break;
+ default:
+ {
+ WARN_INTERNAL_ERROR;
+ return (l);
+ }
+ }
+
+ v = var_find (varname, dimensions, FALSE);
+ if (v == NULL)
+ {
+ /* a new variable */
+ if ((v = (VariableType *) calloc (1, sizeof (VariableType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (l);
+ }
+ bwb_strcpy (v->name, varname);
+ v->VariableTypeCode = TypeCode;
+ /* assign array dimensions */
+ v->dimensions = dimensions;
+ for (n = 0; n < dimensions; n++)
+ {
+ v->LBOUND[n] = LBOUND[n];
+ v->UBOUND[n] = UBOUND[n];
+ }
+ /* assign initial array position */
+ for (n = 0; n < dimensions; n++)
+ {
+ v->VINDEX[n] = v->LBOUND[n];
+ }
+ /* calculate the array size */
+ v->array_units = 1;
+ for (n = 0; n < dimensions; n++)
+ {
+ v->array_units *= v->UBOUND[n] - v->LBOUND[n] + 1;
+ }
+ /* assign array memory */
+
+ if (FileNumber > 0)
+ {
+ /* the new variable is VIRTUAL */
+ v->VariableFlags = VARIABLE_VIRTUAL;
+ /* if( TRUE ) */
+ {
+ /* OK */
+ VirtualType *Z;
+ Z = find_virtual_by_variable (v);
+ if (Z == NULL)
+ {
+ Z = new_virtual ();
+ if (Z == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (l);
+ }
+ Z->Variable = v;
+ }
+ /* update file information */
+ Z->FileNumber = FileNumber;
+ Z->FileOffset = FileOffset;
+ Z->FileLength = FileLength;
+ FileOffset += FileLength * v->array_units;
+ }
+ }
+ else if (VAR_IS_STRING (v))
+ {
+ if ((v->Value.String =
+ (StringType *) calloc (v->array_units,
+ sizeof (StringType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (l);
+ }
+ }
+ else
+ {
+ if ((v->Value.Number =
+ (DoubleType *) calloc (v->array_units,
+ sizeof (DoubleType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (l);
+ }
+ }
+ /* set place at beginning of variable chain */
+ var_link_new_variable (v);
+
+ /* end of conditional for new variable */
+ }
+ else
+ {
+ /* old variable */
+ if (v->VariableTypeCode != TypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+
+ /* check to be sure the number of dimensions is the same */
+ if (v->dimensions != dimensions)
+ {
+ WARN_REDIMENSION_ARRAY;
+ return (l);
+ }
+ /* check to be sure sizes for each dimension are the same */
+ for (n = 0; n < dimensions; n++)
+ {
+ if (v->LBOUND[n] != LBOUND[n])
+ {
+ WARN_REDIMENSION_ARRAY;
+ return (l);
+ }
+ if (v->UBOUND[n] != UBOUND[n])
+ {
+ WARN_REDIMENSION_ARRAY;
+ return (l);
+ }
+ }
+ if (FileNumber > 0)
+ {
+ /* the existing variable MUST be Virtual */
+ if (v->VariableFlags & VARIABLE_VIRTUAL)
+ {
+ /* OK */
+ VirtualType *Z;
+ Z = find_virtual_by_variable (v);
+ if (Z == NULL)
+ {
+ Z = new_virtual ();
+ if (Z == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (l);
+ }
+ Z->Variable = v;
+ }
+ /* update file information */
+ Z->FileNumber = FileNumber;
+ Z->FileOffset = FileOffset;
+ Z->FileLength = FileLength;
+ FileOffset += FileLength * v->array_units;
+ }
+ else
+ {
+ /* the existing variable is NOT virtual */
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+ }
+ else
+ {
+ /* the existing variable CANNOT be Virtual */
+ if (v->VariableFlags & VARIABLE_VIRTUAL)
+ {
+ /* the existing variable IS virtual */
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+ else
+ {
+ /* OK */
+ }
+ }
+ /* end of conditional for old variable */
+ }
+
+ }
+ while (line_skip_seperator (l));
+
+ /* return */
+ return (l);
+}
+
+
+
+
+/***************************************************************
+
+ FUNCTION: dim_unit()
+
+ DESCRIPTION: This function calculates the unit
+ position for an array.
+
+***************************************************************/
+
+static size_t
+dim_unit (VariableType * v, int *pp)
+{
+ size_t r;
+ size_t b;
+ int n;
+
+ assert (v != NULL);
+ assert (pp != NULL);
+
+ /* Calculate and return the address of the dimensioned array */
+
+ /* Check EACH dimension for out-of-bounds, AND check correct number
+ * of dimensions. NBS_P076_0250 errors correctly. */
+
+ /*
+ Ux = Upper bound of dimension
+ Lx = Lower bound of dimension
+ Ix = Selected idex in dimension
+
+ dimensions b
+ 0 1
+ 1 b0 * ( U0 - L0 + 1 )
+ 2 b1 * ( U1 - L1 + 1 )
+ 3 b2 * ( U2 - L2 + 1 )
+
+
+ dimensions r
+ 0 0
+ 1 r0 + ( I0 - L0 ) * b0
+ 2 r1 + ( I1 - L1 ) * b1
+ 3 r2 + ( I2 - L2 ) * b2
+
+ */
+
+ r = 0;
+ b = 1;
+ for (n = 0; n < v->dimensions; n++)
+ {
+ if (pp[n] < v->LBOUND[n] || pp[n] > v->UBOUND[n])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return 0;
+ }
+ r += b * (pp[n] - v->LBOUND[n]);
+ b *= v->UBOUND[n] - v->LBOUND[n] + 1;
+ }
+
+
+ if (r > v->array_units)
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return 0;
+ }
+ return r;
+
+}
+
+
+/***************************************************************
+
+ FUNCTION: bwb_option()
+
+ DESCRIPTION: This function implements the BASIC OPTION
+ BASE statement, designating the base (1 or
+ 0) for addressing DIM arrays.
+
+ SYNTAX: OPTION BASE number
+
+***************************************************************/
+
+void
+OptionVersionSet (int i)
+{
+ assert( i >= 0 && i < NUM_VERSIONS );
+ assert( My != NULL );
+
+ My->CurrentVersion = &bwb_vertable[i];
+}
+
+LineType *
+bwb_OPTION (LineType * l)
+{
+ assert (l != NULL);
+
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ANGLE (LineType * l)
+{
+ assert (l != NULL);
+
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ANGLE_DEGREES (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION ANGLE DEGREES */
+ My->CurrentVersion->OptionFlags |= OPTION_ANGLE_DEGREES;
+ My->CurrentVersion->OptionFlags &= ~OPTION_ANGLE_GRADIANS;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ANGLE_GRADIANS (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION ANGLE GRADIANS */
+ My->CurrentVersion->OptionFlags &= ~OPTION_ANGLE_DEGREES;
+ My->CurrentVersion->OptionFlags |= OPTION_ANGLE_GRADIANS;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ANGLE_RADIANS (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION ANGLE RADIANS */
+ My->CurrentVersion->OptionFlags &= ~OPTION_ANGLE_DEGREES;
+ My->CurrentVersion->OptionFlags &= ~OPTION_ANGLE_GRADIANS;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ARITHMETIC (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ARITHMETIC_DECIMAL (LineType * l)
+{
+ /* OPTION ARITHMETIC DECIMAL */
+ assert (l != NULL);
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ARITHMETIC_FIXED (LineType * l)
+{
+ /* OPTION ARITHMETIC FIXED */
+ assert (l != NULL);
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ARITHMETIC_NATIVE (LineType * l)
+{
+ /* OPTION ARITHMETIC NATIVE */
+ assert (l != NULL);
+ return (l);
+}
+
+LineType *
+bwb_OPTION_BASE (LineType * l)
+{
+ /* OPTION BASE integer */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_range_integer (l,
+ &(My->CurrentVersion->OptionBaseInteger),
+ MININT, MAXINT);
+}
+
+LineType *
+bwb_OPTION_BUGS (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_BUGS_BOOLEAN (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION BUGS BOOLEAN */
+ My->CurrentVersion->OptionFlags |= OPTION_BUGS_BOOLEAN;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_BUGS_ON (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION BUGS ON */
+ My->CurrentVersion->OptionFlags |= OPTION_BUGS_ON;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_BUGS_OFF (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION BUGS OFF */
+ My->CurrentVersion->OptionFlags &= ~OPTION_BUGS_ON;
+ My->CurrentVersion->OptionFlags &= ~OPTION_BUGS_BOOLEAN;
+ return (l);
+}
+
+LineType *
+bwb_option_punct_char (LineType * l, char *c)
+{
+ /* OPTION ... char$ */
+
+ assert (l != NULL);
+ assert (c != NULL);
+
+ {
+ char *Value;
+ char C;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ C = Value[0];
+ free (Value);
+ /* OK */
+ if (bwb_ispunct (C))
+ {
+ /* enable */
+ *c = C;
+ }
+ else
+ {
+ /* disable */
+ *c = NulChar;
+ }
+ }
+ return (l);
+}
+
+LineType *
+bwb_option_range_integer (LineType * l, int *Integer, int MinVal, int MaxVal)
+{
+ /* OPTION ... integer */
+
+ assert (l != NULL);
+ assert (Integer != NULL);
+ assert (MinVal < MaxVal);
+
+ {
+ int Value;
+
+ Value = 0;
+ if (line_read_integer_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value < MinVal || Value > MaxVal)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ *Integer = Value;
+ }
+ return (l);
+}
+
+LineType *
+bwb_OPTION_PUNCT_COMMENT (LineType * l)
+{
+ /* OPTION PUNCT COMMENT char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionCommentChar));
+}
+
+LineType *
+bwb_OPTION_COMPARE (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_COMPARE_BINARY (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION COMPARE BINARY */
+ My->CurrentVersion->OptionFlags &= ~OPTION_COMPARE_TEXT;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_COMPARE_DATABASE (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION COMPARE DATABASE */
+ My->CurrentVersion->OptionFlags |= OPTION_COMPARE_TEXT;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_COMPARE_TEXT (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION COMPARE TEXT */
+ My->CurrentVersion->OptionFlags |= OPTION_COMPARE_TEXT;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_COVERAGE (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_COVERAGE_ON (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION COVERAGE ON */
+ My->CurrentVersion->OptionFlags |= OPTION_COVERAGE_ON;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_COVERAGE_OFF (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION COVERAGE OFF */
+ My->CurrentVersion->OptionFlags &= ~OPTION_COVERAGE_ON;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_DATE (LineType * l)
+{
+ /* OPTION DATE format$ */
+ char *Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ My->CurrentVersion->OptionDateFormat = Value;
+#if FALSE /* keep this ... */
+ /*
+ ** Yes, this can theoretically cause a memory leak.
+ ** No, we are not going to fix it.
+ ** This command is only supported in the profile.
+ ** This will only execute at most once,
+ ** so there is no actual memory leak.
+ **
+ */
+ free (Value);
+#endif
+ return (l);
+}
+
+LineType *
+bwb_OPTION_DIGITS (LineType * l)
+{
+ int Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ /* OPTION DIGITS integer */
+ Value = 0;
+ if (line_read_integer_expression (l, &Value))
+ {
+ /* OK */
+ if (Value == 0)
+ {
+ /* default */
+ Value = SIGNIFICANT_DIGITS;
+ }
+ if (Value < MINIMUM_DIGITS || Value > MAXIMUM_DIGITS)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ My->OptionDigitsInteger = Value;
+ }
+ return (l);
+}
+
+LineType *
+bwb_OPTION_DISABLE (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_DISABLE_COMMAND (LineType * l)
+{
+ /* OPTION DISABLE COMMAND name$ */
+ int IsFound;
+ char *Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+
+ IsFound = FALSE;
+ Value = NULL;
+
+ /* Get COMMAND */
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ {
+ /* Name */
+ int i;
+ for (i = 0; i < NUM_COMMANDS; i++)
+ {
+ if (bwb_stricmp (Value, IntrinsicCommandTable[i].name) == 0)
+ {
+ /* FOUND */
+ /* DISABLE COMMAND */
+ IntrinsicCommandTable[i].OptionVersionBitmask &=
+ ~My->CurrentVersion->OptionVersionValue;
+ IsFound = TRUE;
+ }
+ }
+ }
+ free (Value);
+ if (IsFound == FALSE)
+ {
+ /* display warning message */
+ fprintf (My->SYSOUT->cfp, "IGNORED: %s\n", l->buffer);
+ ResetConsoleColumn ();
+ }
+ return (l);
+}
+
+
+LineType *
+bwb_OPTION_DISABLE_FUNCTION (LineType * l)
+{
+ /* OPTION DISABLE FUNCTION name$ */
+ int IsFound;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+
+ IsFound = FALSE;
+ /* Get FUNCTION */
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ {
+ /* Name */
+ int i;
+ for (i = 0; i < NUM_FUNCTIONS; i++)
+ {
+ if (bwb_stricmp (Value, IntrinsicFunctionTable[i].Name) == 0)
+ {
+ /* FOUND */
+ /* DISABLE FUNCTION */
+ IntrinsicFunctionTable[i].OptionVersionBitmask &=
+ ~My->CurrentVersion->OptionVersionValue;
+ IsFound = TRUE;
+ }
+ }
+ }
+ free (Value);
+ }
+ if (IsFound == FALSE)
+ {
+ /* display warning message */
+ fprintf (My->SYSOUT->cfp, "IGNORED: %s\n", l->buffer);
+ ResetConsoleColumn ();
+ }
+ return (l);
+}
+
+LineType *
+bwb_OPTION_EDIT (LineType * l)
+{
+ /* OPTION EDIT string$ */
+ char *Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ My->OptionEditString = Value;
+#if FALSE /* keep this ... */
+ /*
+ ** Yes, this can theoretically cause a memory leak.
+ ** No, we are not going to fix it.
+ ** This command is only supported in the profile.
+ ** This will only execute at most once,
+ ** so there is no actual memory leak.
+ **
+ */
+ free (Value);
+#endif
+ return (l);
+}
+
+LineType *
+bwb_OPTION_EXTENSION (LineType * l)
+{
+ /* OPTION EXTENSION ext$ */
+ char *Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ My->OptionExtensionString = Value;
+#if FALSE /* keep this ... */
+ /*
+ ** Yes, this can theoretically cause a memory leak.
+ ** No, we are not going to fix it.
+ ** This command is only supported in the profile.
+ ** This command will only execute at most once,
+ ** so there is no actual memory leak.
+ **
+ */
+ free (Value);
+#endif
+ return (l);
+}
+
+LineType *
+bwb_OPTION_FILES (LineType * l)
+{
+ /* OPTION FILES name$ */
+ char *Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ My->OptionFilesString = Value;
+#if FALSE /* keep this ... */
+ /*
+ ** Yes, this can theoretically cause a memory leak.
+ ** No, we are not going to fix it.
+ ** This command is only supported in the profile.
+ ** This will only execute at most once,
+ ** so there is no actual memory leak.
+ **
+ */
+ free (Value);
+#endif
+ return (l);
+}
+
+LineType *
+bwb_OPTION_PROMPT (LineType * l)
+{
+ /* OPTION PROMPT prompt$ */
+ char *Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ My->OptionPromptString = Value;
+#if FALSE /* keep this ... */
+ /*
+ ** Yes, this can theoretically cause a memory leak.
+ ** No, we are not going to fix it.
+ ** This command is only supported in the profile.
+ ** This will only execute at most once,
+ ** so there is no actual memory leak.
+ **
+ */
+ free (Value);
+#endif
+ return (l);
+}
+
+LineType *
+bwb_OPTION_RENUM (LineType * l)
+{
+ /* OPTION RENUM name$ */
+ char *Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ My->OptionRenumString = Value;
+#if FALSE /* keep this ... */
+ /*
+ ** Yes, this can theoretically cause a memory leak.
+ ** No, we are not going to fix it.
+ ** This command is only supported in the profile.
+ ** This will only execute at most once,
+ ** so there is no actual memory leak.
+ **
+ */
+ free (Value);
+#endif
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ENABLE (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ENABLE_COMMAND (LineType * l)
+{
+ /* OPTION ENABLE COMMAND name$ */
+ int IsFound;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+
+ IsFound = FALSE;
+ /* Get COMMAND */
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ {
+ /* Name */
+ int i;
+ for (i = 0; i < NUM_COMMANDS; i++)
+ {
+ if (bwb_stricmp (Value, IntrinsicCommandTable[i].name) == 0)
+ {
+ /* FOUND */
+ /* ENABLE COMMAND */
+ IntrinsicCommandTable[i].OptionVersionBitmask |=
+ My->CurrentVersion->OptionVersionValue;
+ IsFound = TRUE;
+ }
+ }
+ }
+ free (Value);
+ }
+ if (IsFound == FALSE)
+ {
+ /* display warning message */
+ fprintf (My->SYSOUT->cfp, "IGNORED: %s\n", l->buffer);
+ ResetConsoleColumn ();
+ }
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ENABLE_FUNCTION (LineType * l)
+{
+ /* OPTION ENABLE FUNCTION name$ */
+ int IsFound;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+
+ IsFound = FALSE;
+ /* Get FUNCTION */
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ {
+ /* Name */
+ int i;
+ for (i = 0; i < NUM_FUNCTIONS; i++)
+ {
+ if (bwb_stricmp (Value, IntrinsicFunctionTable[i].Name) == 0)
+ {
+ /* FOUND */
+ /* ENABLE FUNCTION */
+ IntrinsicFunctionTable[i].OptionVersionBitmask |=
+ My->CurrentVersion->OptionVersionValue;
+ IsFound = TRUE;
+ }
+ }
+ }
+ free (Value);
+ }
+ if (IsFound == FALSE)
+ {
+ /* display warning message */
+ fprintf (My->SYSOUT->cfp, "IGNORED: %s\n", l->buffer);
+ ResetConsoleColumn ();
+ }
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ERROR (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ERROR_GOSUB (LineType * l)
+{
+ /* OPTION ERROR GOSUB */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ My->CurrentVersion->OptionFlags |= OPTION_ERROR_GOSUB;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ERROR_GOTO (LineType * l)
+{
+ /* OPTION ERROR GOTO */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ My->CurrentVersion->OptionFlags &= ~OPTION_ERROR_GOSUB;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_EXPLICIT (LineType * l)
+{
+ /* OPTION EXPLICIT */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ My->CurrentVersion->OptionFlags |= OPTION_EXPLICIT_ON;
+ return (l);
+}
+
+
+LineType *
+bwb_OPTION_PUNCT_IMAGE (LineType * l)
+{
+ /* OPTION PUNCT IMAGE char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionImageChar));
+}
+
+LineType *
+bwb_OPTION_IMPLICIT (LineType * l)
+{
+ /* OPTION IMPLICIT */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ My->CurrentVersion->OptionFlags &= ~OPTION_EXPLICIT_ON;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_INDENT (LineType * l)
+{
+ /* OPTION INDENT integer */
+ assert (l != NULL);
+ assert( My != NULL );
+
+ return bwb_option_range_integer (l, &(My->OptionIndentInteger), 0, 7);
+}
+
+LineType *
+bwb_OPTION_PUNCT_INPUT (LineType * l)
+{
+ /* OPTION PUNCT INPUT char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionInputChar));
+}
+
+LineType *
+bwb_OPTION_LABELS (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_LABELS_ON (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION LABELS ON */
+ My->CurrentVersion->OptionFlags |= OPTION_LABELS_ON;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_LABELS_OFF (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION LABELS OFF */
+ My->CurrentVersion->OptionFlags &= ~OPTION_LABELS_ON;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_PUNCT_PRINT (LineType * l)
+{
+ /* OPTION PUNCT PRINT char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionPrintChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_QUOTE (LineType * l)
+{
+ /* OPTION PUNCT QUOTE char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionQuoteChar));
+}
+
+LineType *
+bwb_OPTION_ROUND (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ROUND_BANK (LineType * l)
+{
+ /* OPTION ROUND BANK */
+ assert (l != NULL);
+ assert( My != NULL );
+
+ My->OptionRoundType = C_OPTION_ROUND_BANK;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ROUND_MATH (LineType * l)
+{
+ /* OPTION ROUND MATH */
+ assert (l != NULL);
+ assert( My != NULL );
+
+ My->OptionRoundType = C_OPTION_ROUND_MATH;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ROUND_TRUNCATE (LineType * l)
+{
+ /* OPTION ROUND TRUNCATE */
+ assert (l != NULL);
+ assert( My != NULL );
+
+ My->OptionRoundType = C_OPTION_ROUND_TRUNCATE;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_SCALE (LineType * l)
+{
+ /* OPTION SCALE integer */
+ assert (l != NULL);
+ assert( My != NULL );
+
+ return bwb_option_range_integer (l, &(My->OptionScaleInteger),
+ MINIMUM_SCALE, MAXIMUM_SCALE);
+}
+
+
+LineType *
+bwb_OPTION_SLEEP (LineType * l)
+{
+ /* OPTION SLEEP number */
+ assert (l != NULL);
+ assert( My != NULL );
+
+ if (line_read_numeric_expression (l, &My->OptionSleepDouble) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ return (l);
+}
+
+LineType *
+bwb_OPTION_STDERR (LineType * l)
+{
+ /* OPTION STDERR filename$ */
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSPRN != NULL );
+ assert( My->SYSPRN->cfp != NULL );
+
+
+ if (line_is_eol (l))
+ {
+ bwb_fclose (My->SYSPRN->cfp);
+ My->SYSPRN->cfp = stderr;
+ }
+ else
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ if (is_empty_string (Value))
+ {
+ bwb_fclose (My->SYSPRN->cfp);
+ My->SYSPRN->cfp = stderr;
+ }
+ else
+ {
+ bwb_fclose (My->SYSPRN->cfp);
+ My->SYSPRN->cfp = fopen (Value, "w+");
+ if (My->SYSPRN->cfp == NULL)
+ {
+ /* sane default */
+ My->SYSPRN->cfp = stderr;
+ WARN_BAD_FILE_NAME;
+ }
+ }
+ free (Value);
+ }
+ return (l);
+}
+
+LineType *
+bwb_OPTION_STDIN (LineType * l)
+{
+ /* OPTION STDIN filename$ */
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSIN != NULL );
+ assert( My->SYSIN->cfp != NULL );
+
+ if (line_is_eol (l))
+ {
+ bwb_fclose (My->SYSIN->cfp);
+ My->SYSIN->cfp = stdin;
+ }
+ else
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ if (is_empty_string (Value))
+ {
+ bwb_fclose (My->SYSIN->cfp);
+ My->SYSIN->cfp = stdin;
+ }
+ else
+ {
+ bwb_fclose (My->SYSIN->cfp);
+ My->SYSIN->cfp = fopen (Value, "r");
+ if (My->SYSIN->cfp == NULL)
+ {
+ /* sane default */
+ My->SYSIN->cfp = stdin;
+ WARN_BAD_FILE_NAME;
+ }
+ }
+ free (Value);
+ }
+ return (l);
+}
+
+LineType *
+bwb_OPTION_STDOUT (LineType * l)
+{
+ /* OPTION STDOUT filename$ */
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+ if (line_is_eol (l))
+ {
+ bwb_fclose (My->SYSOUT->cfp);
+ My->SYSOUT->cfp = stdout;
+ }
+ else
+ {
+ char *Value;
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ if (is_empty_string (Value))
+ {
+ bwb_fclose (My->SYSOUT->cfp);
+ My->SYSOUT->cfp = stdout;
+ }
+ else
+ {
+ bwb_fclose (My->SYSOUT->cfp);
+ My->SYSOUT->cfp = fopen (Value, "w+");
+ if (My->SYSOUT->cfp == NULL)
+ {
+ /* sane default */
+ My->SYSOUT->cfp = stdout;
+ WARN_BAD_FILE_NAME;
+ }
+ }
+ free (Value);
+ }
+ return (l);
+}
+
+LineType *
+bwb_OPTION_PUNCT_STATEMENT (LineType * l)
+{
+ /* OPTION PUNCT STATEMENT char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l,
+ &(My->CurrentVersion->OptionStatementChar));
+}
+
+LineType *
+bwb_OPTION_STRICT (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_STRICT_ON (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION STRICT ON */
+ My->CurrentVersion->OptionFlags |= OPTION_STRICT_ON;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_STRICT_OFF (LineType * l)
+{
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ /* OPTION STRICT OFF */
+ My->CurrentVersion->OptionFlags &= ~OPTION_STRICT_ON;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_PUNCT (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_PUNCT_STRING (LineType * l)
+{
+ /* OPTION PUNCT STRING char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionStringChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_DOUBLE (LineType * l)
+{
+ /* OPTION PUNCT DOUBLE char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionDoubleChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_SINGLE (LineType * l)
+{
+ /* OPTION PUNCT SINGLE char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionSingleChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_CURRENCY (LineType * l)
+{
+ /* OPTION PUNCT CURRENCY char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionCurrencyChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_LONG (LineType * l)
+{
+ /* OPTION PUNCT LONG char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionLongChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_INTEGER (LineType * l)
+{
+ /* OPTION PUNCT INTEGER char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionIntegerChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_BYTE (LineType * l)
+{
+ /* OPTION PUNCT BYTE char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionByteChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_LPAREN (LineType * l)
+{
+ /* OPTION PUNCT LPAREN char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionLparenChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_RPAREN (LineType * l)
+{
+ /* OPTION PUNCT RPAREN char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionRparenChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_FILENUM (LineType * l)
+{
+ /* OPTION PUNCT FILENUM char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionFilenumChar));
+}
+
+LineType *
+bwb_OPTION_PUNCT_AT (LineType * l)
+{
+ /* OPTION PUNCT AT char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionAtChar));
+}
+
+LineType *
+bwb_OPTION_RECLEN (LineType * l)
+{
+ /* OPTION RECLEN integer */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_range_integer (l,
+ &(My->CurrentVersion->OptionReclenInteger),
+ 0, MAXINT);
+}
+
+LineType *
+bwb_OPTION_TERMINAL (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_TERMINAL_NONE (LineType * l)
+{
+ /* OPTION TERMINAL NONE */
+ assert (l != NULL);
+ assert( My != NULL );
+
+ My->OptionTerminalType = C_OPTION_TERMINAL_NONE;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_TERMINAL_ADM (LineType * l)
+{
+ /* OPTION TERMINAL ADM-3A */
+ assert (l != NULL);
+ assert( My != NULL );
+
+ My->OptionTerminalType = C_OPTION_TERMINAL_ADM;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_TERMINAL_ANSI (LineType * l)
+{
+ /* OPTION TERMINAL ANSI */
+ assert (l != NULL);
+ assert( My != NULL );
+
+ My->OptionTerminalType = C_OPTION_TERMINAL_ANSI;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_TIME (LineType * l)
+{
+ /* OPTION TIME format$ */
+ char *Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ Value = NULL;
+ if (line_read_string_expression (l, &Value) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (Value == NULL)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ /* OK */
+ My->CurrentVersion->OptionTimeFormat = Value;
+#if FALSE /* keep this ... */
+ /*
+ ** Yes, this can theoretically cause a memory leak.
+ ** No, we are not going to fix it.
+ ** This command is only supported in the profile.
+ ** This will only execute at most once,
+ ** so there is no actual memory leak.
+ **
+ */
+ free (Value);
+#endif
+ return (l);
+}
+
+LineType *
+bwb_OPTION_TRACE (LineType * l)
+{
+
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_TRACE_ON (LineType * l)
+{
+ /* OPTION TRACE ON */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ My->CurrentVersion->OptionFlags |= OPTION_TRACE_ON;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_TRACE_OFF (LineType * l)
+{
+ /* OPTION TRACE OFF */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ My->CurrentVersion->OptionFlags &= ~OPTION_TRACE_ON;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_USING (LineType * l)
+{
+ assert (l != NULL);
+ WARN_SYNTAX_ERROR;
+ return (l);
+}
+
+LineType *
+bwb_OPTION_USING_DIGIT (LineType * l)
+{
+ /* OPTION USING DIGIT char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingDigit));
+}
+
+LineType *
+bwb_OPTION_USING_COMMA (LineType * l)
+{
+ /* OPTION USING COMMA char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingComma));
+}
+
+LineType *
+bwb_OPTION_USING_PERIOD (LineType * l)
+{
+ /* OPTION USING PERIOD char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingPeriod));
+}
+
+LineType *
+bwb_OPTION_USING_PLUS (LineType * l)
+{
+ /* OPTION USING PLUS char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingPlus));
+}
+
+LineType *
+bwb_OPTION_USING_MINUS (LineType * l)
+{
+ /* OPTION USING MINUS char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingMinus));
+}
+
+LineType *
+bwb_OPTION_USING_EXRAD (LineType * l)
+{
+ /* OPTION USING EXRAD char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingExrad));
+}
+
+LineType *
+bwb_OPTION_USING_DOLLAR (LineType * l)
+{
+ /* OPTION USING DOLLAR char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingDollar));
+}
+
+LineType *
+bwb_OPTION_USING_FILLER (LineType * l)
+{
+ /* OPTION USING FILLER char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingFiller));
+}
+
+LineType *
+bwb_OPTION_USING_LITERAL (LineType * l)
+{
+ /* OPTION USING LITERAL char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingLiteral));
+}
+
+LineType *
+bwb_OPTION_USING_FIRST (LineType * l)
+{
+ /* OPTION USING FIRST char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingFirst));
+}
+
+LineType *
+bwb_OPTION_USING_ALL (LineType * l)
+{
+ /* OPTION USING ALL char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingAll));
+}
+
+LineType *
+bwb_OPTION_USING_LENGTH (LineType * l)
+{
+ /* OPTION USING LENGTH char$ */
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ return bwb_option_punct_char (l, &(My->CurrentVersion->OptionUsingLength));
+}
+
+extern LineType *
+bwb_OPTION_VERSION (LineType * l)
+{
+ /* OPTION VERSION [version$] */
+ char *Name;
+ int i;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+
+ Name = NULL;
+ if (line_is_eol (l))
+ {
+ /* OPTIONAL */
+ }
+ else if (line_read_string_expression (l, &Name))
+ {
+ if (is_empty_string (Name) == FALSE)
+ {
+ /* a version was specified */
+ for (i = 0; i < NUM_VERSIONS; i++)
+ {
+ if (bwb_stricmp (Name, bwb_vertable[i].Name) == 0)
+ {
+ /* FOUND */
+ OptionVersionSet (i);
+ return (l);
+ }
+ }
+ /* NOT FOUND */
+ fprintf (My->SYSOUT->cfp, "OPTION VERSION \"%s\" IS INVALID\n", Name);
+ }
+ }
+ fprintf (My->SYSOUT->cfp, "VALID CHOICES ARE:\n");
+ for (i = 0; i < NUM_VERSIONS; i++)
+ {
+ char *tbuf;
+
+ tbuf = My->ConsoleOutput;
+ bwb_strcpy (tbuf, "\"");
+ bwb_strcat (tbuf, bwb_vertable[i].Name);
+ bwb_strcat (tbuf, "\"");
+ fprintf (My->SYSOUT->cfp, "OPTION VERSION %-16s ' %s\n", tbuf,
+ bwb_vertable[i].Description);
+ }
+ ResetConsoleColumn ();
+ line_skip_eol (l);
+ return (l);
+}
+
+LineType *
+bwb_OPTION_ZONE (LineType * l)
+{
+ /* OPTION ZONE integer */
+ int Value;
+
+ assert (l != NULL);
+ assert( My != NULL );
+
+ Value = 0;
+ if (line_read_integer_expression (l, &Value))
+ {
+ /* OK */
+ if (Value == 0)
+ {
+ /* default */
+ Value = ZONE_WIDTH;
+ }
+ if (Value < MINIMUM_ZONE || Value > MAXIMUM_ZONE)
+ {
+ WARN_ILLEGAL_FUNCTION_CALL;
+ return (l);
+ }
+ My->OptionZoneInteger = Value;
+ }
+ return (l);
+}
+
+
+
+int
+var_get (VariableType * variable, VariantType * variant)
+{
+ size_t offset;
+
+ /* check sanity */
+ if (variable == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ if (variant == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+
+ /* Check subscripts */
+ if (dim_check (variable) == FALSE)
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return FALSE;
+ }
+
+ /* Determine offset from array base ( for scalars the offset is always zero ) */
+ offset = dim_unit (variable, variable->VINDEX);
+
+ CLEAR_VARIANT (variant);
+
+ /* Force compatibility */
+ variant->VariantTypeCode = variable->VariableTypeCode;
+
+ if (variable->VariableTypeCode == StringTypeCode)
+ {
+ /* Variable is a STRING */
+ StringType Value;
+
+ Value.sbuffer = NULL;
+ Value.length = 0;
+ /* both STRING */
+
+ if (variable->VariableFlags & VARIABLE_VIRTUAL) /* var_get() */
+ {
+ /* get file information */
+ VirtualType *Z;
+ FileType *F;
+
+ Z = find_virtual_by_variable (variable);
+ if (Z == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ offset *= Z->FileLength; /* Byte offset */
+ offset += Z->FileOffset; /* Beginning of this data */
+ /* update file information */
+ F = find_file_by_number (Z->FileNumber);
+ if (F == NULL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (F->DevMode != DEVMODE_VIRTUAL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (F->cfp == NULL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (fseek (F->cfp, offset, SEEK_SET) != 0)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ Value.length = Z->FileLength;
+ if ((Value.sbuffer =
+ (char *) calloc (Value.length + 1 /* NulChar */ ,
+ sizeof (char))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return FALSE;
+ }
+ if (fread (Value.sbuffer, Value.length, 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ }
+ else
+ {
+ StringType *string;
+
+ string = variable->Value.String;
+ if (string == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ string += offset;
+ if (str_btob (&Value, string) == FALSE)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ }
+ variant->Buffer = Value.sbuffer;
+ variant->Length = Value.length;
+ }
+ else
+ {
+ /* Variable is a NUMBER */
+ DoubleType Value;
+ /* both NUMBER */
+
+ if (variable->VariableFlags & VARIABLE_VIRTUAL) /* var_get() */
+ {
+ /* get file information */
+ VirtualType *Z;
+ FileType *F;
+
+ Z = find_virtual_by_variable (variable);
+ if (Z == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ offset *= Z->FileLength; /* Byte offset */
+ offset += Z->FileOffset; /* Beginning of this data */
+ /* update file information */
+ F = find_file_by_number (Z->FileNumber);
+ if (F == NULL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (F->DevMode != DEVMODE_VIRTUAL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (F->cfp == NULL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (fseek (F->cfp, offset, SEEK_SET) != 0)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ switch (variable->VariableTypeCode)
+ {
+ case ByteTypeCode:
+ {
+ ByteType X;
+ if (fread (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ Value = X;
+ }
+ break;
+ case IntegerTypeCode:
+ {
+ IntegerType X;
+ if (fread (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ Value = X;
+ }
+ break;
+ case LongTypeCode:
+ {
+ LongType X;
+ if (fread (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ Value = X;
+ }
+ break;
+ case CurrencyTypeCode:
+ {
+ CurrencyType X;
+ if (fread (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ Value = X;
+ }
+ break;
+ case SingleTypeCode:
+ {
+ SingleType X;
+ if (fread (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ Value = X;
+ }
+ break;
+ case DoubleTypeCode:
+ {
+ DoubleType X;
+ if (fread (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ Value = X;
+ }
+ break;
+ case StringTypeCode:
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ /* break; */
+ default:
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ }
+ }
+ else
+ {
+ DoubleType *number;
+
+ number = variable->Value.Number;
+ if (number == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ number += offset;
+ /* copy value */
+ Value = *number;
+ }
+
+ /* VerifyNumeric */
+ if (isnan (Value))
+ {
+ /*** FATAL - INTERNAL ERROR - SHOULD NEVER HAPPEN ***/
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ if (isinf (Value))
+ {
+ /* - Evaluation of an expression results in an overflow
+ * (nonfatal, the recommended recovery procedure is to supply
+ * machine in- finity with the algebraically correct sign and
+ * continue). */
+ if (Value < 0)
+ {
+ Value = MINDBL;
+ }
+ else
+ {
+ Value = MAXDBL;
+ }
+ if (WARN_OVERFLOW)
+ {
+ /* ERROR */
+ return FALSE;
+ }
+ /* CONTINUE */
+ }
+ /* OK */
+ switch (variable->VariableTypeCode)
+ {
+ case ByteTypeCode:
+ case IntegerTypeCode:
+ case LongTypeCode:
+ case CurrencyTypeCode:
+ /* integer values */
+ Value = bwb_rint (Value);
+ break;
+ case SingleTypeCode:
+ case DoubleTypeCode:
+ /* float values */
+ break;
+ default:
+ /* ERROR */
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ /* break; */
+ }
+ variant->Number = Value;
+ }
+ return TRUE;
+}
+
+int
+var_set (VariableType * variable, VariantType * variant)
+{
+ size_t offset;
+
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+ /* check sanity */
+ if (variable == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ if (variant == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+
+ /* check CONST */
+ if (variable->VariableFlags & (VARIABLE_CONSTANT))
+ {
+ /* attempting to assign to a constant */
+ WARN_VARIABLE_NOT_DECLARED;
+ return FALSE;
+ }
+
+ /* Check subscripts */
+ if (dim_check (variable) == FALSE)
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return FALSE;
+ }
+
+ /* Determine offset from array base ( for scalars the offset is always zero ) */
+ offset = dim_unit (variable, variable->VINDEX);
+
+ /* Verify compatibility */
+ if (variable->VariableTypeCode == StringTypeCode)
+ {
+ /* Variable is a STRING */
+ StringType Value;
+
+ /* Verify value is a STRING */
+ if (variant->VariantTypeCode != StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ return FALSE;
+ }
+ Value.sbuffer = variant->Buffer;
+ Value.length = variant->Length;
+ /* both STRING */
+
+ if (variable->VariableFlags & VARIABLE_VIRTUAL) /* var_set() */
+ {
+ /* get file information */
+ VirtualType *Z;
+ FileType *F;
+ int count;
+
+ Z = find_virtual_by_variable (variable);
+ if (Z == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ offset *= Z->FileLength; /* Byte offset */
+ offset += Z->FileOffset; /* Beginning of this data */
+ /* update file information */
+ F = find_file_by_number (Z->FileNumber);
+ if (F == NULL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (F->DevMode != DEVMODE_VIRTUAL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (F->cfp == NULL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (fseek (F->cfp, offset, SEEK_SET) != 0)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ count = MIN (Value.length, Z->FileLength);
+ if (fwrite (Value.sbuffer, sizeof (char), count, F->cfp) != count)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ /* PADR */
+ while (count < Z->FileLength)
+ {
+ if (fputc (' ', F->cfp) == EOF)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ count++;
+ }
+ }
+ else
+ {
+ StringType *string;
+
+ string = variable->Value.String;
+ if (string == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ string += offset;
+ if (str_btob (string, &Value) == FALSE)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ }
+ if (variable->VariableFlags & VARIABLE_DISPLAY) /* var_set() */
+ {
+ if (My->ThisLine) /* var_set() */
+ {
+ if (My->ThisLine->LineFlags & (LINE_USER)) /* var_set() */
+ {
+ /* immediate mode */
+ }
+ else
+ {
+ fprintf (My->SYSOUT->cfp, "#%d %s=%s\n", My->ThisLine->number, variable->name, variant->Buffer); /* var_set() */
+ ResetConsoleColumn ();
+ }
+ }
+ }
+ }
+ else
+ {
+ /* Variable is a NUMBER */
+ DoubleType Value;
+
+ /* Verify value is a NUMBER */
+ if (variant->VariantTypeCode == StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ return FALSE;
+ }
+
+ /* both NUMBER */
+
+ /* VerifyNumeric */
+ if (isnan (variant->Number))
+ {
+ /*** FATAL - INTERNAL ERROR - SHOULD NEVER HAPPEN ***/
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ if (isinf (variant->Number))
+ {
+ /* - Evaluation of an expression results in an overflow
+ * (nonfatal, the recommended recovery procedure is to supply
+ * machine in- finity with the algebraically correct sign and
+ * continue). */
+ if (variant->Number < 0)
+ {
+ variant->Number = MINDBL;
+ }
+ else
+ {
+ variant->Number = MAXDBL;
+ }
+ if (WARN_OVERFLOW)
+ {
+ /* ERROR */
+ return FALSE;
+ }
+ /* CONTINUE */
+ }
+ /* OK */
+ switch (variable->VariableTypeCode)
+ {
+ case ByteTypeCode:
+ variant->Number = bwb_rint (variant->Number);
+ if (variant->Number < MINBYT)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MINBYT;
+ }
+ else if (variant->Number > MAXBYT)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MAXBYT;
+ }
+ break;
+ case IntegerTypeCode:
+ variant->Number = bwb_rint (variant->Number);
+ if (variant->Number < MININT)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MININT;
+ }
+ else if (variant->Number > MAXINT)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MAXINT;
+ }
+ break;
+ case LongTypeCode:
+ variant->Number = bwb_rint (variant->Number);
+ if (variant->Number < MINLNG)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MINLNG;
+ }
+ else if (variant->Number > MAXLNG)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MAXLNG;
+ }
+ break;
+ case CurrencyTypeCode:
+ variant->Number = bwb_rint (variant->Number);
+ if (variant->Number < MINCUR)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MINCUR;
+ }
+ else if (variant->Number > MAXCUR)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MAXCUR;
+ }
+ break;
+ case SingleTypeCode:
+ if (variant->Number < MINSNG)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MINSNG;
+ }
+ else if (variant->Number > MAXSNG)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MAXSNG;
+ }
+ break;
+ case DoubleTypeCode:
+ if (variant->Number < MINDBL)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MINDBL;
+ }
+ else if (variant->Number > MAXDBL)
+ {
+ if (WARN_OVERFLOW)
+ {
+ return FALSE;
+ }
+ variant->Number = MAXDBL;
+ }
+ break;
+ default:
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ /* break; */
+ }
+ Value = variant->Number;
+ if (variable->VariableFlags & VARIABLE_VIRTUAL) /* var_set() */
+ {
+ /* get file information */
+ VirtualType *Z;
+ FileType *F;
+
+ Z = find_virtual_by_variable (variable);
+ if (Z == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ offset *= Z->FileLength; /* Byte offset */
+ offset += Z->FileOffset; /* Beginning of this data */
+ /* update file information */
+ F = find_file_by_number (Z->FileNumber);
+ if (F == NULL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (F->DevMode != DEVMODE_VIRTUAL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (F->cfp == NULL)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ if (fseek (F->cfp, offset, SEEK_SET) != 0)
+ {
+ WARN_BAD_FILE_MODE;
+ return FALSE;
+ }
+ switch (variable->VariableTypeCode)
+ {
+ case ByteTypeCode:
+ {
+ ByteType X;
+ X = Value;
+ if (fwrite (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ }
+ break;
+ case IntegerTypeCode:
+ {
+ IntegerType X;
+ X = Value;
+ if (fwrite (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ }
+ break;
+ case LongTypeCode:
+ {
+ LongType X;
+ X = Value;
+ if (fwrite (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ }
+ break;
+ case CurrencyTypeCode:
+ {
+ CurrencyType X;
+ X = Value;
+ if (fwrite (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ }
+ break;
+ case SingleTypeCode:
+ {
+ SingleType X;
+ X = Value;
+ if (fwrite (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ }
+ break;
+ case DoubleTypeCode:
+ {
+ DoubleType X;
+ X = Value;
+ if (fwrite (&X, sizeof (X), 1, F->cfp) != 1)
+ {
+ WARN_DISK_IO_ERROR;
+ return FALSE;
+ }
+ }
+ break;
+ case StringTypeCode:
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ /* break; */
+ default:
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ }
+ }
+ else
+ {
+ DoubleType *number;
+ number = variable->Value.Number;
+ if (number == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ number += offset;
+ *number = Value;
+ }
+ if (variable->VariableFlags & VARIABLE_DISPLAY) /* var_set() */
+ {
+ if (My->ThisLine) /* var_set() */
+ {
+ if (My->ThisLine->LineFlags & (LINE_USER)) /* var_set() */
+ {
+ /* immediate mode */
+ }
+ else
+ {
+ FormatBasicNumber (Value, My->NumLenBuffer);
+ fprintf (My->SYSOUT->cfp, "#%d %s=%s\n", My->ThisLine->number, variable->name, My->NumLenBuffer); /* var_set() */
+ ResetConsoleColumn ();
+ }
+ }
+ }
+ }
+ return TRUE;
+}
+
+/***************************************************************
+
+ FUNCTION: dim_check()
+
+ DESCRIPTION: This function checks subscripts of a
+ specific variable to be sure that they
+ are within the correct range.
+
+***************************************************************/
+
+static int
+dim_check (VariableType * variable)
+{
+ /* Check for validly allocated array */
+ int n;
+
+ assert (variable != NULL);
+
+
+ if (variable->VariableFlags & VARIABLE_VIRTUAL) /* var_set() */
+ {
+ if (variable->Value.String != NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ if (variable->Value.Number != NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ }
+ else if (VAR_IS_STRING (variable))
+ {
+ if (variable->Value.String == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (variable->Value.Number == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return FALSE;
+ }
+ }
+ /* Now check subscript values */
+ for (n = 0; n < variable->dimensions; n++)
+ {
+ if (variable->VINDEX[n] < variable->LBOUND[n]
+ || variable->VINDEX[n] > variable->UBOUND[n])
+ {
+ WARN_SUBSCRIPT_OUT_OF_RANGE;
+ return FALSE;
+ }
+ }
+ /* No problems found */
+ return TRUE;
+}
+
+/***************************************************************
+
+ FUNCTION: var_make()
+
+ DESCRIPTION: This function initializes a variable,
+ allocating necessary memory for it.
+
+***************************************************************/
+
+int
+var_make (VariableType * variable, char TypeCode)
+{
+ /* ALL variables are created here */
+
+ assert (variable != NULL);
+
+ switch (TypeCode)
+ {
+ case ByteTypeCode:
+ case IntegerTypeCode:
+ case LongTypeCode:
+ case CurrencyTypeCode:
+ case SingleTypeCode:
+ case DoubleTypeCode:
+ case StringTypeCode:
+ /* OK */
+ break;
+ default:
+ /* ERROR */
+ WARN_TYPE_MISMATCH;
+ return FALSE;
+ }
+
+ variable->VariableTypeCode = TypeCode;
+
+ /* get memory for array */
+
+ /* First cleanup the joint (JBV) */
+ if (variable->Value.Number != NULL)
+ {
+ free (variable->Value.Number);
+ variable->Value.Number = NULL;
+ }
+ if (variable->Value.String != NULL)
+ {
+ /* Remember to deallocate those far-flung branches! (JBV) */
+ StringType *sp; /* JBV */
+ int n; /* JBV */
+
+ sp = variable->Value.String;
+ for (n = 0; n < (int) variable->array_units; n++)
+ {
+ if (sp[n].sbuffer != NULL)
+ {
+ free (sp[n].sbuffer);
+ sp[n].sbuffer = NULL;
+ }
+ sp[n].length = 0;
+ }
+ free (variable->Value.String);
+ variable->Value.String = NULL;
+ }
+
+ variable->dimensions = 0;
+ variable->array_units = 1;
+
+ if (VAR_IS_STRING (variable))
+ {
+ if ((variable->Value.String =
+ calloc (variable->array_units, sizeof (StringType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return FALSE;
+ }
+ }
+ else
+ {
+ if ((variable->Value.Number =
+ calloc (variable->array_units, sizeof (DoubleType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return FALSE;
+ }
+ }
+ return TRUE;
+
+}
+
+/***************************************************************
+
+ FUNCTION: var_islocal()
+
+ DESCRIPTION: This function determines whether the string
+ pointed to by 'buffer' has the name of
+ a local variable at the present EXEC stack
+ level.
+
+***************************************************************/
+
+static VariableType *
+mat_islocal (char *buffer)
+{
+ /*
+ similar to var_islocal, but returns first matrix found.
+ */
+
+ assert (buffer != NULL);
+ assert( My != NULL );
+
+ if (My->StackHead != NULL)
+ {
+ StackType *StackItem;
+ for (StackItem = My->StackHead; StackItem != NULL;
+ StackItem = StackItem->next)
+ {
+ if (StackItem->LoopTopLine != NULL)
+ {
+ switch (StackItem->LoopTopLine->cmdnum)
+ {
+ case C_DEF:
+ case C_FUNCTION:
+ case C_SUB:
+ /* we have found a FUNCTION or SUB boundary */
+ {
+ VariableType *variable;
+
+ for (variable = StackItem->local_variable; variable != NULL;
+ variable = variable->next)
+ {
+ if (variable->dimensions > 0)
+ {
+ if (bwb_stricmp (variable->name, buffer) == 0)
+ {
+ /* FOUND */
+ return variable;
+ }
+ }
+ }
+ }
+ /* we have checked all the way to a FUNCTION or SUB boundary */
+ /* NOT FOUND */
+ return NULL;
+ /* break; */
+ }
+ }
+ }
+ }
+ /* NOT FOUND */
+ return NULL;
+}
+
+
+static VariableType *
+var_islocal (char *buffer, int dimensions)
+{
+
+ assert (buffer != NULL);
+ assert( My != NULL );
+
+ if (My->StackHead != NULL)
+ {
+ StackType *StackItem;
+ for (StackItem = My->StackHead; StackItem != NULL;
+ StackItem = StackItem->next)
+ {
+ if (StackItem->LoopTopLine != NULL)
+ {
+ switch (StackItem->LoopTopLine->cmdnum)
+ {
+ case C_DEF:
+ case C_FUNCTION:
+ case C_SUB:
+ /* we have found a FUNCTION or SUB boundary */
+ {
+ VariableType *variable;
+
+ for (variable = StackItem->local_variable; variable != NULL;
+ variable = variable->next)
+ {
+ if (variable->dimensions == dimensions)
+ {
+ if (bwb_stricmp (variable->name, buffer) == 0)
+ {
+ /* FOUND */
+ return variable;
+ }
+ }
+ }
+ }
+ /* we have checked all the way to a FUNCTION or SUB boundary */
+ /* NOT FOUND */
+ return NULL;
+ /* break; */
+ }
+ }
+ }
+ }
+ /* NOT FOUND */
+ return NULL;
+}
+
+/***************************************************************
+
+ FUNCTION: bwb_vars()
+
+ DESCRIPTION: This function implements the Bywater-
+ specific debugging command VARS, which
+ gives a list of all variables defined
+ in memory.
+
+***************************************************************/
+
+
+LineType *
+bwb_VARS (LineType * l)
+{
+ VariableType *variable;
+
+ assert (l != NULL);
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+ /* run through the variable list and print variables */
+
+
+ fprintf (My->SYSOUT->cfp, "%-*s %-6s %-4s %s\n", NameLengthMax, "Name",
+ "Type", "Dims", "Value");
+
+ for (variable = My->VariableHead; variable != NULL;
+ variable = variable->next)
+ {
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ if (var_get (variable, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ if (variant.VariantTypeCode == StringTypeCode)
+ {
+ fprintf (My->SYSOUT->cfp, "%-*s %-6s %-4d %s\n", NameLengthMax,
+ variable->name, "STRING", variable->dimensions,
+ variant.Buffer);
+ }
+ else
+ {
+ FormatBasicNumber (variant.Number, My->NumLenBuffer);
+ fprintf (My->SYSOUT->cfp, "%-*s %-6s %-4d %s\n", NameLengthMax,
+ variable->name, "NUMBER", variable->dimensions,
+ My->NumLenBuffer);
+ }
+ RELEASE_VARIANT (&variant);
+ }
+ ResetConsoleColumn ();
+ return (l);
+}
+
+/***************************************************************
+
+ FUNCTION: bwb_field()
+
+ DESCRIPTION: This C function implements the BASIC
+ FIELD command.
+
+***************************************************************/
+
+static void
+field_clear (FieldType * Field)
+{
+ int i;
+
+ assert (Field != NULL);
+
+ Field->File = NULL;
+ Field->FieldOffset = 0;
+ Field->FieldLength = 0;
+ Field->Var = NULL;
+ for (i = 0; i < MAX_DIMS; i++)
+ {
+ Field->VINDEX[i] = 0;
+ }
+}
+
+static FieldType *
+field_new (void)
+{
+ /* search for an empty slot */
+ FieldType *Field;
+
+ assert( My != NULL );
+
+ for (Field = My->FieldHead; Field != NULL; Field = Field->next)
+ {
+ if (Field->File == NULL || Field->Var == NULL)
+ {
+ field_clear (Field);
+ return Field;
+ }
+ }
+ /* not found */
+ if ((Field = calloc (1, sizeof (FieldType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return NULL;
+ }
+ Field->next = My->FieldHead;
+ My->FieldHead = Field;
+ return Field;
+}
+
+void
+field_close_file (FileType * File)
+{
+ /* a CLOSE of a file is in progress, release associated fields */
+ FieldType *Field;
+
+ assert (File != NULL);
+ assert( My != NULL );
+
+ for (Field = My->FieldHead; Field != NULL; Field = Field->next)
+ {
+ if (Field->File == File)
+ {
+ Field->File = NULL;
+ Field->Var = NULL;
+ }
+ }
+}
+void
+field_free_variable (VariableType * Var)
+{
+ /* an ERASE of a variable is in progress, release associated fields */
+ FieldType *Field;
+
+ assert (Var != NULL);
+ assert( My != NULL );
+
+ for (Field = My->FieldHead; Field != NULL; Field = Field->next)
+ {
+ if (Field->Var == Var)
+ {
+ Field->File = NULL;
+ Field->Var = NULL;
+ }
+ }
+}
+
+
+void
+field_get (FileType * File)
+{
+ /* a GET of the RANDOM file is in progress, update variables from FILE buffer */
+ FieldType *Field;
+
+ assert( My != NULL );
+
+ if (File == NULL)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return;
+ }
+ if (File->buffer == NULL)
+ {
+ WARN_BAD_FILE_MODE;
+ return;
+ }
+ for (Field = My->FieldHead; Field != NULL; Field = Field->next)
+ {
+ if (Field->File == File && Field->Var != NULL)
+ {
+ /* from file to variable */
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ if (Field->FieldOffset < 0)
+ {
+ WARN_FIELD_OVERFLOW;
+ return;
+ }
+ if (Field->FieldLength <= 0)
+ {
+ WARN_FIELD_OVERFLOW;
+ return;
+ }
+ if ((Field->FieldOffset + Field->FieldLength) > File->width)
+ {
+ WARN_FIELD_OVERFLOW;
+ return;
+ }
+ variant.VariantTypeCode = StringTypeCode;
+ variant.Length = Field->FieldLength;
+ if ((variant.Buffer =
+ (char *) calloc (variant.Length + 1 /* NulChar */ ,
+ sizeof (char))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return;
+ }
+ /* if( TRUE ) */
+ {
+ int i;
+
+ for (i = 0; i < Field->Var->dimensions; i++)
+ {
+ Field->Var->VINDEX[i] = Field->VINDEX[i];
+ }
+ }
+ /* if( TRUE ) */
+ {
+ int i;
+ char *Buffer;
+
+ Buffer = File->buffer;
+ Buffer += Field->FieldOffset;
+ for (i = 0; i < variant.Length; i++)
+ {
+ variant.Buffer[i] = Buffer[i];
+ }
+ variant.Buffer[variant.Length] = NulChar;
+ }
+ if (var_set (Field->Var, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return;
+ }
+ RELEASE_VARIANT (&variant);
+ }
+ }
+}
+void
+field_put (FileType * File)
+{
+ /* a PUT of the RANDOM file is in progress, update FILE buffer from variables */
+ FieldType *Field;
+
+ assert( My != NULL );
+
+ if (File == NULL)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return;
+ }
+ if (File->buffer == NULL)
+ {
+ WARN_BAD_FILE_MODE;
+ return;
+ }
+ for (Field = My->FieldHead; Field != NULL; Field = Field->next)
+ {
+ if (Field->File == File && Field->Var != NULL)
+ {
+ /* from variable to file */
+ VariantType variant;
+ CLEAR_VARIANT (&variant);
+
+ if (Field->FieldOffset < 0)
+ {
+ WARN_FIELD_OVERFLOW;
+ return;
+ }
+ if (Field->FieldLength <= 0)
+ {
+ WARN_FIELD_OVERFLOW;
+ return;
+ }
+ if ((Field->FieldOffset + Field->FieldLength) > File->width)
+ {
+ WARN_FIELD_OVERFLOW;
+ return;
+ }
+ /* if( TRUE ) */
+ {
+ int i;
+
+ for (i = 0; i < Field->Var->dimensions; i++)
+ {
+ Field->Var->VINDEX[i] = Field->VINDEX[i];
+ }
+ }
+ if (var_get (Field->Var, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return;
+ }
+ if (variant.VariantTypeCode != StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ return;
+ }
+ /* if( TRUE ) */
+ {
+ int i;
+ int n;
+ char *Buffer;
+
+ i = 0;
+ n = 0;
+ Buffer = File->buffer;
+ Buffer += Field->FieldOffset;
+
+ if (variant.Buffer != NULL)
+ {
+ n = MIN (variant.Length, Field->FieldLength);
+ }
+ for (i = 0; i < n; i++)
+ {
+ Buffer[i] = variant.Buffer[i];
+ }
+ for (i = n; i < Field->FieldLength; i++)
+ {
+ /* Pad on the right with spaces */
+ Buffer[i] = ' ';
+ }
+ }
+ RELEASE_VARIANT (&variant);
+ }
+ }
+}
+
+
+LineType *
+bwb_FIELD (LineType * l)
+{
+ FileType *File;
+ int FileNumber;
+ int FieldOffset;
+
+ assert (l != NULL);
+
+ FileNumber = 0;
+ FieldOffset = 0;
+
+ /* first read device number */
+ if (line_skip_FilenumChar (l))
+ {
+ /* optional */
+ }
+ if (line_read_integer_expression (l, &FileNumber) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (FileNumber <= 0)
+ {
+ /* FIELD # 0 is an error */
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ File = find_file_by_number (FileNumber);
+ if (File == NULL)
+ {
+ WARN_BAD_FILE_NUMBER;
+ return (l);
+ }
+ if (File->DevMode != DEVMODE_RANDOM)
+ {
+ WARN_BAD_FILE_MODE;
+ return (l);
+ }
+ /* loop to read variables */
+
+
+ /* read the comma and advance beyond it */
+ while (line_skip_seperator (l))
+ {
+ int FieldLength;
+ VariableType *variable;
+ VariantType variant;
+
+ CLEAR_VARIANT (&variant);
+
+ /* first find the size of the field */
+ FieldLength = 0;
+ if (line_read_integer_expression (l, &FieldLength) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (FieldLength <= 0)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ /* read the AS */
+ if (line_skip_word (l, "AS") == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ /* read the string variable name */
+ if ((variable = line_read_scalar (l)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+
+ if (VAR_IS_STRING (variable))
+ {
+ /* OK */
+ }
+ else
+ {
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+ /* check for overflow of record length */
+ if ((FieldOffset + FieldLength) > File->width)
+ {
+ WARN_FIELD_OVERFLOW;
+ return (l);
+ }
+ /* set buffer */
+ variant.VariantTypeCode = StringTypeCode;
+ /* if( TRUE ) */
+ {
+ FieldType *Field;
+ int i;
+
+ Field = field_new ();
+ if (Field == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (l);
+ }
+ Field->File = File;
+ Field->FieldOffset = FieldOffset;
+ Field->FieldLength = FieldLength;
+ Field->Var = variable;
+ for (i = 0; i < variable->dimensions; i++)
+ {
+ Field->VINDEX[i] = variable->VINDEX[i];
+ }
+ variant.Length = FieldLength;
+ if ((variant.Buffer =
+ (char *) calloc (variant.Length + 1 /* NulChar */ ,
+ sizeof (char))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return (l);
+ }
+ bwb_memset (variant.Buffer, ' ', variant.Length);
+ variant.Buffer[variant.Length] = NulChar;
+ }
+ if (var_set (variable, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ RELEASE_VARIANT (&variant);
+ FieldOffset += FieldLength;
+ }
+ /* return */
+ return (l);
+}
+
+/***************************************************************
+
+ FUNCTION: bwb_lset()
+
+ DESCRIPTION: This C function implements the BASIC
+ LSET command.
+
+ SYNTAX: LSET string-variable$ = expression
+
+***************************************************************/
+
+LineType *
+bwb_LSET (LineType * l)
+{
+
+ assert (l != NULL);
+ return dio_lrset (l, FALSE);
+}
+
+/***************************************************************
+
+ FUNCTION: bwb_rset()
+
+ DESCRIPTION: This C function implements the BASIC
+ RSET command.
+
+ SYNTAX: RSET string-variable$ = expression
+
+***************************************************************/
+
+LineType *
+bwb_RSET (LineType * l)
+{
+
+ assert (l != NULL);
+ return dio_lrset (l, TRUE);
+}
+
+/***************************************************************
+
+ FUNCTION: dio_lrset()
+
+ DESCRIPTION: This C function implements the BASIC
+ RSET and LSET commands.
+
+***************************************************************/
+
+static LineType *
+dio_lrset (LineType * l, int rset)
+{
+ /* LSET and RSET */
+ VariantType variant;
+ int n;
+ int i;
+ int startpos;
+ VariableType *v;
+ VariantType t;
+ VariantType *T;
+
+ assert (l != NULL);
+
+ T = &t;
+ CLEAR_VARIANT (T);
+ CLEAR_VARIANT (&variant);
+ /* get the variable */
+ if ((v = line_read_scalar (l)) == NULL)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ if (VAR_IS_STRING (v) == FALSE)
+ {
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+
+ /* skip the equals sign */
+ if (line_skip_EqualChar (l) == FALSE)
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+
+ /* get the value */
+ if (line_read_expression (l, T) == FALSE) /* dio_lrset */
+ {
+ WARN_SYNTAX_ERROR;
+ return (l);
+ }
+ if (T->VariantTypeCode != StringTypeCode)
+ {
+ WARN_TYPE_MISMATCH;
+ return (l);
+ }
+ if (var_get (v, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* determine starting position */
+ startpos = 0;
+ if (rset == TRUE && T->Length < variant.Length)
+ {
+ /*
+ LET A$ = "123_456" ' variant.Length = 7
+ LET B$ = "789" ' T->Length = 3
+ RSET A$ = B$ ' startpos = 4
+ PRINT "[";A$;"]" ' [123_789]
+ */
+ startpos = variant.Length - T->Length;
+ }
+ /* write characters to new position */
+ for (n = startpos, i = 0;
+ (n < (int) variant.Length) && (i < (int) T->Length); n++, i++)
+ {
+ variant.Buffer[n] = T->Buffer[i];
+ }
+ if (var_set (v, &variant) == FALSE)
+ {
+ WARN_VARIABLE_NOT_DECLARED;
+ return (l);
+ }
+ /* OK */
+ RELEASE_VARIANT (T);
+ RELEASE_VARIANT (&variant);
+
+ return (l);
+}
+
+/* EOF */
diff --git a/Junk/bwbasic.c b/Junk/bwbasic.c
new file mode 100644
index 0000000..cfd80f2
--- /dev/null
+++ b/Junk/bwbasic.c
@@ -0,0 +1,3641 @@
+/***************************************************************
+
+ bwbasic.c Main Program File
+ for Bywater BASIC Interpreter
+
+ Copyright (c) 1993, Ted A. Campbell
+ Bywater Software
+
+ email: tcamp@delphi.com
+
+ Copyright and Permissions Information:
+
+ All U.S. and international rights are claimed by the author,
+ Ted A. Campbell.
+
+ This software 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.
+
+***************************************************************/
+
+/*---------------------------------------------------------------*/
+/* NOTE: Modifications marked "JBV" were made by Jon B. Volkoff, */
+/* 11/1995 (eidetics@cerf.net). */
+/* */
+/* Those additionally marked with "DD" were at the suggestion of */
+/* Dale DePriest (daled@cadence.com). */
+/* */
+/* Version 3.00 by Howard Wulf, AF5NE */
+/* */
+/* Version 3.10 by Howard Wulf, AF5NE */
+/* */
+/* Version 3.20 by Howard Wulf, AF5NE */
+/* */
+/* Version 3.20A by Ken Martin */
+/* */
+/*---------------------------------------------------------------*/
+
+
+
+#include "bwbasic.h"
+
+static void break_handler (void);
+static void break_mes (int x);
+static int bwb_init (void);
+static void bwb_initialize_warnings (void);
+static void bwb_interact (void);
+static int bwb_ladd (char *buffer, LineType * p, int IsUser);
+static void bwb_single_step (char *buffer);
+static void bwb_xtxtline (char *buffer);
+static int bwx_signon (void);
+static void execute_profile (char *FileName);
+static void execute_program (char *FileName);
+static char *FindClassicStatementEnd (char *C);
+static int FixQuotes (char *tbuf);
+static void ImportClassicIfThenElse (char *InBuffer);
+static int is_ln (char *buffer);
+static int is_numconst (char *buffer);
+static void mark_preset_variables (void);
+static FILE *nice_open (char *BaseName);
+static void process_basic_line (char *buffer);
+
+GlobalType *My = NULL;
+
+static char *Banner[] = {
+ "######## ## ## ## ## ### ######## ######## ######## ",
+ "## ## ## ## ## ## ## ## ## ## ## ## ## ",
+ "## ## #### ## ## ## ## ## ## ## ## ## ",
+ "######## ## ## ## ## ## ## ## ###### ######## ",
+ "## ## ## ## ## ## ######### ## ## ## ## ",
+ "## ## ## ## ## ## ## ## ## ## ## ## ",
+ "######## ## ### ### ## ## ## ######## ## ## ",
+ " ",
+ " ######## ### ###### #### ###### ",
+ " ## ## ## ## ## ## ## ## ##",
+ " ## ## ## ## ## ## ## ",
+ " ######## ## ## ###### ## ## ",
+ " ## ## ######### ## ## ## ",
+ " ## ## ## ## ## ## ## ## ##",
+ " ######## ## ## ###### #### ###### ",
+ " ",
+ "Bywater BASIC Interpreter, version 3.20A ",
+ "Copyright (c) 1993, Ted A. Campbell ",
+ "Copyright (c) 1995-1997 , Jon B. Volkoff ",
+ "Copyright (c) 2014-2017 , Howard Wulf, AF5NE ",
+ "Copyright (c) 11/2019 , Ken Martin ",
+ " ",
+ NULL
+};
+
+#define NUM_WARNINGS 80
+
+static char *ERROR4[NUM_WARNINGS];
+
+static void
+bwb_initialize_warnings (void)
+{
+ int i;
+ for (i = 0; i < NUM_WARNINGS; i++)
+ {
+ ERROR4[i] = NULL;
+ }
+ ERROR4[1] = "NEXT without FOR";
+ ERROR4[2] = "Syntax error";
+ ERROR4[3] = "RETURN without GOSUB";
+ ERROR4[4] = "Out of DATA";
+ ERROR4[5] = "Illegal function call";
+ ERROR4[6] = "Overflow";
+ ERROR4[7] = "Out of memory";
+ ERROR4[8] = "Undefined line";
+ ERROR4[9] = "Subscript out of range";
+ ERROR4[10] = "Redimensioned array";
+ ERROR4[11] = "Division by zero";
+ ERROR4[12] = "Illegal direct";
+ ERROR4[13] = "Type mismatch";
+ ERROR4[14] = "Out of string space";
+ ERROR4[15] = "String too long";
+ ERROR4[16] = "String formula too complex";
+ ERROR4[17] = "Can't continue";
+ ERROR4[18] = "Undefined user function";
+ ERROR4[19] = "No RESUME";
+ ERROR4[20] = "RESUME without error";
+ ERROR4[21] = "Unprintable error";
+ ERROR4[22] = "Missing operand";
+ ERROR4[23] = "Line buffer overflow";
+ ERROR4[26] = "FOR without NEXT";
+ ERROR4[27] = "Bad DATA";
+ ERROR4[29] = "WHILE without WEND";
+ ERROR4[30] = "WEND without WHILE";
+ ERROR4[31] = "EXIT FUNCTION without FUNCTION";
+ ERROR4[32] = "END FUNCTION without FUNCTION";
+ ERROR4[33] = "EXIT SUB without SUB";
+ ERROR4[34] = "END SUB without SUB";
+ ERROR4[35] = "EXIT FOR without FOR";
+ ERROR4[50] = "Field overflow";
+ ERROR4[51] = "Internal error";
+ ERROR4[52] = "Bad file number";
+ ERROR4[53] = "File not found";
+ ERROR4[54] = "Bad file mode";
+ ERROR4[55] = "File already open";
+ ERROR4[57] = "Disk I/O error";
+ ERROR4[58] = "File already exists";
+ ERROR4[61] = "Disk full";
+ ERROR4[62] = "Input past end";
+ ERROR4[63] = "Bad record number";
+ ERROR4[64] = "Bad file name";
+ ERROR4[66] = "Direct statement in file";
+ ERROR4[67] = "Too many files";
+ ERROR4[70] = "Variable Not Declared";
+ ERROR4[73] = "Advanced Feature";
+}
+
+/***************************************************************
+
+ FUNCTION: bwx_terminate()
+
+ DESCRIPTION: This function terminates program execution.
+
+***************************************************************/
+
+void
+bwx_terminate (void)
+{
+
+ exit (0);
+}
+
+
+
+/***************************************************************
+
+ FUNCTION: break_handler()
+
+ DESCRIPTION: This function is called by break_mes()
+ and handles program interruption by break
+ (or by the STOP command).
+
+***************************************************************/
+static void
+break_handler (void)
+{
+ /*
+ **
+ **
+ */
+ assert( My != NULL );
+
+ My->AutomaticLineNumber = 0;
+ My->AutomaticLineIncrement = 0;
+
+ if (My->IsInteractive)
+ {
+ /* INTERACTIVE: terminate program */
+
+ /* reset all stack counters */
+ bwb_clrexec ();
+ SetOnError (0);
+
+ My->ERR = -1; /* in break_handler() */
+
+
+ /* reset the break handler */
+ signal (SIGINT, break_mes);
+
+ longjmp (My->mark, -1);
+
+
+ return;
+ }
+ /* NOT INTERACTIVE: terminate immediately */
+ bwx_terminate ();
+}
+
+/***************************************************************
+
+ FUNCTION: break_mes()
+
+ DESCRIPTION: This function is called (a) by a SIGINT
+ signal or (b) by bwb_STOP via bwx_STOP.
+ It prints an error message then calls
+ break_handler() to terminate the program.
+
+***************************************************************/
+
+static void
+break_mes (int x /* Parameter 'x' is never used */ )
+{
+ /*
+ **
+ ** break_mes is FATAL.
+ ** x == SIGINT for control-C
+ ** x == 0 for bwx_STOP
+ **
+ */
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+ assert( My->CurrentVersion != NULL );
+
+
+ if (My->ERR < 0) /* in break_mes(), do not make a bad situation worse */
+ {
+ /* an error has already ben reported */
+ }
+ else
+ {
+ fputc ('\n', My->SYSOUT->cfp);
+ ResetConsoleColumn ();
+ if (My->CurrentVersion->OptionVersionValue & (C77))
+ {
+ if (is_empty_string (My->ProgramFilename) == FALSE)
+ {
+ fprintf (My->SYSOUT->cfp, "FILE:%s, ", My->ProgramFilename);
+ }
+ }
+ fprintf (My->SYSOUT->cfp, "Program interrupted");
+ if (My->ThisLine) /* break_mes */
+ {
+ if (My->ThisLine->LineFlags & (LINE_USER)) /* break_mes */
+ {
+ /* don't print the line number */
+ }
+ else
+ {
+ fprintf (My->SYSOUT->cfp, " at line %d", My->ThisLine->number); /* break_mes */
+ }
+ }
+ fputc ('\n', My->SYSOUT->cfp);
+ ResetConsoleColumn ();
+ fflush (My->SYSOUT->cfp);
+ }
+ break_handler ();
+}
+
+extern void
+bwx_STOP (int IsShowMessage)
+{
+
+ if (IsShowMessage)
+ {
+ break_mes (0);
+ }
+ else
+ {
+ break_handler ();
+ }
+}
+
+static int
+bwx_signon (void)
+{
+ /*
+ **
+ ** Display a sign-on banner.
+ ** NOT called if a file is provided on the command line.
+ **
+ */
+ int i;
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+
+ for (i = 0; Banner[i] != NULL; i++)
+ {
+ fprintf (My->SYSOUT->cfp, "%s\n", Banner[i]);
+ }
+ ResetConsoleColumn ();
+ return TRUE;
+}
+
+
+
+DoubleType
+bwx_TIMER (DoubleType Seconds)
+{
+ /*
+ **
+ ** Return a number representing Seconds in the future. Seconds >= 0.
+ ** Seconds may be non-integer, such as 0.001 or 86399.999. The
+ ** maximum allowed Seconds is MAXDBL. This is used two ways:
+ **
+ ** 1) in bwb_TIMER(), the ON TIMER count (>0) is used to determine
+ ** the expiration time. In this case, simply return what the value
+ ** will be in the future. Note that ON TIMER enforces
+ ** Seconds > (1 / CLOCKS_PER_SEC), and
+ **
+ ** 2) in bwb_execline(), zero (=0) is used to determine the current
+ ** time and compare it to #1. In this case, simply return what the
+ ** value is now.
+ **
+ ** Both the resolution of the timer, and the frequency of update,
+ ** are implementation defined.
+ **
+ */
+
+ if (Seconds < 0)
+ {
+ WARN_INTERNAL_ERROR;
+ return 0;
+ }
+ else
+ {
+ DoubleType Result;
+ Result = clock ();
+ assert (CLOCKS_PER_SEC > 0);
+ Result /= CLOCKS_PER_SEC;
+ if (Seconds > 0)
+ {
+ Result += Seconds;
+ }
+ return Result;
+ }
+}
+
+void
+CleanLine (char *buffer)
+{
+ /*
+ **
+ ** cleanup the line, so it is easier to parse
+ **
+ */
+ char *newbuffer;
+
+
+
+ if (is_empty_string (buffer))
+ {
+ /* do nothing */
+ return;
+ }
+
+ /* remove CR/LF */
+ newbuffer = bwb_strchr (buffer, '\r');
+ if (newbuffer != NULL)
+ {
+ *newbuffer = NulChar;
+ }
+ newbuffer = bwb_strchr (buffer, '\n');
+ if (newbuffer != NULL)
+ {
+ *newbuffer = NulChar;
+ }
+
+ /* remove ALL embedded control characters */
+ /* if you want a control character, then use CHR$ */
+ newbuffer = buffer;
+ while (*newbuffer != NulChar)
+ {
+ if (bwb_isprint (*newbuffer))
+ {
+ /* OK */
+ }
+ else
+ {
+ *newbuffer = ' ';
+ }
+ newbuffer++;
+ }
+ /* LTRIM$ */
+ newbuffer = buffer;
+ if (*newbuffer != NulChar)
+ {
+ /* not an empty line, so remove one (or more) leading spaces */
+ while (*newbuffer == ' ')
+ {
+ newbuffer++;
+ }
+ if (newbuffer > buffer)
+ {
+ bwb_strcpy (buffer, newbuffer);
+ }
+ }
+ /* RTRIM$ */
+ newbuffer = buffer;
+ if (*newbuffer != NulChar)
+ {
+ /* not an empty line, so remove one (or more) trailing spaces */
+ char *E;
+
+ E = bwb_strchr (newbuffer, NulChar);
+ E--;
+ while (E >= newbuffer && *E == ' ')
+ {
+ *E = NulChar;
+ E--;
+ }
+ }
+}
+
+static int
+bwb_init (void)
+{
+ /*
+ **
+ ** initialize Bywater BASIC
+ **
+ */
+ int n;
+ static char start_buf[] = "";
+ static char end_buf[] = "";
+
+ /* Memory allocation */
+ if ((My = (GlobalType *) calloc (1, sizeof (GlobalType))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->MaxLenBuffer =
+ (char *) calloc (MAXLEN + 1 /* NulChar */ , sizeof (char))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->NumLenBuffer =
+ (char *) calloc (NUMLEN + 1 /* NulChar */ , sizeof (char))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->ConsoleOutput =
+ (char *) calloc (MAX_LINE_LENGTH + 1 /* NulChar */ ,
+ sizeof (char))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->ConsoleInput =
+ (char *) calloc (MAX_LINE_LENGTH + 1 /* NulChar */ ,
+ sizeof (char))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->SYSIN = (FileType *) calloc (1, sizeof (FileType))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->SYSOUT = (FileType *) calloc (1, sizeof (FileType))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->SYSPRN = (FileType *) calloc (1, sizeof (FileType))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->StartMarker = (LineType *) calloc (1, sizeof (LineType))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->UserMarker = (LineType *) calloc (1, sizeof (LineType))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->EndMarker = (LineType *) calloc (1, sizeof (LineType))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->EndMarker = (LineType *) calloc (1, sizeof (LineType))) == NULL)
+ {
+ return FALSE;
+ }
+ if ((My->ERROR4 =
+ (char *) calloc (MAX_ERR_LENGTH + 1 /* NulChar */ ,
+ sizeof (char))) == NULL)
+ {
+ return FALSE;
+ }
+
+ My->CurrentVersion = &bwb_vertable[0];
+ My->IsInteractive = TRUE;
+ My->OptionSleepDouble = 1;
+ My->OptionIndentInteger = 2;
+ My->OptionTerminalType = C_OPTION_TERMINAL_NONE;
+ My->OptionRoundType = C_OPTION_ROUND_BANK;
+ My->NextValidLineNumber = MINLIN;
+ My->IncludeLevel = 0; /* %INCLUDE */
+ My->IsCommandLineFile = FALSE;
+ My->ExternalInputFile = NULL; /* for automated testing, --TAPE command line parameter */
+ My->IsPrinter = FALSE; /* CBASIC-II: CONSOLE and LPRINTER commands */
+ My->OptionPromptString = DEF_PROMPT;
+ My->OptionEditString = DEF_EDITOR;
+ My->OptionFilesString = DEF_FILES;
+ My->OptionRenumString = DEF_RENUM;
+ My->OptionExtensionString = DEF_EXTENSION;
+ My->OptionScaleInteger = 0;
+ My->OptionDigitsInteger = SIGNIFICANT_DIGITS;
+ My->OptionZoneInteger = ZONE_WIDTH;
+ My->UseParameterString = NULL;
+ My->ProgramFilename = NULL;
+
+ My->StartMarker->number = MINLIN - 1;
+ My->StartMarker->next = My->EndMarker;
+ My->StartMarker->position = 0;
+ My->StartMarker->buffer = start_buf;
+
+ My->EndMarker->number = MAXLIN + 1;
+ My->EndMarker->next = My->EndMarker;
+ My->EndMarker->position = 0;
+ My->EndMarker->buffer = end_buf;
+
+ My->UserMarker->number = MINLIN - 1;
+ My->UserMarker->next = My->EndMarker;
+ My->UserMarker->position = 0;
+ My->UserMarker->buffer = NULL;
+
+ My->DataLine = My->EndMarker;
+ My->DataPosition = 0;
+
+ My->StackHead = NULL;
+ My->StackDepthInteger = 0;
+
+ My->FieldHead = NULL;
+
+ My->VirtualHead = NULL;
+ My->FileHead = NULL;
+ My->ThisLine = My->StartMarker; /* bwb_init */
+
+ My->SYSIN->DevMode = DEVMODE_INPUT;
+ My->SYSIN->width = 80;
+ My->SYSIN->col = 1;
+ My->SYSIN->row = 1;
+ My->SYSIN->delimit = ',';
+ My->SYSIN->cfp = stdin;
+
+ My->SYSOUT->DevMode = DEVMODE_OUTPUT;
+ My->SYSOUT->width = 80;
+ My->SYSOUT->col = 1;
+ My->SYSOUT->row = 1;
+ My->SYSOUT->delimit = ',';
+ My->SYSOUT->cfp = stdout;
+
+ My->SYSPRN->DevMode = DEVMODE_OUTPUT;
+ My->SYSPRN->width = 80;
+ My->SYSPRN->col = 1;
+ My->SYSPRN->row = 1;
+ My->SYSPRN->delimit = ',';
+ My->SYSPRN->cfp = stderr;
+
+ My->LPRINT_NULLS = 0;
+ My->SCREEN_ROWS = 24;
+
+ /* OPEN #0 is an ERROR. */
+ /* CLOSE #0 is an ERROR. */
+ /* WIDTH #0, 80 is the same as WIDTH 80. */
+ /* LPRINT and LLIST are sent to bwx_LPRINT() */
+
+ /* default variable type */
+ for (n = 0; n < 26; n++)
+ {
+ My->DefaultVariableType[n] = DoubleTypeCode;
+ }
+ /* default COMMAND$(0-9) */
+ for (n = 0; n < 10; n++)
+ {
+ My->COMMAND4[n] = NULL;
+ }
+
+ /* initialize tables of variables, functions */
+ bwb_initialize_warnings ();
+ SortAllCommands ();
+ SortAllFunctions ();
+ SortAllOperators ();
+ var_init ();
+ IntrinsicFunction_init ();
+ UserFunction_init ();
+ OptionVersionSet (0);
+ /* OK */
+ return TRUE;
+}
+
+/***************************************************************
+
+ FUNCTION: main()
+
+ DESCRIPTION: As in any C program, main() is the basic
+ function from which the rest of the
+ program is called. Some environments,
+ however, provide their own main() functions
+ (Microsoft Windows (tm) is an example).
+ In these cases, the following code will
+ have to be included in the initialization
+ function that is called by the environment.
+
+***************************************************************/
+
+static void
+process_basic_line (char *buffer)
+{
+ CleanLine (buffer);
+ if (is_empty_string (buffer))
+ {
+ /* empty -- do nothing */
+ }
+ else if (is_ln (buffer) == FALSE)
+ {
+ /* If there is no line number, then execute the line as received */
+ /* RUN */
+ WARN_CLEAR; /* process_basic_line */
+ SetOnError (0);
+ bwb_xtxtline (buffer); /* process_basic_line */
+ }
+ else if (is_numconst (buffer) == TRUE)
+ {
+ /*-----------------------------------------------------------------*/
+ /* Another possibility: if buffer is a numeric constant, */
+ /* then delete the indicated line number (JBV) */
+ /*-----------------------------------------------------------------*/
+ /* 100 */
+ int LineNumber;
+ LineNumber = atoi (buffer);
+ WARN_CLEAR; /* process_basic_line */
+ SetOnError (0);
+ sprintf (buffer, "delete %d", LineNumber);
+ bwb_xtxtline (buffer); /* process_basic_line */
+ }
+ else
+ {
+ /* If there is a line number, then add it to the BASIC program */
+ /* 100 REM */
+ bwb_ladd (buffer, My->StartMarker, FALSE);
+ }
+}
+static void
+bwb_single_step (char *buffer)
+{
+ assert( My != NULL );
+ assert (buffer != NULL);
+
+ process_basic_line (buffer);
+ while (My->StackHead != NULL)
+ {
+ bwb_execline ();
+ }
+}
+
+static void
+mark_preset_variables (void)
+{
+ /* mark all existing variables as preset */
+ /* this includes all variables declared in any PROFILE */
+ VariableType *v;
+ assert( My != NULL );
+
+
+ for (v = My->VariableHead; v != NULL; v = v->next)
+ {
+ v->VariableFlags |= VARIABLE_PRESET;
+ v->VariableFlags |= VARIABLE_COMMON;
+ }
+}
+
+
+static void
+execute_profile (char *FileName)
+{
+ FILE *profile;
+ assert( My != NULL );
+ assert (FileName != NULL);
+
+ My->NextValidLineNumber = MINLIN;
+ profile = fopen (FileName, "r");
+ if (profile == NULL)
+ {
+ /* NOT FOUND */
+ /* OPTIONAL */
+ return;
+ }
+ /* FOUND */
+ if (My->IsInteractive)
+ {
+ /*
+ **
+ ** set a buffer for jump: program execution returns to this point in
+ ** case of a jump (error, interrupt, or finish program)
+ **
+ */
+ My->program_run = 0;
+ signal (SIGINT, break_mes);
+ setjmp (My->mark);
+ if (My->program_run > 0)
+ {
+ /* error in PROFILE */
+ exit (1);
+ }
+ My->program_run++;
+ }
+
+ /*
+ The profile only exists to allow executing OPTION ... commands. No other use is supported.
+ */
+ {
+ char *tbuf;
+ int tlen;
+
+ tbuf = My->ConsoleInput;
+ tlen = MAX_LINE_LENGTH;
+ while (fgets (tbuf, tlen, profile)) /* execute_profile */
+ {
+ tbuf[tlen] = NulChar;
+ bwb_single_step (tbuf); /* in execute_profile() */
+ }
+ bwb_fclose (profile);
+ mark_preset_variables ();
+ }
+}
+
+
+
+static void
+execute_program (char *FileName)
+{
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+
+ assert (FileName != NULL);
+
+ My->NextValidLineNumber = MINLIN;
+ My->IsCommandLineFile = TRUE;
+ if (bwb_fload (FileName) == FALSE)
+ {
+ fprintf (My->SYSOUT->cfp, "Failed to open file %s\n", FileName);
+ /* the file load has failed, so do NOT run the program */
+ exit (1);
+ }
+ if (My->ERR < 0 /* in execute_program(), file load failed */ )
+ {
+ /* the file load has failed, so do NOT run the program */
+ exit (1);
+ }
+ bwb_RUN (My->StartMarker);
+}
+
+extern int
+main (int argc, char **argv)
+{
+ int i;
+ assert (argc >= 0);
+ assert (argv != NULL);
+
+ if (bwb_init () == FALSE)
+ {
+ /* FATAL */
+ puts ("Out of memory");
+ return 1;
+ }
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+ assert( My->SYSIN != NULL );
+ assert( My->SYSIN->cfp != NULL );
+
+ /* Signon message banner */
+ if (argc < 2)
+ {
+ /* no parameters */
+ if (My->IsInteractive)
+ {
+ bwx_signon ();
+ }
+ else
+ {
+ /* if INTERACTIVE is FALSE, then we must have a program file */
+ fputs ("Program file not specified\n", My->SYSOUT->cfp);
+ return 1;
+ }
+ }
+
+ if (My->IsInteractive)
+ {
+ /*
+ **
+ ** set a buffer for jump: program execution returns to this point in
+ ** case of a jump (error, interrupt, or finish program)
+ **
+ */
+ My->program_run = 0;
+ signal (SIGINT, break_mes);
+ setjmp (My->mark);
+ if (My->program_run > 0)
+ {
+ /* error in profile */
+ return 1;
+ }
+ My->program_run++;
+ }
+
+#if PROFILE
+ execute_profile (PROFILENAME);
+#endif
+
+ /* check to see if there is a program file: but do this only the first time around! */
+ for (i = 1; i < argc; i++)
+ {
+ /*
+ SYNTAX: bwbasic [ --profile profile.bas ] [ --tape tapefile.inp ] [ program.bas ]
+ */
+ if (bwb_stricmp (argv[i], "--profile") == 0
+ || bwb_stricmp (argv[i], "-p") == 0
+ || bwb_stricmp (argv[i], "/profile") == 0
+ || bwb_stricmp (argv[i], "/p") == 0)
+ {
+ i++;
+ if (i < argc)
+ {
+ /* --profile profile.bas */
+ execute_profile (argv[i]);
+ }
+ }
+ else
+ if (bwb_stricmp (argv[i], "--tape") == 0
+ || bwb_stricmp (argv[i], "-t") == 0
+ || bwb_stricmp (argv[i], "/tape") == 0
+ || bwb_stricmp (argv[i], "/t") == 0)
+ {
+ i++;
+ if (i < argc)
+ {
+ /* --tape tapefile.inp */
+ My->ExternalInputFile = fopen (argv[i], "r");
+ }
+ }
+ else
+ {
+ /* program.bas */
+ {
+ int j;
+ int n;
+
+ j = i;
+ for (n = 0; n < 10 && j < argc; n++, j++)
+ {
+ My->COMMAND4[n] = argv[j];
+ }
+ }
+ execute_program (argv[i]);
+ break;
+ }
+ }
+
+ if (My->IsInteractive)
+ {
+ /*
+ **
+ ** set a buffer for jump: program execution returns to this point in
+ ** case of a jump (error, interrupt, or finish program)
+ **
+ */
+ My->program_run = 0;
+ signal (SIGINT, break_mes);
+ setjmp (My->mark);
+ if (My->program_run > 0)
+ {
+ /* error in console mode */
+ }
+ My->program_run++;
+ }
+
+ /* main program loop */
+ My->NextValidLineNumber = MINLIN;
+ while (!feof (My->SYSIN->cfp)) /* condition !feof( My->SYSIN->cfp ) added in v1.11 */
+ {
+ bwb_mainloop ();
+ }
+
+ bwx_terminate (); /* allow ^D (Unix) exit with grace */
+
+ return 0;
+}
+
+
+
+/***************************************************************
+
+ FUNCTION: bwb_interact()
+
+ DESCRIPTION: This function gets a line from the user
+ and processes it.
+
+***************************************************************/
+
+static void
+bwb_interact (void)
+{
+ char *tbuf;
+ int tlen;
+ assert( My != NULL );
+
+
+ tbuf = My->ConsoleInput;
+ tlen = MAX_LINE_LENGTH;
+ My->NextValidLineNumber = MINLIN;
+ /* take input from keyboard */
+ if (My->AutomaticLineNumber > 0 && My->AutomaticLineIncrement > 0)
+ {
+ /* AUTO 100, 10 */
+ char *zbuf; /* end of the prompt, start of the response */
+ int zlen; /* length of the prompt */
+ char LineExists;
+ LineType *l;
+
+ LineExists = ' ';
+ for (l = My->StartMarker->next; l != My->EndMarker; l = l->next)
+ {
+ if (l->number == My->AutomaticLineNumber)
+ {
+ /* FOUND */
+ LineExists = '*';
+ break;
+ }
+ else if (l->number > My->AutomaticLineNumber)
+ {
+ /* NOT FOUND */
+ LineExists = ' ';
+ break;
+ }
+ }
+ sprintf (tbuf, "%d%c", My->AutomaticLineNumber, LineExists);
+ zbuf = bwb_strchr (tbuf, NulChar);
+ zlen = bwb_strlen (tbuf);
+ bwx_input (tbuf, FALSE, zbuf, tlen - zlen);
+ zbuf[-1] = ' '; /* remove LineExists indicator */
+ CleanLine (zbuf); /* JBV */
+ if (is_empty_string (zbuf))
+ {
+ /* empty response */
+ if (LineExists == '*')
+ {
+ /*
+ An empty response with an existing line,
+ causes AUTO to continue with the next line,
+ leaving the current line intact.
+ */
+ My->AutomaticLineNumber += My->AutomaticLineIncrement;
+ }
+ else
+ {
+ /*
+ An empty response with a non-existing line,
+ causes AUTO to terminate.
+ */
+ My->AutomaticLineNumber = 0;
+ My->AutomaticLineIncrement = 0;
+ }
+ }
+ else
+ {
+ /* non-empty response */
+ if (bwb_stricmp (zbuf, "MAN") == 0)
+ {
+ /* MAN terminates AUTO mode */
+ My->AutomaticLineNumber = 0;
+ My->AutomaticLineIncrement = 0;
+ }
+ else
+ {
+ /* overwrite any existing line */
+ bwb_ladd (tbuf, My->StartMarker, FALSE);
+ My->AutomaticLineNumber += My->AutomaticLineIncrement;
+ }
+ }
+ }
+ else
+ {
+ bwx_input (My->OptionPromptString, FALSE, tbuf, tlen);
+ process_basic_line (tbuf);
+ }
+}
+
+
+
+/***************************************************************
+
+ FUNCTION: bwb_fload()
+
+ DESCRIPTION: This function loads a BASIC program
+ file into memory given a FILE pointer.
+
+***************************************************************/
+
+static int
+FixQuotes (char *tbuf)
+{
+ /* fix unbalanced quotes */
+ /* 'tbuf' shall be declared "char tbuf[ tlen + 1]". */
+ int p;
+ int QuoteCount;
+ int tlen;
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ assert (tbuf != NULL);
+
+ QuoteCount = 0;
+ tlen = MAX_LINE_LENGTH;
+ tbuf[tlen] = NulChar;
+ p = 0;
+ while (tbuf[p])
+ {
+ if (tbuf[p] == My->CurrentVersion->OptionQuoteChar)
+ {
+ QuoteCount++;
+ }
+ p++;
+ }
+ if (QuoteCount & 1)
+ {
+ /* odd == missing trailing quote */
+ if (p < tlen)
+ {
+ /* we have room to put the missig quote */
+ tbuf[p] = My->CurrentVersion->OptionQuoteChar;
+ p++;
+ tbuf[p] = NulChar;
+ }
+ else
+ {
+ /* we cannot fix it */
+ return FALSE;
+ }
+ }
+ /* OK */
+ return TRUE;
+}
+
+static FILE *
+nice_open (char *BaseName)
+{
+ FILE *file;
+ assert( My != NULL );
+
+ if (BaseName == NULL)
+ {
+ BaseName = My->ProgramFilename;
+ }
+ if (is_empty_string (BaseName))
+ {
+ WARN_BAD_FILE_NAME;
+ return NULL;
+ }
+
+ file = fopen (BaseName, "r");
+ if (file == NULL)
+ if (is_empty_string (My->OptionExtensionString) == FALSE)
+ {
+ char *FileName;
+
+ FileName = bwb_strdup2 (BaseName, My->OptionExtensionString);
+ if (FileName == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return NULL;
+ }
+ file = fopen (FileName, "r");
+ if (file == NULL)
+ {
+ free (FileName);
+ }
+ else if (BaseName == My->ProgramFilename)
+ {
+ if (My->ProgramFilename != NULL)
+ {
+ free (My->ProgramFilename);
+ }
+ My->ProgramFilename = FileName;
+ }
+ }
+ return file;
+}
+
+extern int
+bwb_fload (char *FileName)
+{
+ /*
+ **
+ ** Load a BASIC program from the specified 'FileName'.
+ ** If 'FileName' is NULL, then load from My->ProgramFilename,
+ **
+ */
+ char *Magic_Word; /* SYNTAX: %INCLUDE literal.file.name */
+ int Magic_Length;
+ FILE *file;
+ char *tbuf;
+ int tlen;
+
+
+
+
+ Magic_Word = "%INCLUDE "; /* SYNTAX: %INCLUDE literal.file.name */
+ Magic_Length = bwb_strlen (Magic_Word);
+ tbuf = My->MaxLenBuffer;
+ tlen = MAXLEN;
+
+
+ /*
+ Just in case you are wondering...
+ Although this handles the most common cases, it does not handle all possible cases.
+ The correct solution is to provide the actual filename (with extension),
+ as it exists in the operating system.
+ */
+ file = nice_open (FileName);
+ if (file == NULL)
+ {
+ WARN_BAD_FILE_NAME;
+ return FALSE;
+ }
+ My->NextValidLineNumber = MINLIN;
+ while (fgets (tbuf, tlen, file)) /* bwb_fload */
+ {
+ tbuf[tlen] = NulChar;
+ CleanLine (tbuf);
+ if (is_empty_string (tbuf))
+ {
+ /* ignore */
+ }
+ else if (bwb_strnicmp (tbuf, Magic_Word, Magic_Length) == 0)
+ {
+ /* %iNCLUDE */
+ int Result;
+ int p;
+ char varname[NameLengthMax + 1];
+
+ p = Magic_Length;
+ if (buff_read_varname (tbuf, &p, varname) == FALSE)
+ {
+ fprintf (My->SYSOUT->cfp, "%s Filename\n", Magic_Word);
+ ResetConsoleColumn ();
+ return FALSE;
+ }
+ My->IncludeLevel++; /* %INCLUDE */
+ Result = bwb_fload (varname);
+ My->IncludeLevel--; /* %INCLUDE */
+ if (Result == FALSE)
+ {
+ fprintf (My->SYSOUT->cfp, "%s %s Failed\n", Magic_Word, varname);
+ ResetConsoleColumn ();
+ return FALSE;
+ }
+ }
+ else
+ {
+ /* normal */
+ bwb_ladd (tbuf, My->StartMarker, FALSE);
+ }
+ }
+
+ /* close file stream */
+
+ bwb_fclose (file); /* file != NULL */
+
+ My->NextValidLineNumber = MINLIN;
+
+ return TRUE;
+}
+
+
+static char *
+FindClassicStatementEnd (char *C)
+{
+ /*
+ ** find the end of the current statement
+ */
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ assert (C != NULL);
+
+
+ if (My->CurrentVersion->OptionStatementChar == NulChar
+ && My->CurrentVersion->OptionCommentChar == NulChar)
+ {
+ /* DO NOTHING: Multi-statment lines are not possible */
+ return NULL;
+ }
+ /* skip line number */
+ while (bwb_isdigit (*C))
+ {
+ C++;
+ }
+ /* skip spaces */
+ while (*C == ' ')
+ {
+ C++;
+ }
+ if (IS_CHAR (*C, My->CurrentVersion->OptionCommentChar))
+ {
+ /* The entire line is a comment */
+ return NULL;
+ }
+ if (bwb_strnicmp (C, "REM", 3) == 0)
+ {
+ /* The entire line is a comment */
+ return NULL;
+ }
+ if ((My->CurrentVersion->OptionFlags & OPTION_LABELS_ON)
+ && (My->CurrentVersion->OptionStatementChar != NulChar))
+ {
+ /* determine if this line is a LABEL */
+ int p;
+ char label[NameLengthMax + 1];
+
+ p = 0;
+ if (buff_read_label (C, &p, label))
+ {
+ if (buff_skip_char (C, &p, My->CurrentVersion->OptionStatementChar))
+ {
+ if (buff_is_eol (C, &p))
+ {
+ /* The entire line is a label */
+ /* LABEL : \0 */
+ return NULL;
+ }
+ }
+ }
+ }
+ /* not a special case, so split on the first unquoted OptionCommentChar or OptionStatementChar */
+ while (*C != NulChar)
+ {
+ if (*C == My->CurrentVersion->OptionQuoteChar)
+ {
+ /* skip leading quote */
+ C++;
+ while (*C != NulChar && *C != My->CurrentVersion->OptionQuoteChar)
+ {
+ /* skip string constant */
+ C++;
+ }
+ if (*C == My->CurrentVersion->OptionQuoteChar)
+ {
+ /* skip trailing quote */
+ C++;
+ }
+ }
+ else if (IS_CHAR (*C, My->CurrentVersion->OptionCommentChar) /* ', ! */ )
+ {
+ /* FOUND */
+ return C;
+ }
+ else
+ if (IS_CHAR (*C, My->CurrentVersion->OptionStatementChar) /* :, \ */ )
+ {
+ /* FOUND */
+ return C;
+ }
+ else
+ {
+ C++;
+ }
+ }
+ /* NOT FOUND */
+ return NULL;
+}
+
+
+static void
+ImportClassicIfThenElse (char *InBuffer)
+{
+/*
+**
+** Determine the type of IF command:
+**
+** a) STANDARD:
+** IF x THEN line ELSE line
+**
+** b) CLASSIC:
+** IF x THEN stmt(s) ELSE stmt(s)
+**
+** c) STRUCTURED:
+** IF x THEN
+** stmts
+** ELSE
+** stmts
+** END IF
+**
+** The STANDARD and STRUCTURED forms
+** are natively supported.
+**
+** The CLASSIC form is converted to
+** the STRUCTURED form.
+**
+*/
+
+ int i;
+
+ int nIF = 0;
+ int nTHEN = 0;
+ int nELSE = 0;
+ int nENDIF = 0;
+
+#define NO_COMMAND 0
+#define IF_COMMAND 1
+#define THEN_COMMAND 2
+#define ELSE_COMMAND 3
+#define ENDIF_COMMAND 4
+ int LastCommand = NO_COMMAND;
+
+ const char *REM = "REM ";
+ const char *IF = "IF ";
+ const char *THEN = "THEN ";
+ const char *THEN2 = "THEN";
+ const char *ELSE = "ELSE ";
+ const char *ENDIF = "END IF";
+ const char *GOTO = "GOTO ";
+ const char *DATA = "DATA ";
+ const char *CASE = "CASE ";
+ char *OutBuffer = My->ConsoleOutput;
+ char *Input;
+ char *Output;
+ char LastChar = My->CurrentVersion->OptionStatementChar;
+
+ int REM_len = bwb_strlen (REM);
+ int IF_len = bwb_strlen (IF);
+ int THEN_len = bwb_strlen (THEN);
+ int THEN2_len = bwb_strlen (THEN2);
+ int ELSE_len = bwb_strlen (ELSE);
+ int ENDIF_len = bwb_strlen (ENDIF);
+ int GOTO_len = bwb_strlen (GOTO);
+ int DATA_len = bwb_strlen (DATA);
+ int CASE_len = bwb_strlen (CASE);
+
+#define OUTPUTCHAR( c ) { *Output = c; Output++; }
+#define COPYCHAR { LastChar = *Input; *Output = *Input; Output++; Input++; }
+#define COPY_LINENUMBER while( bwb_isdigit( *Input ) ) COPYCHAR;
+#define COPY_SPACES while( *Input == ' ' ) COPYCHAR;
+#define COPY_IF for( i = 0; i < IF_len; i++ ) COPYCHAR;
+#define COPY_THEN for( i = 0; i < THEN_len; i++ ) COPYCHAR;
+#define COPY_THEN2 for( i = 0; i < THEN2_len; i++ ) COPYCHAR;
+#define COPY_ELSE for( i = 0; i < ELSE_len; i++ ) COPYCHAR;
+#define COPY_ENDIF for( i = 0; i < ENDIF_len; i++ ) COPYCHAR;
+#define FORCE_ENDIF for( i = 0; i < ENDIF_len; i++ ) OUTPUTCHAR( ENDIF[ i ] );
+#define FORCE_GOTO for( i = 0; i < GOTO_len; i++ ) OUTPUTCHAR( GOTO[ i ] );
+#define FORCE_COLON if( LastChar != My->CurrentVersion->OptionStatementChar ) OUTPUTCHAR( My->CurrentVersion->OptionStatementChar );
+
+ assert( My != NULL );
+ assert( My->CurrentVersion != NULL );
+ assert (InBuffer != NULL);
+
+
+ Input = InBuffer;
+ Output = OutBuffer;
+
+
+
+
+
+ if (My->CurrentVersion->OptionStatementChar == NulChar)
+ {
+ /* DO NOTHING: All IFs must be STANDARD or STRUCTURED */
+ return;
+ }
+
+
+ COPY_LINENUMBER;
+ COPY_SPACES;
+ LastChar = My->CurrentVersion->OptionStatementChar;
+
+
+ while (*Input != NulChar)
+ {
+ if (*Input == My->CurrentVersion->OptionCommentChar)
+ {
+ /* comment */
+ break;
+ }
+ else if (*Input == My->CurrentVersion->OptionQuoteChar)
+ {
+ /* string constant */
+ COPYCHAR;
+ while (*Input != NulChar
+ && *Input != My->CurrentVersion->OptionQuoteChar)
+ {
+ COPYCHAR;
+ }
+ if (*Input == My->CurrentVersion->OptionQuoteChar)
+ {
+ COPYCHAR;
+ }
+ else
+ {
+ /* add missing Quote */
+ OUTPUTCHAR (My->CurrentVersion->OptionQuoteChar);
+ }
+ COPY_SPACES;
+ }
+ else if (bwb_isalnum (LastChar))
+ {
+ /* can NOT be the start of a command */
+ COPYCHAR;
+ }
+ else if (!bwb_isalpha (*Input))
+ {
+ /* can NOT be the start of a command */
+ COPYCHAR;
+ }
+ else if (bwb_strnicmp (Input, REM, REM_len) == 0)
+ {
+ break;
+ }
+ else if (bwb_strnicmp (Input, DATA, DATA_len) == 0)
+ {
+ /* DATA ... */
+ break;
+ }
+ else if (bwb_strnicmp (Input, CASE, CASE_len) == 0)
+ {
+ /* CASE ... */
+ break;
+ }
+ else if (bwb_strnicmp (Input, IF, IF_len) == 0)
+ {
+ /* IF */
+ LastCommand = IF_COMMAND;
+ nIF++;
+ COPY_IF;
+ COPY_SPACES;
+ }
+ else if (bwb_strnicmp (Input, GOTO, GOTO_len) == 0 && nIF > nTHEN)
+ {
+ /* IF x GOTO line ELSE line */
+ LastCommand = THEN_COMMAND;
+ nTHEN++;
+ COPY_THEN;
+ COPY_SPACES;
+ COPY_LINENUMBER;
+ COPY_SPACES;
+ if (bwb_strnicmp (Input, ELSE, ELSE_len) == 0)
+ {
+ /* ELSE line */
+ COPY_ELSE;
+ COPY_SPACES;
+ COPY_LINENUMBER;
+ COPY_SPACES;
+ }
+ /* IS STANDARD, NOT CLASSIC */
+ nENDIF++;
+ LastCommand = ENDIF_COMMAND;
+ }
+ else if (bwb_strnicmp (Input, THEN, THEN_len) == 0)
+ {
+ /* THEN */
+ LastCommand = THEN_COMMAND;
+ nTHEN++;
+ COPY_THEN;
+ COPY_SPACES;
+ if (bwb_isdigit (*Input))
+ {
+ /* STANDARD: IF x THEN line ELSE line */
+ char *SavedInput;
+ char *SavedOutput;
+ SavedInput = Input;
+ SavedOutput = Output;
+
+ COPY_LINENUMBER;
+ COPY_SPACES;
+ if (bwb_strnicmp (Input, ELSE, ELSE_len) == 0)
+ {
+ /* ELSE line */
+ COPY_ELSE;
+ COPY_SPACES;
+ if (bwb_isdigit (*Input))
+ {
+ COPY_LINENUMBER;
+ COPY_SPACES;
+ /* IS STANDARD, NOT CLASSIC */
+ nENDIF++;
+ LastCommand = ENDIF_COMMAND;
+ }
+ else
+ {
+ /* IF x THEN line ELSE stmts */
+ Input = SavedInput;
+ Output = SavedOutput;
+ FORCE_COLON;
+ FORCE_GOTO;
+ COPY_LINENUMBER;
+ COPY_SPACES;
+ }
+ }
+ else
+ {
+ /* IS STANDARD, NOT CLASSIC */
+ nENDIF++;
+ LastCommand = ENDIF_COMMAND;
+ }
+ }
+ else
+ if (*Input == My->CurrentVersion->OptionCommentChar
+ || *Input == NulChar)
+ {
+ /* IS STRUCTURED, NOT CLASSIC */
+ nENDIF++;
+ LastCommand = ENDIF_COMMAND;
+ }
+ else
+ {
+ /* CLASSIC: IF x THEN stmts ELSE stmts */
+ }
+ FORCE_COLON;
+ }
+ else if (bwb_strnicmp (Input, THEN2, THEN2_len) == 0)
+ {
+ /* trailing THEN ? */
+ char *PeekInput;
+
+ PeekInput = Input;
+ PeekInput += THEN2_len;
+ while (*PeekInput == ' ')
+ {
+ PeekInput++;
+ }
+ if (*PeekInput == My->CurrentVersion->OptionCommentChar
+ || *PeekInput == NulChar)
+ {
+ /* IS STRUCTURED, NOT CLASSIC */
+ nTHEN++;
+ COPY_THEN2;
+ nENDIF++;
+ LastCommand = ENDIF_COMMAND;
+ FORCE_COLON;
+ }
+ else
+ {
+ /* THEN line */
+ }
+ }
+ else if (bwb_strnicmp (Input, ELSE, ELSE_len) == 0)
+ {
+ /* ELSE */
+ if (LastCommand == ELSE_COMMAND)
+ {
+ /* we need an ENDIF here */
+ FORCE_COLON;
+ FORCE_ENDIF;
+ FORCE_COLON;
+ nENDIF++;
+ }
+ LastCommand = ELSE_COMMAND;
+ nELSE++;
+ FORCE_COLON;
+ COPY_ELSE;
+ FORCE_COLON;
+ COPY_SPACES;
+ if (bwb_isdigit (*Input))
+ {
+ /* IF x THEN stmts ELSE line */
+ FORCE_GOTO;
+ COPY_LINENUMBER;
+ COPY_SPACES;
+ }
+ FORCE_COLON;
+ }
+ else if (bwb_strnicmp (Input, ENDIF, ENDIF_len) == 0)
+ {
+ /* ENDIF */
+ LastCommand = ENDIF_COMMAND;
+ nENDIF++;
+ COPY_ENDIF;
+ FORCE_COLON;
+ }
+ else
+ {
+ /* was NOT the start of a command */
+ COPYCHAR;
+ }
+ }
+ /* end of input */
+ if (nENDIF < nIF)
+ {
+ while (nENDIF < nIF)
+ {
+ /* we need trailing ENDIF's */
+ nENDIF++;
+ FORCE_COLON;
+ FORCE_ENDIF;
+ }
+ }
+ /* fixup trailing REMark command */
+ if (bwb_strnicmp (Input, REM, REM_len) == 0)
+ {
+ /* REMark */
+ /* 100 A=1 REMark */
+ /* 100 A=1:REMark */
+ /* 100 A=1'REMark */
+ FORCE_COLON;
+ }
+ /* copy the comments */
+ while (*Input != NulChar)
+ {
+ COPYCHAR;
+ /* cppcheck: (style) Variable 'LastChar' is assigned a value that is never used. */
+ }
+ OUTPUTCHAR (NulChar);
+ bwb_strcpy (InBuffer, OutBuffer);
+}
+
+
+/***************************************************************
+
+ FUNCTION: bwb_ladd()
+
+ DESCRIPTION: This function adds a new line (in the
+ buffer) to the program in memory.
+
+***************************************************************/
+static int
+bwb_ladd (char *buffer, LineType * p, int IsUser)
+{
+ LineType *l;
+ LineType *previous;
+ char *newbuffer;
+ char *NextStatement;
+ char *ThisStatement;
+ int Replace;
+ char BreakChar;
+
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+ assert( My->CurrentVersion != NULL );
+ assert (buffer != NULL);
+ assert (p != NULL);
+
+
+ Replace = TRUE;
+ BreakChar = NulChar;
+ CleanLine (buffer);
+ if (is_empty_string (buffer))
+ {
+ /* silengtly ignore blank lines */
+ return FALSE;
+ }
+ /*
+ from here, the line WILL be added so the user can EDIT it,
+ we just complain and refuse to run if any error is detected.
+ */
+ My->IsScanRequired = TRUE; /* program needs to be scanned again */
+
+ /* AUTO-FIX UNBALANCED QUOTES */
+ if (FixQuotes (buffer) == FALSE)
+ {
+ /* ERROR */
+ fprintf (My->SYSOUT->cfp, "UNBALANCED QUOTES: %s\n", buffer);
+ ResetConsoleColumn ();
+ My->ERR = -1; /* bwb_ladd, UNBALANCED QUOTES */
+ }
+
+ if (IS_CHAR (*buffer, My->CurrentVersion->OptionStatementChar))
+ {
+ /* part of a multi-statement line */
+ }
+ else if (IS_CHAR (*buffer, My->CurrentVersion->OptionCommentChar))
+ {
+ /* part of a multi-statement line */
+ }
+ else
+ {
+ ImportClassicIfThenElse (buffer);
+ }
+ ThisStatement = buffer;
+ NextStatement = NULL;
+ BreakChar = NulChar;
+
+ do
+ {
+ if (BreakChar == NulChar)
+ {
+ /* first pass thru the do{} while loop, do nothing */
+ }
+ else if (IS_CHAR (BreakChar, My->CurrentVersion->OptionCommentChar))
+ {
+ /* ThisStatment will turn out to be the last */
+ *ThisStatement = My->CurrentVersion->OptionCommentChar;
+ }
+ else if (IS_CHAR (BreakChar, My->CurrentVersion->OptionStatementChar))
+ {
+ /* we are NOT the last statement, skip over the OptionStatementChar */
+ ThisStatement++;
+ }
+ else
+ {
+ /* Internal Error */
+ }
+
+ if (BreakChar == NulChar
+ && IS_CHAR (*buffer, My->CurrentVersion->OptionStatementChar))
+ {
+ /* first pass thru and line begins with colon */
+ /* part of a multi-statement line */
+ NextStatement = NULL;
+ if (My->NextValidLineNumber > 1)
+ {
+ My->NextValidLineNumber--;
+ }
+ Replace = FALSE;
+ }
+ else
+ if (BreakChar == NulChar
+ && IS_CHAR (*buffer, My->CurrentVersion->OptionCommentChar))
+ {
+ /* first pass thru and line begins with apostrophe */
+ /* part of a multi-statement line */
+ NextStatement = NULL;
+ if (My->NextValidLineNumber > 1)
+ {
+ My->NextValidLineNumber--;
+ }
+ Replace = FALSE;
+ }
+ else
+ {
+ NextStatement = FindClassicStatementEnd (ThisStatement);
+ }
+
+ if (NextStatement == NULL)
+ {
+ /* we are the last statement */
+ }
+ else
+ {
+ /* another statement follows */
+ BreakChar = *NextStatement;
+ *NextStatement = NulChar;
+ }
+ CleanLine (ThisStatement);
+ if (is_empty_string (ThisStatement) == FALSE)
+ {
+
+ /* get memory for this line */
+ if ((l = (LineType *) calloc (1, sizeof (LineType))) == NULL)
+ {
+ /* ERROR */
+ fprintf (My->SYSOUT->cfp, "Out of memory\n");
+ ResetConsoleColumn ();
+ My->ERR = -1; /* bwb_ladd, Out of memory */
+ return FALSE;
+ }
+
+ /* this line has not been executed or numbered */
+ l->LineFlags = 0;
+ if (IsUser)
+ {
+ l->LineFlags |= LINE_USER;
+ }
+ l->IncludeLevel = My->IncludeLevel; /* %INCLUDE */
+ l->position = 0;
+
+ /*
+ **
+ ** ALL lines have a line number.
+ ** If a line number is not provided,
+ ** then the next available line number is assigned.
+ **
+ */
+ newbuffer = ThisStatement;
+ l->number = My->NextValidLineNumber;
+
+ if (buff_read_line_number (newbuffer, &(l->position), &l->number))
+ {
+ if (l->number < My->NextValidLineNumber)
+ {
+ /* ERROR */
+ fprintf (My->SYSOUT->cfp, "%d < %d - LINE OUT OF ORDER: %s\n",
+ l->number, My->NextValidLineNumber, buffer);
+ ResetConsoleColumn ();
+ My->ERR = -1; /* bwb_ladd, LINE OUT OF ORDER */
+ l->number = My->NextValidLineNumber; /* sane default */
+ }
+ else if (l->number < MINLIN || l->number > MAXLIN)
+ {
+ /* ERROR */
+ fprintf (My->SYSOUT->cfp, "INVALID LINE NUMBER: %s\n", buffer);
+ ResetConsoleColumn ();
+ My->ERR = -1; /* bwb_ladd, INVALID LINE NUMBER */
+ l->number = My->NextValidLineNumber; /* sane default */
+ }
+ else
+ {
+ /* OK */
+ My->NextValidLineNumber = l->number;
+ l->LineFlags |= LINE_NUMBERED; /* line was manually numbered */
+ }
+ /* A SPACE IS REQUIRED AFTER THE LINE NUMBER -- NO EXCEPTIONS */
+ if (newbuffer[l->position] != ' ')
+ {
+ /* ERROR */
+ fprintf (My->SYSOUT->cfp, "MISSING SPACE AFTER LINE NUMBER: %s\n",
+ buffer);
+ ResetConsoleColumn ();
+ My->ERR = -1; /* bwb_ladd, MISSING SPACE AFTER LINE NUMBER */
+ }
+ /* newuffer does NOT contain the line number */
+ newbuffer += l->position;
+ }
+ /* the next valid line number is this line number plus one */
+ CleanLine (newbuffer);
+ if (*newbuffer != NulChar
+ && *newbuffer == My->CurrentVersion->OptionStatementChar)
+ {
+ /* this is part of a multi-statement line */
+ newbuffer++;
+ CleanLine (newbuffer);
+ }
+ /*
+ **
+ ** copy into the line buffer
+ **
+ */
+ if (l->buffer != NULL)
+ {
+ free (l->buffer);
+ l->buffer = NULL; /* JBV */
+ }
+ if ((l->buffer =
+ (char *) calloc (bwb_strlen (newbuffer) + 1 /* NulChar */ ,
+ sizeof (char))) == NULL)
+ {
+ /* ERROR */
+ fprintf (My->SYSOUT->cfp, "Out of memory\n");
+ ResetConsoleColumn ();
+ My->ERR = -1; /* bwb_ladd, Out of memory */
+ return FALSE; /* we cannot determine the command */
+ }
+ bwb_strcpy (l->buffer, newbuffer);
+ /*
+ **
+ ** determine command
+ **
+ */
+ line_start (l);
+ if (l->cmdnum)
+ {
+ /* OK */
+ }
+ else
+ {
+ /* ERROR */
+ fprintf (My->SYSOUT->cfp,
+ "ILLEGAL COMMAND AFTER LINE NUMBER: %d %s\n", l->number,
+ l->buffer);
+ ResetConsoleColumn ();
+ My->ERR = -1; /* bwb_ladd, ILLEGAL COMMAND AFTER LINE NUMBER */
+ }
+ /*
+ **
+ ** add the line to the linked-list of lines
+ **
+ */
+ for (previous = p; previous != My->EndMarker; previous = previous->next)
+ {
+ if (previous->number == l->number)
+ {
+ if (Replace == TRUE)
+ {
+ /* REPLACE 'previous' */
+ while (previous->number == l->number)
+ {
+ LineType *z;
+
+ z = previous;
+ previous = previous->next;
+ bwb_freeline (z);
+ }
+ l->next = previous;
+ p->next = l;
+
+ }
+ else
+ {
+ /* APPEND after 'previous' */
+ while (previous->next->number == l->number)
+ {
+ previous = previous->next;
+ }
+ l->next = previous->next;
+ previous->next = l;
+ }
+ break;
+ }
+ else
+ if (previous->number < l->number
+ && l->number < previous->next->number)
+ {
+ /* INSERT BETWEEN 'previous' AND 'previous->next' */
+ l->next = previous->next;
+ previous->next = l;
+ break;
+ }
+ p = previous;
+ }
+
+ }
+ /* another statement may follow */
+ ThisStatement = NextStatement;
+ Replace = FALSE;
+ }
+ while (ThisStatement != NULL);
+ My->NextValidLineNumber++;
+ return TRUE;
+}
+
+/***************************************************************
+
+ FUNCTION: bwb_xtxtline()
+
+ DESCRIPTION: This function executes a text line, i.e.,
+ places it in memory and then relinquishes
+ control.
+
+***************************************************************/
+
+static void
+bwb_xtxtline (char *buffer)
+{
+ assert( My != NULL );
+ assert (buffer != NULL);
+
+ /* remove old program from memory */
+ bwb_xnew (My->UserMarker);
+
+ CleanLine (buffer);
+ if (is_empty_string (buffer))
+ {
+ /* silengtly ignore blank lines */
+ return;
+ }
+
+ /* add to the user line list */
+ bwb_ladd (buffer, My->UserMarker, TRUE);
+
+ /* execute the line as BASIC command line */
+ if (bwb_incexec ())
+ {
+ My->StackHead->line = My->UserMarker->next; /* and set current line in it */
+ My->StackHead->ExecCode = EXEC_NORM;
+ }
+}
+
+/***************************************************************
+
+ FUNCTION: bwb_incexec()
+
+ DESCRIPTION: This function increments the EXEC
+ stack counter.
+
+***************************************************************/
+
+int
+bwb_incexec (void)
+{
+ StackType *StackItem;
+ assert( My != NULL );
+
+
+ if (My->StackDepthInteger >= EXECLEVELS)
+ {
+ WARN_OUT_OF_MEMORY;
+ return FALSE;
+ }
+ if ((StackItem = (StackType *) calloc (1, sizeof (StackType))) == NULL)
+ {
+ WARN_OUT_OF_MEMORY;
+ return FALSE;
+ }
+ StackItem->ExecCode = EXEC_NORM; /* sane default */
+ StackItem->line = My->ThisLine; /* bwb_incexec */
+ StackItem->LoopTopLine = NULL;
+ StackItem->local_variable = NULL;
+ StackItem->OnErrorGoto = 0;
+ StackItem->next = My->StackHead;
+ My->StackHead = StackItem;
+ My->StackDepthInteger++;
+ return TRUE;
+}
+
+/***************************************************************
+
+ FUNCTION: bwb_decexec()
+
+ DESCRIPTION: This function decrements the EXEC
+ stack counter.
+
+***************************************************************/
+void
+bwb_clrexec (void)
+{
+ assert( My != NULL );
+
+ while (My->StackHead != NULL)
+ {
+ bwb_decexec ();
+ }
+}
+
+void
+bwb_decexec (void)
+{
+ StackType *StackItem;
+ assert( My != NULL );
+
+
+ if (My->StackHead == NULL)
+ {
+ WARN_RETURN_WITHOUT_GOSUB;
+ return;
+ }
+ StackItem = My->StackHead;
+ My->StackHead = StackItem->next;
+ free (StackItem);
+ My->StackDepthInteger--;
+}
+
+/***************************************************************
+
+ FUNCTION: bwb_mainloop()
+
+ DESCRIPTION: This C function performs one iteration
+ of the interpreter. In a non-preemptive
+ scheduler, this function should be called
+ by the scheduler, not by bwBASIC code.
+
+***************************************************************/
+
+void
+bwb_mainloop (void)
+{
+ assert( My != NULL );
+
+
+ if (My->StackHead)
+ {
+ /* BASIC program running */
+ bwb_execline (); /* execute one line of program */
+ return;
+ }
+ /* BASIC program completed */
+
+ if (My->ExternalInputFile != NULL)
+ {
+ /* for automated testing, --TAPE command line parameter */
+ if (bwb_is_eof (My->ExternalInputFile) == FALSE)
+ {
+ /* --TAPE command line parameter is active */
+ bwb_interact (); /* get user interaction */
+ return;
+ }
+ }
+ /* TAPE command inactive or completed */
+
+ if (My->IsCommandLineFile)
+ {
+ /* BASIC program was started from command line */
+ bwx_terminate ();
+ return;
+ }
+ /* BASIC program was not started from command line */
+
+ if (My->IsInteractive)
+ {
+ /* interactive */
+ bwb_interact (); /* get user interaction */
+ return;
+ }
+ /* non-interactive */
+
+ bwx_terminate ();
+}
+
+/***************************************************************
+
+ FUNCTION: bwb_execline()
+
+ DESCRIPTION: This function executes a single line of
+ a program in memory. This function is
+ called by bwb_mainloop().
+
+***************************************************************/
+
+extern int
+bwx_Error (int ERR, char *ErrorMessage)
+{
+ /*
+ ERR is the error number
+ ErrorMessage is used to override the default error message, and is usually NULL
+ */
+ assert( My != NULL );
+
+ switch (ERR)
+ {
+ case 0:
+ /*
+ **
+ ** Clear any existing error
+ **
+ */
+ My->IsErrorPending = FALSE; /* bwx_Error, ERR == 0 */
+ My->ERR = 0; /* bwx_Error, ERR == 0 */
+ My->ERL = NULL; /* bwx_Error, ERR == 0 */
+ bwb_strcpy (My->ERROR4, ""); /* bwx_Error, ERR == 0 */
+ return FALSE;
+ case 6: /* WARN_OVERFLOW */
+ case 11: /* WARN_DIVISION_BY_ZERO */
+ case 15: /* WARN_STRING_TOO_LONG */
+ /*
+ **
+ ** Behavior depends upon whether an Error handler is active.
+ **
+ */
+ if (GetOnError () == 0)
+ {
+ /*
+ **
+ ** Error handler is NOT active.
+ ** Do NOT set ERL, ERR, and ERROR$.
+ ** Continue processing.
+ **
+ */
+ if (ErrorMessage == NULL)
+ {
+ /* use the default error message */
+ if (ERR > 0 && ERR < NUM_WARNINGS)
+ {
+ ErrorMessage = ERROR4[ERR];
+ }
+ }
+ if (ErrorMessage != NULL)
+ {
+ if (bwb_strlen (ErrorMessage) > 0)
+ {
+ fprintf (My->SYSOUT->cfp, "%s\n", ErrorMessage);
+ ResetConsoleColumn ();
+ }
+ }
+ return FALSE; /* continue processing */
+ }
+ /*
+ **
+ ** Error handler IS active.
+ ** Fall-thru to set ERL, ERR, and ERROR$.
+ ** Abort processing.
+ **
+ */
+ }
+ if (My->IsErrorPending == FALSE) /* no errors pending */
+ {
+ /*
+ **
+ ** only keep the first pending error to occur
+ **
+ */
+ My->IsErrorPending = TRUE; /* bwx_Error, ERR != 0 */
+ My->ERR = ERR; /* bwx_Error, ERR != 0 */
+ My->ERL = NULL; /* bwx_Error, ERR != 0 */
+ bwb_strcpy (My->ERROR4, ""); /* bwx_Error, ERR != 0 */
+ if (My->StackHead)
+ {
+ My->ERL = My->StackHead->line;
+ }
+ if (ErrorMessage == NULL)
+ {
+ /* use the default error message */
+ if (ERR > 0 && ERR < NUM_WARNINGS)
+ {
+ ErrorMessage = ERROR4[ERR];
+ }
+ }
+ if (ErrorMessage != NULL)
+ {
+ if (bwb_strlen (ErrorMessage) > MAX_ERR_LENGTH)
+ {
+ ErrorMessage[MAX_ERR_LENGTH] = NulChar;
+ }
+ bwb_strcpy (My->ERROR4, ErrorMessage);
+ }
+ }
+ return TRUE; /* abort processing */
+}
+
+void
+bwb_execline (void)
+{
+ LineType *r, *l;
+ assert( My != NULL );
+ assert( My->SYSOUT != NULL );
+ assert( My->SYSOUT->cfp != NULL );
+ assert( My->CurrentVersion != NULL );
+
+ if (My->StackHead == NULL) /* in bwb_execline(), FATAL ERROR PENDING */
+ {
+ return;
+ }
+
+ l = My->StackHead->line;
+
+ /* if the line is My->EndMarker, then break out of EXEC loops */
+ if (l == NULL || l == My->EndMarker || My->ERR < 0) /* in bwb_execline(), FATAL ERROR PENDING */
+ {
+ bwb_clrexec ();
+ return;
+ }
+
+ My->ThisLine = l; /* bwb_execline */
+
+ /* Print line number if trace is on */
+ if (My->IsTraceOn == TRUE)
+ {
+ if (l->LineFlags & (LINE_USER))
+ {
+ /* USER line in console */
+ }
+ else if (l->number > 0)
+ {
+ fprintf (My->SYSOUT->cfp, "[ %d %s ]", l->number, l->buffer);
+ }
+ }
+ l->position = l->Startpos;
+
+ /* if there is a BASIC command in the line, execute it here */
+ if (l->cmdnum)
+ {
+ /* OK */
+ }
+ else
+ {
+ WARN_ILLEGAL_DIRECT;
+ l->cmdnum = C_REM;
+ }
+ /* l->cmdnum != 0 */
+
+ if (l->LineFlags & LINE_BREAK)
+ {
+ /* BREAK line */
+ l->LineFlags &= ~LINE_BREAK;
+ My->ContinueLine = l;
+ bwx_STOP (TRUE);
+ return;
+ }
+
+ /* advance beyond whitespace */
+ line_skip_spaces (l); /* keep this */
+
+ /* execute the command vector */
+ if (My->CurrentVersion->OptionFlags & (OPTION_COVERAGE_ON))
+ {
+ /* We do this here so "END" and "STOP" are marked */
+ if (l->cmdnum == C_DATA)
+ {
+ /* DATA lines are marked when they are READ */
+ }
+ else
+ {
+ /* this line was executed */
+ l->LineFlags |= LINE_EXECUTED;
+ }
+ }
+ r = bwb_vector (l);
+ if (r == NULL)
+ {
+ WARN_INTERNAL_ERROR;
+ return;
+ }
+ assert (r != NULL);
+
+ if (My->ERR < 0) /* in bwb_execline(), FATAL ERROR PENDING */
+ {
+ /* FATAL */
+ bwb_clrexec ();
+ return;
+ }
+
+ if (My->IsErrorPending /* Keep This */ )
+ {
+ /* we are probably not at the end-of-the-line */
+ }
+ else if (r == l)
+ {
+ /* we should be at the end-of-the-line */
+ if (line_is_eol (l))
+ {
+ /* OK */
+ }
+ else
+ {
+ WARN_SYNTAX_ERROR;
+ return;
+ }
+ }
+ else
+ {
+ /* we are probably not at the end-of-the-line */
+ }
+
+ if (My->IsErrorPending /* Keep This */ )
+ {
+ /*
+ **
+ ** a NON-FATAL ERROR has occurred. ERR, ERL, and ERROR$ were
+ ** already set using bwb_warning(ERR,ERROR$)
+ **
+ */
+ int err_gotol;
+ My->IsErrorPending = FALSE; /* Error Recognized */
+ err_gotol = GetOnError ();
+ if (l->LineFlags & (LINE_USER))
+ {
+ /*
+ **
+ ** -------------------------------------------------------------------------
+ ** USER line in console
+ ** -------------------------------------------------------------------------
+ **
+ ** fall thru to the DEFAULT ERROR HANDLER
+ **
+ */
+ }
+ else if (l->number == 0)
+ {
+ /* fall thru to the DEFAULT ERROR HANDLER */
+ }
+ else if (My->ERL == NULL)
+ {
+ /* fall thru to the DEFAULT ERROR HANDLER */
+ }
+ else if (My->ERL->number == 0)
+ {
+ /* fall thru to the DEFAULT ERROR HANDLER */
+ }
+ else if (err_gotol == -1)
+ {
+ /*
+ **
+ ** -------------------------------------------------------------------------
+ ** ON ERROR RESUME NEXT
+ ** -------------------------------------------------------------------------
+ **
+ */
+ assert (r != NULL);
+ assert (r->next != NULL);
+
+ r->next->position = 0;
+ assert (My->StackHead != NULL);
+ My->StackHead->line = r->next;
+ return;
+ }
+ else if (err_gotol == 0)
+ {
+ /*
+ **
+ ** -------------------------------------------------------------------------
+ ** ON ERROR GOTO 0
+ ** -------------------------------------------------------------------------
+ **
+ ** fall thru to the DEFAULT ERROR HANDLER
+ **
+ */
+ }
+ else if (err_gotol == My->ERL->number)
+ {
+ /*
+ **
+ ** -------------------------------------------------------------------------
+ ** RECURSION
+ ** -------------------------------------------------------------------------
+ **
+ ** For example:
+ ** 10 ON ERROR GOTO 20
+ ** 20 ERROR 1
+ **
+ ** fall thru to the DEFAULT ERROR HANDLER
+ **
+ */
+ }
+ else
+ {
+ /* USER ERROR HANDLER SPECIFIED */
+ /* find the user-specified error handler and jump there */
+ LineType *x;
+ for (x = My->StartMarker->next; x != My->EndMarker; x = x->next)
+ {
+ if (x->number == err_gotol)
+ {
+ /* FOUND */
+ if (My->CurrentVersion->OptionFlags & (OPTION_ERROR_GOSUB))
+ {
+ /*
+ **
+ ** -------------------------------------------------------------------------
+ ** OPTION ERROR GOSUB
+ ** -------------------------------------------------------------------------
+ **
+ ** RETURN should act like RESUME NEXT...
+ ** Execution resumes at the statement immediately following the one which caused the error.
+ ** For structured commands, this is the bottom line of the structure.
+ **
+ */
+ switch (l->cmdnum)
+ {
+ case C_IF8THEN:
+ /* skip to END_IF */
+ assert (l->OtherLine != NULL);
+ for (l = l->OtherLine; l->cmdnum != C_END_IF; l = l->OtherLine);
+ break;
+ case C_SELECT_CASE:
+ /* skip to END_SELECT */
+ assert (l->OtherLine != NULL);
+ for (l = l->OtherLine; l->cmdnum != C_END_SELECT;
+ l = l->OtherLine);
+ break;
+ default:
+ l = l->next;
+ }
+ l->position = 0;
+ My->StackHead->line = l;
+ if (bwb_incexec ())
+ {
+ x->position = 0;
+ assert (My->StackHead != NULL);
+ My->StackHead->line = x;
+ My->StackHead->ExecCode = EXEC_GOSUB;
+ }
+ else
+ {
+ /* ERROR -- OUT OF MEMORY */
+ assert (My->StackHead != NULL);
+ My->StackHead->line = My->EndMarker;
+ }
+ }
+ else
+ {
+ /*
+ **
+ ** -------------------------------------------------------------------------
+ ** OPTION ERROR GOTO
+ ** -------------------------------------------------------------------------
+ **
+ */
+ x->position = 0; /* start of line */
+ assert (My->StackHead != NULL);
+ My->StackHead->line = x;
+ }
+ return;
+ }
+ }
+ /* NOT FOUND */
+ /* fall thru to the DEFAULT ERROR HANDLER */
+ }
+ /*
+ **
+ ** -------------------------------------------------------------------------
+ ** DEFAULT ERROR HANDLER (FATAL)
+ ** -------------------------------------------------------------------------
+ **
+ */
+ /*
+ **
+ ** display error message
+ **
+ */
+ if (l->LineFlags & (LINE_USER) || l->number <= 0)
+ {
+ /* USER line in console */
+ fprintf (My->SYSOUT->cfp, "\nERROR: %s\n", My->ERROR4);
+ ResetConsoleColumn ();
+ }
+ else
+ {
+ /* BASIC program line */
+ fprintf (My->SYSOUT->cfp, "\nERROR in line %d: %s\n", l->number,
+ My->ERROR4);
+ ResetConsoleColumn ();
+ /*
+ **
+ ** display stack trace
+ **
+ */
+ if (My->CurrentVersion->OptionFlags & (OPTION_TRACE_ON))
+ {
+ /*
+ ** Dump the BASIC stack trace when a FATAL error occurs.
+ ** First line is the TOP of the stack.
+ ** Last line is the BOTTOM of the stack.
+ */
+ StackType *StackItem;
+ fprintf (My->SYSOUT->cfp, "\nSTACK TRACE:\n");
+ for (StackItem = My->StackHead; StackItem != NULL;
+ StackItem = StackItem->next)
+ {
+ LineType *l;
+
+ l = StackItem->line;
+ if (l != NULL)
+ {
+ if (MINLIN <= l->number && l->number <= MAXLIN)
+ {
+ /* BASIC program line */
+ if (l->buffer == NULL)
+ {
+ fprintf (My->SYSOUT->cfp, "%d\n", l->number);
+ }
+ else
+ {
+ fprintf (My->SYSOUT->cfp, "%d:%s\n", l->number, l->buffer);
+ }
+ }
+ }
+ }
+ ResetConsoleColumn ();
+ }
+ }
+
+ My->AutomaticLineNumber = 0;
+ My->AutomaticLineIncrement = 0;
+
+ if (My->IsInteractive)
+ {
+ /* INTERACTIVE: terminate program */
+
+ /* reset all stack counters */
+ bwb_clrexec ();
+ SetOnError (0);
+
+ My->ERR = -1; /* in bwb_execline(), default error handler */
+
+
+ /* reset the break handler */
+ signal (SIGINT, break_mes);
+
+
+ return;
+ }
+ /* NOT INTERACTIVE: terminate immediately */
+ bwx_terminate ();
+ return; /* never reached */
+ }
+ if (l->number > 0)
+ {
+ /* These events only occur in running programs */
+ if (My->IsTimerOn)
+ {
+ /* TIMER ON */
+ if (My->OnTimerCount > 0)
+ {
+ if (bwx_TIMER (0) > My->OnTimerExpires)
+ {
+ My->IsTimerOn = FALSE;
+ if (My->OnTimerLineNumber > 0)
+ {
+ /* ON TIMER( My->OnTimerCount ) GOSUB My->OnTimerLineNumber */
+ LineType *x;
+
+ for (x = My->StartMarker->next; x != My->EndMarker; x = x->next)
+ {
+ if (x->number == My->OnTimerLineNumber)
+ {
+ /* FOUND */
+ /* save current stack level */
+ assert (My->StackHead != NULL);
+ My->StackHead->line = r;
+ /* increment exec stack */
+ if (bwb_incexec ())
+ {
+ /* set the new position to x and return x */
+ x->position = 0;
+ assert (My->StackHead != NULL);
+ My->StackHead->line = x;
+ My->StackHead->ExecCode = EXEC_GOSUB;
+ }
+ else
+ {
+ /* ERROR */
+ assert (My->StackHead != NULL);
+ My->StackHead->line = My->EndMarker;
+ }
+ return;
+ }
+ }
+ /* NOT FOUND */
+ }
+ }
+ }
+ }
+ }
+ /* check for end of line: if so, advance to next line and return */
+ if (r == l)
+ {
+ /* advance to the next line */
+ l->next->position = 0;
+ r = l->next;
+ }
+ else if (line_is_eol (r))
+ {
+ /* we could be at the end-of-the-line, added for RETURN */
+ /* advance to the next line */
+ r->next->position = 0;
+ r = r->next;
+ }
+ /* else reset with the value in r */
+ assert (My->StackHead != NULL);
+ My->StackHead->line = r;
+}
+
+/***************************************************************
+
+ FUNCTION: is_ln()
+
+ DESCRIPTION: This function determines whether a program
+ line (in buffer) begins with a line number.
+
+***************************************************************/
+
+static int
+is_ln (char *buffer)
+{
+ int position;
+
+ assert (buffer != NULL);
+
+ position = 0;
+ buff_skip_spaces (buffer, &position); /* keep this */
+ if (bwb_isdigit (buffer[position]))
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/***************************************************************
+
+ FUNCTION: is_numconst()
+
+ DESCRIPTION: This function reads the string in
+ and returns TRUE if it is a numerical
+ constant and FALSE if it is not. At
+ this point, only decimal (base 10)
+ constants are detected.
+
+***************************************************************/
+
+static int
+is_numconst (char *buffer)
+{
+ char *p;
+
+ assert (buffer != NULL);
+
+ /* Return FALSE for empty buffer */
+
+ if (buffer[0] == NulChar)
+ {
+ return FALSE;
+ }
+ /* else check digits */
+
+ p = buffer;
+ while (*p != NulChar)
+ {
+ switch (*p)
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ break;
+ default:
+ return FALSE;
+ }
+ p++;
+ }
+
+ /* only numerical characters detected */
+
+ return TRUE;
+
+}
+
+/* SWITCH */
+LineType *
+bwb_vector( LineType *l )
+{
+ LineType *r;
+ assert (l != NULL);
+ switch( l->cmdnum )
+ {
+ case C_DEF8LBL:
+ r = bwb_DEF8LBL( l );
+ break;
+ case C_APPEND:
+ r = bwb_APPEND( l );
+ break;
+ case C_AS:
+ r = bwb_AS( l );
+ break;
+ case C_AUTO:
+ r = bwb_AUTO( l );
+ break;
+ case C_BACKSPACE:
+ r = bwb_BACKSPACE( l );
+ break;
+ case C_BREAK:
+ r = bwb_BREAK( l );
+ break;
+ case C_BUILD:
+ r = bwb_BUILD( l );
+ break;
+ case C_BYE:
+ r = bwb_BYE( l );
+ break;
+ case C_CALL:
+ r = bwb_CALL( l );
+ break;
+ case C_CASE:
+ r = bwb_CASE( l );
+ break;
+ case C_CASE_ELSE:
+ r = bwb_CASE_ELSE( l );
+ break;
+ case C_CHAIN:
+ r = bwb_CHAIN( l );
+ break;
+ case C_CHANGE:
+ r = bwb_CHANGE( l );
+ break;
+ case C_CLEAR:
+ r = bwb_CLEAR( l );
+ break;
+ case C_CLOAD:
+ r = bwb_CLOAD( l );
+ break;
+ case C_CLOAD8:
+ r = bwb_CLOAD8( l );
+ break;
+ case C_CLOSE:
+ r = bwb_CLOSE( l );
+ break;
+ case C_CLR:
+ r = bwb_CLR( l );
+ break;
+ case C_CMDS:
+ r = bwb_CMDS( l );
+ break;
+ case C_COMMON:
+ r = bwb_COMMON( l );
+ break;
+ case C_CONSOLE:
+ r = bwb_CONSOLE( l );
+ break;
+ case C_CONST:
+ r = bwb_CONST( l );
+ break;
+ case C_CONT:
+ r = bwb_CONT( l );
+ break;
+ case C_CONTINUE:
+ r = bwb_CONTINUE( l );
+ break;
+ case C_COPY:
+ r = bwb_COPY( l );
+ break;
+ case C_CREATE:
+ r = bwb_CREATE( l );
+ break;
+ case C_CSAVE:
+ r = bwb_CSAVE( l );
+ break;
+ case C_CSAVE8:
+ r = bwb_CSAVE8( l );
+ break;
+ case C_DATA:
+ r = bwb_DATA( l );
+ break;
+ case C_DEC:
+ r = bwb_DEC( l );
+ break;
+ case C_DEF:
+ r = bwb_DEF( l );
+ break;
+ case C_DEFBYT:
+ r = bwb_DEFBYT( l );
+ break;
+ case C_DEFCUR:
+ r = bwb_DEFCUR( l );
+ break;
+ case C_DEFDBL:
+ r = bwb_DEFDBL( l );
+ break;
+ case C_DEFINT:
+ r = bwb_DEFINT( l );
+ break;
+ case C_DEFLNG:
+ r = bwb_DEFLNG( l );
+ break;
+ case C_DEFSNG:
+ r = bwb_DEFSNG( l );
+ break;
+ case C_DEFSTR:
+ r = bwb_DEFSTR( l );
+ break;
+ case C_DELETE:
+ r = bwb_DELETE( l );
+ break;
+ case C_DELIMIT:
+ r = bwb_DELIMIT( l );
+ break;
+ case C_DIM:
+ r = bwb_DIM( l );
+ break;
+ case C_DISPLAY:
+ r = bwb_DISPLAY( l );
+ break;
+ case C_DO:
+ r = bwb_DO( l );
+ break;
+ case C_DOS:
+ r = bwb_DOS( l );
+ break;
+ case C_DSP:
+ r = bwb_DSP( l );
+ break;
+ case C_EDIT:
+ r = bwb_EDIT( l );
+ break;
+ case C_ELSE:
+ r = bwb_ELSE( l );
+ break;
+ case C_ELSEIF:
+ r = bwb_ELSEIF( l );
+ break;
+ case C_END:
+ r = bwb_END( l );
+ break;
+ case C_END_FUNCTION:
+ r = bwb_END_FUNCTION( l );
+ break;
+ case C_END_IF:
+ r = bwb_END_IF( l );
+ break;
+ case C_END_SELECT:
+ r = bwb_END_SELECT( l );
+ break;
+ case C_END_SUB:
+ r = bwb_END_SUB( l );
+ break;
+ case C_ERASE:
+ r = bwb_ERASE( l );
+ break;
+ case C_EXCHANGE:
+ r = bwb_EXCHANGE( l );
+ break;
+ case C_EXIT:
+ r = bwb_EXIT( l );
+ break;
+ case C_EXIT_DO:
+ r = bwb_EXIT_DO( l );
+ break;
+ case C_EXIT_FOR:
+ r = bwb_EXIT_FOR( l );
+ break;
+ case C_EXIT_FUNCTION:
+ r = bwb_EXIT_FUNCTION( l );
+ break;
+ case C_EXIT_REPEAT:
+ r = bwb_EXIT_REPEAT( l );
+ break;
+ case C_EXIT_SUB:
+ r = bwb_EXIT_SUB( l );
+ break;
+ case C_EXIT_WHILE:
+ r = bwb_EXIT_WHILE( l );
+ break;
+ case C_FEND:
+ r = bwb_FEND( l );
+ break;
+ case C_FIELD:
+ r = bwb_FIELD( l );
+ break;
+ case C_FILE:
+ r = bwb_FILE( l );
+ break;
+ case C_FILES:
+ r = bwb_FILES( l );
+ break;
+ case C_FLEX:
+ r = bwb_FLEX( l );
+ break;
+ case C_FNCS:
+ r = bwb_FNCS( l );
+ break;
+ case C_FNEND:
+ r = bwb_FNEND( l );
+ break;
+ case C_FOR:
+ r = bwb_FOR( l );
+ break;
+ case C_FUNCTION:
+ r = bwb_FUNCTION( l );
+ break;
+ case C_GET:
+ r = bwb_GET( l );
+ break;
+ case C_GO:
+ r = bwb_GO( l );
+ break;
+ case C_GO_SUB:
+ r = bwb_GO_SUB( l );
+ break;
+ case C_GO_TO:
+ r = bwb_GO_TO( l );
+ break;
+ case C_GOODBYE:
+ r = bwb_GOODBYE( l );
+ break;
+ case C_GOSUB:
+ r = bwb_GOSUB( l );
+ break;
+ case C_GOTO:
+ r = bwb_GOTO( l );
+ break;
+ case C_HELP:
+ r = bwb_HELP( l );
+ break;
+ case C_IF:
+ r = bwb_IF( l );
+ break;
+ case C_IF_END:
+ r = bwb_IF_END( l );
+ break;
+ case C_IF_MORE:
+ r = bwb_IF_MORE( l );
+ break;
+ case C_IF8THEN:
+ r = bwb_IF8THEN( l );
+ break;
+ case C_IMAGE:
+ r = bwb_IMAGE( l );
+ break;
+ case C_INC:
+ r = bwb_INC( l );
+ break;
+ case C_INPUT:
+ r = bwb_INPUT( l );
+ break;
+ case C_INPUT_LINE:
+ r = bwb_INPUT_LINE( l );
+ break;
+ case C_LET:
+ r = bwb_LET( l );
+ break;
+ case C_LINE:
+ r = bwb_LINE( l );
+ break;
+ case C_LINE_INPUT:
+ r = bwb_LINE_INPUT( l );
+ break;
+ case C_LIST:
+ r = bwb_LIST( l );
+ break;
+ case C_LISTNH:
+ r = bwb_LISTNH( l );
+ break;
+ case C_LLIST:
+ r = bwb_LLIST( l );
+ break;
+ case C_LOAD:
+ r = bwb_LOAD( l );
+ break;
+ case C_LOCAL:
+ r = bwb_LOCAL( l );
+ break;
+ case C_LOOP:
+ r = bwb_LOOP( l );
+ break;
+ case C_LPRINT:
+ r = bwb_LPRINT( l );
+ break;
+ case C_LPRINTER:
+ r = bwb_LPRINTER( l );
+ break;
+ case C_LPT:
+ r = bwb_LPT( l );
+ break;
+ case C_LSET:
+ r = bwb_LSET( l );
+ break;
+ case C_MAINTAINER:
+ r = bwb_MAINTAINER( l );
+ break;
+ case C_MAINTAINER_CMDS:
+ r = bwb_MAINTAINER_CMDS( l );
+ break;
+ case C_MAINTAINER_CMDS_HTML:
+ r = bwb_MAINTAINER_CMDS_HTML( l );
+ break;
+ case C_MAINTAINER_CMDS_ID:
+ r = bwb_MAINTAINER_CMDS_ID( l );
+ break;
+ case C_MAINTAINER_CMDS_MANUAL:
+ r = bwb_MAINTAINER_CMDS_MANUAL( l );
+ break;
+ case C_MAINTAINER_CMDS_SWITCH:
+ r = bwb_MAINTAINER_CMDS_SWITCH( l );
+ break;
+ case C_MAINTAINER_CMDS_TABLE:
+ r = bwb_MAINTAINER_CMDS_TABLE( l );
+ break;
+ case C_MAINTAINER_DEBUG:
+ r = bwb_MAINTAINER_DEBUG( l );
+ break;
+ case C_MAINTAINER_DEBUG_OFF:
+ r = bwb_MAINTAINER_DEBUG_OFF( l );
+ break;
+ case C_MAINTAINER_DEBUG_ON:
+ r = bwb_MAINTAINER_DEBUG_ON( l );
+ break;
+ case C_MAINTAINER_FNCS:
+ r = bwb_MAINTAINER_FNCS( l );
+ break;
+ case C_MAINTAINER_FNCS_HTML:
+ r = bwb_MAINTAINER_FNCS_HTML( l );
+ break;
+ case C_MAINTAINER_FNCS_ID:
+ r = bwb_MAINTAINER_FNCS_ID( l );
+ break;
+ case C_MAINTAINER_FNCS_MANUAL:
+ r = bwb_MAINTAINER_FNCS_MANUAL( l );
+ break;
+ case C_MAINTAINER_FNCS_SWITCH:
+ r = bwb_MAINTAINER_FNCS_SWITCH( l );
+ break;
+ case C_MAINTAINER_FNCS_TABLE:
+ r = bwb_MAINTAINER_FNCS_TABLE( l );
+ break;
+ case C_MAINTAINER_MANUAL:
+ r = bwb_MAINTAINER_MANUAL( l );
+ break;
+ case C_MAINTAINER_STACK:
+ r = bwb_MAINTAINER_STACK( l );
+ break;
+ case C_MARGIN:
+ r = bwb_MARGIN( l );
+ break;
+ case C_MAT:
+ r = bwb_MAT( l );
+ break;
+ case C_MAT_GET:
+ r = bwb_MAT_GET( l );
+ break;
+ case C_MAT_INPUT:
+ r = bwb_MAT_INPUT( l );
+ break;
+ case C_MAT_PRINT:
+ r = bwb_MAT_PRINT( l );
+ break;
+ case C_MAT_PUT:
+ r = bwb_MAT_PUT( l );
+ break;
+ case C_MAT_READ:
+ r = bwb_MAT_READ( l );
+ break;
+ case C_MAT_WRITE:
+ r = bwb_MAT_WRITE( l );
+ break;
+ case C_MERGE:
+ r = bwb_MERGE( l );
+ break;
+ case C_MID4:
+ r = bwb_MID4( l );
+ break;
+ case C_MON:
+ r = bwb_MON( l );
+ break;
+ case C_NAME:
+ r = bwb_NAME( l );
+ break;
+ case C_NEW:
+ r = bwb_NEW( l );
+ break;
+ case C_NEXT:
+ r = bwb_NEXT( l );
+ break;
+ case C_OF:
+ r = bwb_OF( l );
+ break;
+ case C_OLD:
+ r = bwb_OLD( l );
+ break;
+ case C_ON:
+ r = bwb_ON( l );
+ break;
+ case C_ON_ERROR:
+ r = bwb_ON_ERROR( l );
+ break;
+ case C_ON_ERROR_GOSUB:
+ r = bwb_ON_ERROR_GOSUB( l );
+ break;
+ case C_ON_ERROR_GOTO:
+ r = bwb_ON_ERROR_GOTO( l );
+ break;
+ case C_ON_ERROR_RESUME:
+ r = bwb_ON_ERROR_RESUME( l );
+ break;
+ case C_ON_ERROR_RESUME_NEXT:
+ r = bwb_ON_ERROR_RESUME_NEXT( l );
+ break;
+ case C_ON_ERROR_RETURN:
+ r = bwb_ON_ERROR_RETURN( l );
+ break;
+ case C_ON_ERROR_RETURN_NEXT:
+ r = bwb_ON_ERROR_RETURN_NEXT( l );
+ break;
+ case C_ON_TIMER:
+ r = bwb_ON_TIMER( l );
+ break;
+ case C_OPEN:
+ r = bwb_OPEN( l );
+ break;
+ case C_OPTION:
+ r = bwb_OPTION( l );
+ break;
+ case C_OPTION_ANGLE:
+ r = bwb_OPTION_ANGLE( l );
+ break;
+ case C_OPTION_ANGLE_DEGREES:
+ r = bwb_OPTION_ANGLE_DEGREES( l );
+ break;
+ case C_OPTION_ANGLE_GRADIANS:
+ r = bwb_OPTION_ANGLE_GRADIANS( l );
+ break;
+ case C_OPTION_ANGLE_RADIANS:
+ r = bwb_OPTION_ANGLE_RADIANS( l );
+ break;
+ case C_OPTION_ARITHMETIC:
+ r = bwb_OPTION_ARITHMETIC( l );
+ break;
+ case C_OPTION_ARITHMETIC_DECIMAL:
+ r = bwb_OPTION_ARITHMETIC_DECIMAL( l );
+ break;
+ case C_OPTION_ARITHMETIC_FIXED:
+ r = bwb_OPTION_ARITHMETIC_FIXED( l );
+ break;
+ case C_OPTION_ARITHMETIC_NATIVE:
+ r = bwb_OPTION_ARITHMETIC_NATIVE( l );
+ break;
+ case C_OPTION_BASE:
+ r = bwb_OPTION_BASE( l );
+ break;
+ case C_OPTION_BUGS:
+ r = bwb_OPTION_BUGS( l );
+ break;
+ case C_OPTION_BUGS_BOOLEAN:
+ r = bwb_OPTION_BUGS_BOOLEAN( l );
+ break;
+ case C_OPTION_BUGS_OFF:
+ r = bwb_OPTION_BUGS_OFF( l );
+ break;
+ case C_OPTION_BUGS_ON:
+ r = bwb_OPTION_BUGS_ON( l );
+ break;
+ case C_OPTION_COMPARE:
+ r = bwb_OPTION_COMPARE( l );
+ break;
+ case C_OPTION_COMPARE_BINARY:
+ r = bwb_OPTION_COMPARE_BINARY( l );
+ break;
+ case C_OPTION_COMPARE_DATABASE:
+ r = bwb_OPTION_COMPARE_DATABASE( l );
+ break;
+ case C_OPTION_COMPARE_TEXT:
+ r = bwb_OPTION_COMPARE_TEXT( l );
+ break;
+ case C_OPTION_COVERAGE:
+ r = bwb_OPTION_COVERAGE( l );
+ break;
+ case C_OPTION_COVERAGE_OFF:
+ r = bwb_OPTION_COVERAGE_OFF( l );
+ break;
+ case C_OPTION_COVERAGE_ON:
+ r = bwb_OPTION_COVERAGE_ON( l );
+ break;
+ case C_OPTION_DATE:
+ r = bwb_OPTION_DATE( l );
+ break;
+ case C_OPTION_DIGITS:
+ r = bwb_OPTION_DIGITS( l );
+ break;
+ case C_OPTION_DISABLE:
+ r = bwb_OPTION_DISABLE( l );
+ break;
+ case C_OPTION_DISABLE_COMMAND:
+ r = bwb_OPTION_DISABLE_COMMAND( l );
+ break;
+ case C_OPTION_DISABLE_FUNCTION:
+ r = bwb_OPTION_DISABLE_FUNCTION( l );
+ break;
+ case C_OPTION_DISABLE_OPERATOR:
+ r = bwb_OPTION_DISABLE_OPERATOR( l );
+ break;
+ case C_OPTION_EDIT:
+ r = bwb_OPTION_EDIT( l );
+ break;
+ case C_OPTION_ENABLE:
+ r = bwb_OPTION_ENABLE( l );
+ break;
+ case C_OPTION_ENABLE_COMMAND:
+ r = bwb_OPTION_ENABLE_COMMAND( l );
+ break;
+ case C_OPTION_ENABLE_FUNCTION:
+ r = bwb_OPTION_ENABLE_FUNCTION( l );
+ break;
+ case C_OPTION_ENABLE_OPERATOR:
+ r = bwb_OPTION_ENABLE_OPERATOR( l );
+ break;
+ case C_OPTION_ERROR:
+ r = bwb_OPTION_ERROR( l );
+ break;
+ case C_OPTION_ERROR_GOSUB:
+ r = bwb_OPTION_ERROR_GOSUB( l );
+ break;
+ case C_OPTION_ERROR_GOTO:
+ r = bwb_OPTION_ERROR_GOTO( l );
+ break;
+ case C_OPTION_EXPLICIT:
+ r = bwb_OPTION_EXPLICIT( l );
+ break;
+ case C_OPTION_EXTENSION:
+ r = bwb_OPTION_EXTENSION( l );
+ break;
+ case C_OPTION_FILES:
+ r = bwb_OPTION_FILES( l );
+ break;
+ case C_OPTION_IMPLICIT:
+ r = bwb_OPTION_IMPLICIT( l );
+ break;
+ case C_OPTION_INDENT:
+ r = bwb_OPTION_INDENT( l );
+ break;
+ case C_OPTION_LABELS:
+ r = bwb_OPTION_LABELS( l );
+ break;
+ case C_OPTION_LABELS_OFF:
+ r = bwb_OPTION_LABELS_OFF( l );
+ break;
+ case C_OPTION_LABELS_ON:
+ r = bwb_OPTION_LABELS_ON( l );
+ break;
+ case C_OPTION_PROMPT:
+ r = bwb_OPTION_PROMPT( l );
+ break;
+ case C_OPTION_PUNCT:
+ r = bwb_OPTION_PUNCT( l );
+ break;
+ case C_OPTION_PUNCT_AT:
+ r = bwb_OPTION_PUNCT_AT( l );
+ break;
+ case C_OPTION_PUNCT_BYTE:
+ r = bwb_OPTION_PUNCT_BYTE( l );
+ break;
+ case C_OPTION_PUNCT_COMMENT:
+ r = bwb_OPTION_PUNCT_COMMENT( l );
+ break;
+ case C_OPTION_PUNCT_CURRENCY:
+ r = bwb_OPTION_PUNCT_CURRENCY( l );
+ break;
+ case C_OPTION_PUNCT_DOUBLE:
+ r = bwb_OPTION_PUNCT_DOUBLE( l );
+ break;
+ case C_OPTION_PUNCT_FILENUM:
+ r = bwb_OPTION_PUNCT_FILENUM( l );
+ break;
+ case C_OPTION_PUNCT_IMAGE:
+ r = bwb_OPTION_PUNCT_IMAGE( l );
+ break;
+ case C_OPTION_PUNCT_INPUT:
+ r = bwb_OPTION_PUNCT_INPUT( l );
+ break;
+ case C_OPTION_PUNCT_INTEGER:
+ r = bwb_OPTION_PUNCT_INTEGER( l );
+ break;
+ case C_OPTION_PUNCT_LONG:
+ r = bwb_OPTION_PUNCT_LONG( l );
+ break;
+ case C_OPTION_PUNCT_LPAREN:
+ r = bwb_OPTION_PUNCT_LPAREN( l );
+ break;
+ case C_OPTION_PUNCT_PRINT:
+ r = bwb_OPTION_PUNCT_PRINT( l );
+ break;
+ case C_OPTION_PUNCT_QUOTE:
+ r = bwb_OPTION_PUNCT_QUOTE( l );
+ break;
+ case C_OPTION_PUNCT_RPAREN:
+ r = bwb_OPTION_PUNCT_RPAREN( l );
+ break;
+ case C_OPTION_PUNCT_SINGLE:
+ r = bwb_OPTION_PUNCT_SINGLE( l );
+ break;
+ case C_OPTION_PUNCT_STATEMENT:
+ r = bwb_OPTION_PUNCT_STATEMENT( l );
+ break;
+ case C_OPTION_PUNCT_STRING:
+ r = bwb_OPTION_PUNCT_STRING( l );
+ break;
+ case C_OPTION_RECLEN:
+ r = bwb_OPTION_RECLEN( l );
+ break;
+ case C_OPTION_RENUM:
+ r = bwb_OPTION_RENUM( l );
+ break;
+ case C_OPTION_ROUND:
+ r = bwb_OPTION_ROUND( l );
+ break;
+ case C_OPTION_ROUND_BANK:
+ r = bwb_OPTION_ROUND_BANK( l );
+ break;
+ case C_OPTION_ROUND_MATH:
+ r = bwb_OPTION_ROUND_MATH( l );
+ break;
+ case C_OPTION_ROUND_TRUNCATE:
+ r = bwb_OPTION_ROUND_TRUNCATE( l );
+ break;
+ case C_OPTION_SCALE:
+ r = bwb_OPTION_SCALE( l );
+ break;
+ case C_OPTION_SLEEP:
+ r = bwb_OPTION_SLEEP( l );
+ break;
+ case C_OPTION_STDERR:
+ r = bwb_OPTION_STDERR( l );
+ break;
+ case C_OPTION_STDIN:
+ r = bwb_OPTION_STDIN( l );
+ break;
+ case C_OPTION_STDOUT:
+ r = bwb_OPTION_STDOUT( l );
+ break;
+ case C_OPTION_STRICT:
+ r = bwb_OPTION_STRICT( l );
+ break;
+ case C_OPTION_STRICT_OFF:
+ r = bwb_OPTION_STRICT_OFF( l );
+ break;
+ case C_OPTION_STRICT_ON:
+ r = bwb_OPTION_STRICT_ON( l );
+ break;
+ case C_OPTION_TERMINAL:
+ r = bwb_OPTION_TERMINAL( l );
+ break;
+ case C_OPTION_TERMINAL_ADM:
+ r = bwb_OPTION_TERMINAL_ADM( l );
+ break;
+ case C_OPTION_TERMINAL_ANSI:
+ r = bwb_OPTION_TERMINAL_ANSI( l );
+ break;
+ case C_OPTION_TERMINAL_NONE:
+ r = bwb_OPTION_TERMINAL_NONE( l );
+ break;
+ case C_OPTION_TIME:
+ r = bwb_OPTION_TIME( l );
+ break;
+ case C_OPTION_TRACE:
+ r = bwb_OPTION_TRACE( l );
+ break;
+ case C_OPTION_TRACE_OFF:
+ r = bwb_OPTION_TRACE_OFF( l );
+ break;
+ case C_OPTION_TRACE_ON:
+ r = bwb_OPTION_TRACE_ON( l );
+ break;
+ case C_OPTION_USING:
+ r = bwb_OPTION_USING( l );
+ break;
+ case C_OPTION_USING_ALL:
+ r = bwb_OPTION_USING_ALL( l );
+ break;
+ case C_OPTION_USING_COMMA:
+ r = bwb_OPTION_USING_COMMA( l );
+ break;
+ case C_OPTION_USING_DIGIT:
+ r = bwb_OPTION_USING_DIGIT( l );
+ break;
+ case C_OPTION_USING_DOLLAR:
+ r = bwb_OPTION_USING_DOLLAR( l );
+ break;
+ case C_OPTION_USING_EXRAD:
+ r = bwb_OPTION_USING_EXRAD( l );
+ break;
+ case C_OPTION_USING_FILLER:
+ r = bwb_OPTION_USING_FILLER( l );
+ break;
+ case C_OPTION_USING_FIRST:
+ r = bwb_OPTION_USING_FIRST( l );
+ break;
+ case C_OPTION_USING_LENGTH:
+ r = bwb_OPTION_USING_LENGTH( l );
+ break;
+ case C_OPTION_USING_LITERAL:
+ r = bwb_OPTION_USING_LITERAL( l );
+ break;
+ case C_OPTION_USING_MINUS:
+ r = bwb_OPTION_USING_MINUS( l );
+ break;
+ case C_OPTION_USING_PERIOD:
+ r = bwb_OPTION_USING_PERIOD( l );
+ break;
+ case C_OPTION_USING_PLUS:
+ r = bwb_OPTION_USING_PLUS( l );
+ break;
+ case C_OPTION_VERSION:
+ r = bwb_OPTION_VERSION( l );
+ break;
+ case C_OPTION_ZONE:
+ r = bwb_OPTION_ZONE( l );
+ break;
+ case C_PAUSE:
+ r = bwb_PAUSE( l );
+ break;
+ case C_PDEL:
+ r = bwb_PDEL( l );
+ break;
+ case C_POP:
+ r = bwb_POP( l );
+ break;
+ case C_PRINT:
+ r = bwb_PRINT( l );
+ break;
+ case C_PTP:
+ r = bwb_PTP( l );
+ break;
+ case C_PTR:
+ r = bwb_PTR( l );
+ break;
+ case C_PUT:
+ r = bwb_PUT( l );
+ break;
+ case C_QUIT:
+ r = bwb_QUIT( l );
+ break;
+ case C_READ:
+ r = bwb_READ( l );
+ break;
+ case C_RECALL:
+ r = bwb_RECALL( l );
+ break;
+ case C_REM:
+ r = bwb_REM( l );
+ break;
+ case C_RENAME:
+ r = bwb_RENAME( l );
+ break;
+ case C_RENUM:
+ r = bwb_RENUM( l );
+ break;
+ case C_RENUMBER:
+ r = bwb_RENUMBER( l );
+ break;
+ case C_REPEAT:
+ r = bwb_REPEAT( l );
+ break;
+ case C_REPLACE:
+ r = bwb_REPLACE( l );
+ break;
+ case C_RESET:
+ r = bwb_RESET( l );
+ break;
+ case C_RESTORE:
+ r = bwb_RESTORE( l );
+ break;
+ case C_RESUME:
+ r = bwb_RESUME( l );
+ break;
+ case C_RETURN:
+ r = bwb_RETURN( l );
+ break;
+ case C_RSET:
+ r = bwb_RSET( l );
+ break;
+ case C_RUN:
+ r = bwb_RUN( l );
+ break;
+ case C_RUNNH:
+ r = bwb_RUNNH( l );
+ break;
+ case C_SAVE:
+ r = bwb_SAVE( l );
+ break;
+ case C_SCRATCH:
+ r = bwb_SCRATCH( l );
+ break;
+ case C_SELECT:
+ r = bwb_SELECT( l );
+ break;
+ case C_SELECT_CASE:
+ r = bwb_SELECT_CASE( l );
+ break;
+ case C_STEP:
+ r = bwb_STEP( l );
+ break;
+ case C_STOP:
+ r = bwb_STOP( l );
+ break;
+ case C_STORE:
+ r = bwb_STORE( l );
+ break;
+ case C_SUB:
+ r = bwb_SUB( l );
+ break;
+ case C_SUB_END:
+ r = bwb_SUB_END( l );
+ break;
+ case C_SUB_EXIT:
+ r = bwb_SUB_EXIT( l );
+ break;
+ case C_SUBEND:
+ r = bwb_SUBEND( l );
+ break;
+ case C_SUBEXIT:
+ r = bwb_SUBEXIT( l );
+ break;
+ case C_SWAP:
+ r = bwb_SWAP( l );
+ break;
+ case C_SYSTEM:
+ r = bwb_SYSTEM( l );
+ break;
+ case C_TEXT:
+ r = bwb_TEXT( l );
+ break;
+ case C_THEN:
+ r = bwb_THEN( l );
+ break;
+ case C_TIMER:
+ r = bwb_TIMER( l );
+ break;
+ case C_TIMER_OFF:
+ r = bwb_TIMER_OFF( l );
+ break;
+ case C_TIMER_ON:
+ r = bwb_TIMER_ON( l );
+ break;
+ case C_TIMER_STOP:
+ r = bwb_TIMER_STOP( l );
+ break;
+ case C_TLOAD:
+ r = bwb_TLOAD( l );
+ break;
+ case C_TO:
+ r = bwb_TO( l );
+ break;
+ case C_TRACE:
+ r = bwb_TRACE( l );
+ break;
+ case C_TRACE_OFF:
+ r = bwb_TRACE_OFF( l );
+ break;
+ case C_TRACE_ON:
+ r = bwb_TRACE_ON( l );
+ break;
+ case C_TSAVE:
+ r = bwb_TSAVE( l );
+ break;
+ case C_TTY:
+ r = bwb_TTY( l );
+ break;
+ case C_TTY_IN:
+ r = bwb_TTY_IN( l );
+ break;
+ case C_TTY_OUT:
+ r = bwb_TTY_OUT( l );
+ break;
+ case C_UNTIL:
+ r = bwb_UNTIL( l );
+ break;
+ case C_USE:
+ r = bwb_USE( l );
+ break;
+ case C_VARS:
+ r = bwb_VARS( l );
+ break;
+ case C_WEND:
+ r = bwb_WEND( l );
+ break;
+ case C_WHILE:
+ r = bwb_WHILE( l );
+ break;
+ case C_WRITE:
+ r = bwb_WRITE( l );
+ break;
+ default:
+ WARN_INTERNAL_ERROR;
+ r = l;
+ break;
+ }
+ return r;
+}
+
+/* EOF */
diff --git a/Junk/bwbasic.desktop b/Junk/bwbasic.desktop
new file mode 100644
index 0000000..add1fac
--- /dev/null
+++ b/Junk/bwbasic.desktop
@@ -0,0 +1,11 @@
+#!/usr/bin/env xdg-open
+[Desktop Entry]
+Encoding=UTF-8
+Name=Bywater BASIC
+GenericName=Bywater BASIC
+Type=Application
+Exec=bwbasic
+Icon=/usr/share/pixmaps/bwbasic.png
+StartupNotify=true
+Terminal=true
+Categories=Development
diff --git a/Junk/bwbasic.doc b/Junk/bwbasic.doc
new file mode 100644
index 0000000..2c37ba9
--- /dev/null
+++ b/Junk/bwbasic.doc
@@ -0,0 +1,1156 @@
+
+ Bywater BASIC Interpreter, version 3.20
+ ---------------------------------------------
+
+ Copyright (c) 1993, Ted A. Campbell
+ for bwBASIC version 2.10, 11 October 1993
+
+ Copyright (c) 2014-2015, Howatd Wulf, AF5NE
+ for bwBASIC version 3.00, 12 May 2015
+
+ Copyright (c) 2015-2016, Howatd Wulf, AF5NE
+ for bwBASIC version 3.10, 27 July 2016
+
+ Copyright (c) 2016-2017, Howatd Wulf, AF5NE
+ for bwBASIC version 3.20, 4 June 2017
+
+CONTENTS:
+
+
+ 1. DESCRIPTION
+ 2. TERMS OF USE
+ 3. QUICK REFERENCE LIST OF COMMANDS, FUNCTIONS AND OPERATORS
+ 4. GENERAL NOTES ON USAGE
+ 5. PREDEFINED VARIABLES
+ 6. UNIMPLEMENTED COMMANDS AND FUNCTIONS
+ and AGENDA FOR DEVELOPMENT
+ 7. THE STORY OF Bywater BASIC
+ 8. COMMUNICATIONS
+ 9. EXPANDED REFERENCE FOR COMMANDS, FUNCTIONS AND OPERATORS
+
+ The author wishes to express his thanks to Mr. David MacKenzie,
+ who assisted in the development Unix installation and configuration
+ for this version.
+
+1. DESCRIPTION
+
+
+ The Bywater BASIC Interpreter (bwBASIC) implements a large superset
+ of the ANSI Standard for Minimal BASIC (X3.60-1978) and a significant
+ subset of the ANSI Standard for Full BASIC (X3.113-1987), and many
+ classic BASIC dialects in C.
+
+ bwBASIC can be configured to enable commands, functions, operators
+ and punctuation characters available in many classic dialects of BASIC;
+ these are controlled by various OPTION commands. bwBASIC does not attempt
+ bug-level compatibility with any particular BASIC dialect nor does it
+ currently support graphics. bwBASIC seeks to be as portable as possible.
+
+ The interpreter is fairly slow. Whenever faced with a choice
+ between conceptual clarity and speed, I have consistently chosen the
+ former. The interpreter is the simplest design available, and
+ utilizes no system of intermediate code, which could speed up
+ considerably its operation. As it is, each line has only one
+ command. Multi-statement lines are internally broken into distinct
+ lines as they are loaded.
+
+
+2. TERMS OF USE:
+
+
+ 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.
+
+
+3. QUICK REFERENCE LIST OF COMMANDS, FUNCTIONS AND OPERATORS
+
+
+ The complete list of over 500 commands, functions and operators is
+ in the file "ALL.txt" in the DOCS directory. Documentation for each
+ BASIC dialect is in the other text files in the DOCS directory.
+
+ A BASIC dialect is a selection of commands, functions, operators,
+ punctuation characters and other behaviors. The OPTION VERSION
+ command is used to choose a specific BASIC dialect. Additional
+ OPTION commands are available to fine-tune the behavior.
+
+ In bwBASIC, any function can be executed as a command. For example,
+ the function "OUT(X, Y)" can be executed as the command "OUT X, Y".
+ You can overload functions by parameter signature (the number
+ and types of parameters), and user defined functions can replace
+ any instrinsic function, including INP, OUT, PEEK, POKE, and WAIT.
+
+
+4. GENERAL NOTES ON USAGE:
+
+
+ 4.a. Interactive Environment
+
+
+ An interactive environment is provided if the flag INTERACTIVE
+ is defined as TRUE in bwBASIC.h, so that a line with a
+ line number can be entered at the bwBASIC prompt and it will be
+ added to the program in memory.
+
+ Line numbers are not strictly required, but are useful if the
+ interactive enviroment is used for programming. For longer
+ program entry one might prefer to use an ASCII text editor, and
+ in this case lines can be entered without numbers. See also the
+ documentation below for the pseudo-command EDIT, in section 5.
+
+
+ 4.b. Naming Conventions
+
+
+ Command, function, label, and variable names are not case sensitive,
+ so that "Run" and "RUN" and "run" are equivalent.
+
+ The characters allowed in variable names depends upon the specific
+ BASIC dialect selected with the OPTION VERSION command. Usually,
+ variable names can use any alphabetic characters, the period
+ and underscore characters and decimal digits (but not in the
+ first position) and they can be terminated with the various numeric
+ type characters (!,@,#,%,&,~) or the string type character ($).
+
+
+ 4.c. Numerical Constants
+
+
+ Numerical constants may begin with a digit 0-9 (decimal), with
+ the "&H" or "&h" (hexadecimal) or the "&o" or "&O" (octal).
+ Numerical constants may include 'E' or 'e' followed by an
+ exponent number to denote exponential notation. Numerical
+ constants may also be terminated by the various numeric type
+ characters (!,@,#,%,&,~).
+
+
+ 4.d. Command-Line Execution
+
+
+ A filename can be specified on the command line and will be
+ loaded and executed immediately, so that the command line
+
+ bwBASIC prog.bas
+
+ will load and execute "prog.bas". If a program is executed
+ from the command line, control is returned to the operating
+ system when the program terminates.
+
+
+ 4.e. Program Storage
+
+
+ All programs are stored as ASCII text files.
+
+
+ 4.f. TRUE and FALSE
+
+
+ TRUE is defined as -1 and FALSE is defined as 0 in the default
+ distribution of bwBASIC. Alhtough these definitions can be changed
+ by those compiling bwBASIC (see file bwBASIC.h), any other values
+ are not supported.
+
+
+ 4.g. Assignments
+
+
+ Assignment must be made to variables. This differs from some
+ implementations of BASIC where assignment can be made to a
+ function. Implication: "INSTR( 3, x$, y$ ) = z$" will not
+ work under bwBASIC. The command "MID$(X$,...) = ..." is
+ implemented and should be used instead.
+
+ Some BASIC dialects allow the multiple variable assignments,
+ such as:
+ 100 LET A = B = C = 0
+ In bwBASIC, only the first '=' is considered an assignment.
+ All other '=' are considered comparison operators. To resolve
+ this issue, use commas to seperate the variables, such as:
+ 100 LET A, B, C = 0
+ If these statements are only used to initialize the variable
+ values, then they may not needed in bwBASIC, since all numeric
+ variables are initialized to zero (0) and all string variables
+ are initialized to the empty string ("").
+
+
+ 4.h. Operators and Precedence
+
+
+ The available operators are determined by the OPTION VERSION
+ setting. bwBASIC recognizes many operators, with their level of
+ precedence fixed. The precedence levels chosen for the various
+ operators in bwBASIC were selected to be compatible with many
+ dialects of BASIC. If your application requires a specific order
+ of evaluation, then use parentheses.
+
+ The collating sequence (ASCII, EBCDIC, and so on) is determined
+ by the C compiler. As a consequenece, the results of string
+ comparisons may vary. A simple check for collating sequence is
+ shown in the following example:
+
+ 100 REM Purpose: Verify collating sequence (sort order)
+ 110 REM Author: Howard Wulf, AF5NE
+ 120 REM Date: 2015-11-28
+ 130 REM
+ 200 IF "1" < "A" THEN 300
+ 210 PRINT "EBCDIC"
+ 220 GOTO 999
+ 300 PRINT "ASCII"
+ 999 END
+
+
+ 4.i. Numerical Precision (NOT)
+
+
+ bwBASIC utilizes numbers with only one level of precision.
+ All numbers are internally represented using a C double.
+
+ The various numeric type suffix characters (!,@,#,%,&,~),
+ just like the string type suffix character ($), are part
+ of the variable name.
+
+ This version also supports type declarations, such as:
+ 100 DIM X AS INTEGER
+ 110 FUNCTION ABC( X AS INTEGER ) AS INTEGER
+ 120 LET ABC = X * 2
+ 130 END FUNCTION
+
+ For each type character there is an equivalent type declaration.
+ Type Equivalent
+ Char declaration
+ ==== ===========
+ $ STRING
+ # DOUBLE
+ ! SINGLE
+ @ CURRENCY
+ & LONG
+ % INTEGER
+ ~ BYTE
+
+ However, combining both a type suffix character and a type
+ declaration in the same statement is not supported.
+ 100 DIM A$ AS INTEGER ' this is not supported
+
+ The type of a variable is used to range-check the values.
+ This allows many programs to run correctly, but does not
+ handle all possible cases. The current implementation is not
+ complete for all possible uses of numeric type declarations.
+
+ In the current version, the type of numeric values is used
+ to select the appropriate operation. As a consequence,
+ integer division is used when dividing two integer values.
+ The MOD and \ operators use the rounded integer values of
+ their parameters and return a rounded integer result.
+
+ Within an expression, the result of an operation is promoted
+ to the greater of:
+ the type of the left parameter,
+ the type of the right parameter, and
+ the type required to hold the result.
+
+ In bwBASIC, numeric constants are DOUBLE by default. If you
+ wish to coerce a numeric constant, then add the appropriate
+ numeric type character immediately after the numeric digits.
+ Many BASIC dialects that allow numeric constants to have a
+ numeric type character adopt this convention.
+
+
+ 4.j. OPTION VERSION and so on
+
+
+ OPTION commands change how a BASIC program is parsed. All OPTION commands
+ should be in "profile.bas" so they are effective when a BASIC program
+ is loaded. The first OPTION command should be OPTION VERSION to select a
+ specific BASIC dialect. Additional OPTION commands fine-tune the available
+ commands, functions, operators, punctuation characters and so on to support
+ programs written in many different BASIC dialects. All other OPTION commands
+ must follow the OPTION VERSION command. Conflicting and pathological OPTION
+ combinations are not supported.
+
+ The OPTION VERSION command selects a specific BASIC dialect.
+ 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
+
+ For example, MOD is a function in OPTION VERSION "ECMA-116",
+ MOD is an operator in OPTION VERSION "MBASIC", and
+ MOD is a valid variable name in OPTION VERSION "CALL/360".
+
+ The OPTION VERSION command also sets the following OPTION commands:
+ OPTION STRICT ON | OFF
+ OPTION ANGLE DEGREES | RADIANS | GRADIANS
+ OPTION BUGS ON | OFF
+ OPTION LABELS ON | OFF
+ OPTION COMPARE BINARY | DATABASE | TEXT
+ OPTION BASE integer
+ OPTION RECLEN integer
+ OPTION COVERAGE ON | OFF
+ OPTION TRACE ON | OFF
+ OPTION ERROR GOTO | GOSUB
+ OPTION DATE "format"
+ OPTION TIME "format"
+ OPTION PUNCT COMMENT "char"
+ OPTION PUNCT STATEMENT "char"
+ OPTION PUNCT PRINT "char"
+ OPTION PUNCT IMAGE "char"
+ OPTION PUNCT INPUT "char"
+ OPTION USING DIGIT "char"
+ OPTION USING COMMA "char"
+ OPTION USING PERIOD "char"
+ OPTION USING PLUS "char"
+ OPTION USING MINUS "char"
+ OPTION USING EXRAD "char"
+ OPTION USING DOLLAR "char"
+ OPTION USING FILLER "char"
+ OPTION USING LITERAL "char"
+ OPTION USING FIRST "char"
+ OPTION USING ALL "char"
+ OPTION USING LENGTH "char"
+ OPTION PUNCT QUOTE "char"
+ OPTION PUNCT STRING "char"
+ OPTION PUNCT DOUBLE "char"
+ OPTION PUNCT SINGLE "char"
+ OPTION PUNCT CURRENCY "char"
+ OPTION PUNCT LONG "char"
+ OPTION PUNCT INTEGER "char"
+ OPTION PUNCT BYTE "char"
+ OPTION PUNCT LPAREN "char"
+ OPTION PUNCT RPAREN "char"
+ OPTION PUNCT FILENUM "char"
+ OPTION PUNCT AT "char"
+
+ The commands, functions, operators and settings for each BASIC dialect
+ is documented in the text files in the DOCS directory.
+
+ OPTION DISABLE COMMAND
+ Disable a specific command.
+
+ OPTION DISABLE FUNCTION
+ Disable a specific function.
+
+ OPTION DISABLE OPERATOR
+ Disable a specific operator.
+
+ OPTION ENABLE COMMAND
+ Enable a specific command.
+
+ OPTION ENABLE FUNCTION
+ Enable a specific function.
+
+ OPTION ENABLE OPERATOR
+ Enable a specific operator.
+
+ OPTION ERROR GOSUB
+ The program will GOSUB to the error handler.
+ The error handler exits with the RETURN command.
+
+ OPTION ERROR GOTO
+ The program will GOTO to the error handler.
+ The error handler exits with the RESUME command.
+
+ OPTION LABELS OFF
+ Disables textual labels.
+
+ OPTION LABELS ON
+ Enables textual labels.
+
+ Regardless of the OPTION LABELS setting, statements of the form
+ IF x THEN label
+ are not allowed, instead use the form
+ IF x THEN GOTO label
+ The reason for this rule is because
+ IF x THEN y
+ is considered to be the same as
+ IF x THEN
+ y
+ END IF
+ where "y" is a command, function, or subroutine. Many BASIC dialects
+ that allow textual labels adopt this convention.
+
+ OPTION ROUND controls how floating point values are converted to
+ whole number values. OPTION ROUNG MATH rounds toward the nearest
+ whole number, with halves rounding up to the next larger whole number,
+ as commonly expected by many scientific applications. OPTION ROUND
+ BANK rounds halves to the even whole numbers, as commonly expected
+ by many financial applications. OPTION ROUND TRUNCATE truncates to
+ the next smaller whole number, as commonly expected by many
+ applications written for an integer BASIC. The selected rounding
+ method is used whenever a whole number is required, including:
+ a) selection value for ON ... GOTO and ON ... GOSUB
+ b) any function parameter requiring a whole number
+ c) array subscripts and dimensions
+ d) string positions and lengths
+ e) CINT() and similar
+ The OPTION ROUND command does not change the results of INT() or FIX().
+ The default rounding method is OPTION ROUND BANK.
+
+ A comparison of the different OPTION ROUND settings upon the results of CINT()
+
+ BANK MATH TRUNCATE
+ X int(X) fix(X) cint(X) cint(X) cint(X)
+ -2.0 -2 -2 -2 -2 -2
+ -1.6 -2 -1 -2 -2 -1
+ -1.5 -2 -1 -2 -2 -1
+ -1.4 -2 -1 -1 -1 -1
+ -1.0 -1 -1 -1 -1 -1
+ -0.6 -1 0 -1 -1 0
+ -0.5 -1 0 0 -1 0
+ -0.4 -1 0 0 0 0
+ 0.0 0 0 0 0 0
+ 0.4 0 0 0 0 0
+ 0.5 0 0 0 1 0
+ 0.6 0 0 1 1 0
+ 1.0 1 1 1 1 1
+ 1.4 1 1 1 1 1
+ 1.5 1 1 2 2 1
+ 1.6 1 1 2 2 1
+ 2.0 2 2 2 2 2
+
+ The OPTION BUGS command determines the behavior of a number of BASIC keywords.
+ BASIC programs which rely on these behaviors are non-portable and non-standard.
+ I have considered several different names for this command, but have not yet
+ thought of a better short name.
+
+ OPTION BUGS ON disables the ANSI/ECMA/ISO standard behavior:
+
+ FOR ... ' values are evaluated left-to-right
+ GOTO X OF ... ' an invalid value for X falls thru without ERROR
+ GOSUB X OF ... ' an invalid value for X falls thru without ERROR
+ ON X GOTO ... ' an invalid value for X falls thru without ERROR
+ ON X GOSUB ... ' an invalid value for X falls thru without ERROR
+ X = VAL("X") ' returns zero without ERROR
+ INPUT X ' empty string returns zero without ERROR
+ INPUT X$ ' empty string returns "" without ERROR
+ INPUT X$ ' allows unquoted character strings
+ variable names ' period and underscore are allowed
+ variable types ' the type characters #!@&% are allowed
+ PRINT "a" X ' string concatenation is implied
+ 1.2% is 1 ' the type characters #!@&% are allowed
+ 1D1 is ERROR ' 'D' is not allowed as exponent seperator
+
+ OPTION BUGS OFF enables the ANSI/ECMA/ISO standard behavior:
+
+ FOR ... ' values are evaluated according to standard
+ GOTO X OF ... ' an invalid value for X is an ERROR
+ GOSUB X OF ... ' an invalid value for X is an ERROR
+ ON X GOTO ... ' an invalid value for X is an ERROR
+ ON X GOSUB ... ' an invalid value for X is an ERROR
+ X = VAL("X") ' raises an illegal function call (ERROR 5)
+ INPUT X ' empty string retries input
+ INPUT X$ ' empty string retries input
+ INPUT X$ ' unquoted character strings retries input
+ variable names ' period and underscore are not allowed
+ variable types ' the type characters #!@&% are not allowed
+ PRINT "a";X ' string concatenation is not implied
+ 1.2% is ERROR ' the type characters #!@&% are not allowed
+ 1D1 is ERROR ' 'D' is not allowed as exponent seperator
+
+
+ 4.k. ERROR handling
+
+
+ bwBASIC implements a simplified error handling strategy.
+ Errors are seperated into two categories:
+
+ a) Fatal errors. These errors include:
+ - Unknown command
+ - FOR without NEXT
+ - NEXT without FOR
+ - WHILE without WEND
+ - WEND without WHILE
+ - and so on.
+ The program is scanned prior to running and if any of these errors is
+ detected, then the program is not allowed to run. If these errors
+ occur as the result of a DELETE or MERGE in a running program, then the
+ program is terminated.
+
+ b) Non-fatal errors. If an error handler exists, then it is executed,
+ otherwise the default behaivor is performed. The correct action to
+ take in an error handler depends upon the specific application.
+ - Overflow (ERROR 6)
+ - the default behavior is to display a warning message.
+ - Division by zero (ERROR 11)
+ - the default behavior is to display a warning message.
+ - String too long (ERROR 15)
+ - the default behavior is to display a warning message.
+ - All other non-fatal errors
+ - the default behavior is to terminate the program.
+
+ bwBASIC 2.61 used ON ERROR GOSUB for error trapping.
+ This version defaults to ON ERROR GOTO instead.
+
+
+ 4.l. Implementation rules for functions and commands
+
+
+ In many BASIC dialects, keywords are seperated into three distinct groups:
+ Commands, Statements, and Functions. In bwBASIC, keywords are seperated
+ into only two groups: Commands and Functions. A keyword documented as a
+ Command or Statament in a specific BASIC dialect may have been implemented
+ in bwBASIC as a Function. This is merely an implementation decision, which
+ may change in the future. Each keyword should only be used as described in
+ the reference document. The following rules are considered when deciding
+ whether a BASIC keyword is implemented as a command or a function:
+
+ a) If the keyword requires significant parsing,
+ then it is implemented as a command. An example is "PRINT".
+
+ b) If the keyword requires access to variables BYREF,
+ then it is implemented as a command. An example is "SWAP".
+
+ c) If the keyword changes the flow of control,
+ then it is implemented as a command. An example is "GOTO".
+
+ d) A function may be used as though it were a command,
+ but a command cannot be used as though it were a function.
+
+ e) The BASIC program can redefine a function,
+ but the BASIC program cannot redefine a command.
+
+ f) The BASIC program can overload a function,
+ but the BASIC program cannot overload a command.
+
+ g) Other than semantics, there is no practical difference
+ between a BASIC function and a BASIC subroutine. The
+ return value of a BASIC subroutine, when called as a
+ function, is zero. Calling a BASIC function as if it
+ were a subroutine simply discards the return value.
+
+ These rules were chosen to maintain compatibility with
+ many BASIC dialects.
+
+ An example of the results of the above rules is "OUT".
+ Since "OUT" is implemented as a function, you may:
+ a) call it as a subroutine like this:
+ 100 OUT X, Y
+ b) call it as a function like this:
+ 100 LET N = OUT( X, Y ) ' N = 0
+ c) redefine it as a subroutine like this:
+ SUB OUT( X, Y )
+ REM ...
+ END SUB
+ d) redefine it as a function like this:
+ FUNCTION OUT( X, Y )
+ REM ...
+ END FUNCTION
+ e) overload it using subroutines like these:
+ SUB OUT( X, Y )
+ REM ...
+ END SUB
+ SUB OUT( X, A$ )
+ REM ...
+ END SUB
+ SUB OUT( A$, X )
+ REM ...
+ END SUB
+ SUB OUT( A$, B$ )
+ REM ...
+ END SUB
+ f) overload it using functions like these:
+ FUNCTION OUT( X, Y )
+ REM ...
+ END FUNCTION
+ FUNCTION OUT( X, A$ )
+ REM ...
+ END FUNCTION
+ FUNCTION OUT( A$, X )
+ REM ...
+ END FUNCTION
+ FUNCTION OUT( A$, B$ )
+ REM ...
+ END FUNCTION
+
+
+ 4.m. Reference documentation
+
+
+ bwBASIC is preconfigured to support a number of specific BASIC dialects which were
+ implemented using the following references, however bwBASIC does not attempt to be
+ bug-level compatible and does not implement non-portable design choices. A manual
+ for each dialect is in the DOCS directory to make you aware that a specific keyword
+ is implemented, however you should refer to the reference document for a proper
+ understanding of how to use each keyword. There are many other good books which
+ describe these BASIC dialects in detail.
+
+ OPTION VERSION "BYWATER" ' Bywater BASIC 3
+ MANUAL:
+ BYWATER.TXT
+
+ OPTION VERSION "BYWATER-2" ' Bywater BASIC 2
+ MANUAL:
+ BYWATER-2.TXT
+ NOT IMPLEMENTED:
+ DO NUM, DO UNNUM
+ NOTES:
+ SUB MAIN is not automatically called.
+ CALL requires parentheses around the function/subroutine parameters,
+ so instead of
+ CALL abc 1, 2, 3
+ use
+ CALL abc( 1, 2, 3 )
+
+ OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC
+ MANUAL:
+ CALL-360.TXT
+ NOT IMPLEMENTED:
+ MAT PRINT USING.
+ NOTES:
+ The APPENDIXES are implementation specific and are not supported.
+
+ OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M
+ MANUAL:
+ CBASIC-II.TXT
+ ADDITIONAL INFORMATION:
+ "CBASIC Language Reference Manual, 2nd Edition"
+ by Diigital Research
+ (c) 1982, Diigital Research
+ http://bitsavers.trailing-edge.com/pdf/digitalResearch/cb80/
+ CBASIC_Language_Reference_Manual_Oct82.pdf
+ NOT IMPLEMENTED:
+ CONSTAT%, CONCHAR% and compiler directives.
+ NOTES:
+ The APPENDIXES are implementation specific and are not supported.
+ The %INCLUDE directive is implemented, but only supports literal
+ unquoted filesnames without drive or directory, such as:
+ %INCLUDE LIBRARY.BAS
+ Note that the %INCLUDE directive is executed as a file is being loaded,
+ and as a result the %INCLUDE does not appear in the resulting listing.
+ Machine language functions and commands are not supported.
+ The parsing of command line parameters is implementation defined.
+ The specification of an array in a COMMON statement is the same as
+ the specification in a DIM statement.
+ The SIZE() function assumes 1024 bytes and does not support wild-cards;
+ if the file does not exist then SIZE() returns zero, otherwise SIZE()
+ returns the number of 1024 bytes blocks required to contain the file;
+ an existing file of zero bytes returns a value of 1.
+
+ OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC
+ MANUAL:
+ DARTMOUTH.TXT
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+ Sections 4.2 and 4.3 are implementation specific and are not supported.
+ Lines containing data to be READ must have a line number and a DATA command.
+ NOT IMPLEMENTED:
+ Card punch codes are not supported, use a comma or semicolon instead.
+
+ OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC
+ MANUAL:
+ ECMA-55.TXT
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+ DIM is an executed statement in bwBASIC.
+ This is a design decision to support the following example.
+ 100 INPUT "How many?"; N
+ 110 DIM A$(N)
+
+ OPTION VERSION "ECMA-116" ' ANSI Full BASIC
+ MANUAL:
+ ECMA-116.TXT
+ NOT IMPLEMENTED:
+ Graphic commands, chapters 11 thru 15.
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+ WORK-IN-PROGRESS.
+
+ OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC
+ MANUAL:
+ GCOS.TXT
+ NOT IMPLEMENTED:
+ HPS, LIN, RESTORE*, RESTORE$, VPS and binary files.
+ NOTES:
+ The APPENDIXES are implementation specific and are not supported.
+ Local variables in a multiline DEF are declared using DIM.
+ Line numbers are not written to, nor read from, data files.
+ FILES does not support passwords.
+ Literal values for file names are not supported, use string values instead.
+ This is a design decision to support the following:
+ 100 INPUT "Which files?"; A$, B$, C$
+ 110 FILES A$, B$, C$
+
+ OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt
+ MANUAL:
+ HAARDT.TXT
+ NOT IMPLEMENTED:
+ BBC syntax, use ANSI syntax instead.
+ ON ERROR statement(s) is not supported, use ON ERROR GOTO instead.
+ ON ERROR OFF, use ON ERROR GOTO 0 instead.
+ MAT REDIM, OPTION RUN, OPTION STOP, TRUNCATE, UNNUM and XREF.
+ DEC$(X,A$), ENVIRON$(X), FIND$(A$[,X]) and INSTR(A$,B$,X,Y).
+ NOTES:
+ POS and TAB are 1-based instead of 0-based.
+ ON ERROR GOTO 0 does not cause any error to occur, instead
+ ON ERROR GOTO 0 removes the current error handler and clears
+ ERL, ERR and ERROR$.
+
+ OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition
+ MANUAL:
+ HANDBOOK1.TXT
+ NOT IMPLEMENTED:
+ Abbreviated commands (such as A.) and graphic commands.
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+ The ERR function returns different values.
+
+ OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition
+ MANUAL:
+ HANDBOOK2.TXT
+ NOT IMPLEMENTED:
+ Abbreviated commands (such as A.) and graphic commands.
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+ The ERR function returns different values.
+
+ OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC
+ NOT IMPLEMENTED:
+ FREEZE, UNFREEZE, LOCK, UNLOCK, STEP
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+ PRINT #-1 is sent to the printer.
+ INPUT #-1 is an ERROR.
+
+ OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC
+ MANUAL:
+ MARK-I.TXT
+ ADDITIONAL REFERENCE:
+ "Time-Sharing Service BASIC LANGUAGE EXTENSIONS Reference Manual"
+ by Time-Sharing Service, Information Service Department, General Electric
+ (c) 1968, General Electric Company and Trustees of Dartmouth College
+ http://www.bitsavers.org/pdf/ge/MarkI_Timesharing/
+ 802207A_Time-SharingServiceBASICLanguageExtensionsReferenceManual_Feb1968.pdf
+ NOTES:
+ The APPENDIXES are implementation specific and are not supported.
+ NOT IMPLEMENTED:
+ A series of variables seperated by equal signs is not supported,
+ use a series of variables seperated by commas instead.
+ Literal values for file names are not supported, use string values instead.
+ This is a design decision to support the following:
+ 100 INPUT "Which files?"; A$, B$, C$
+ 110 FILES A$, B$, C$
+ CALL, to execute another compiled program, is not supported, use SHELL instead.
+
+ OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC
+ MANUAL:
+ MARK-II.TXT
+ ADDITIONAL INFORMATION:
+ "Basic Software Library" (Volumes 1 to 8)
+ by R. W. Brown
+ (c) 1977, Scientific Research Inst.
+ NOT IMPLEMENTED:
+ HPS, LIN, RESTORE*, RESTORE$, VPS and binary files.
+ NOTES:
+ The APPENDIXES are implementation specific and are not supported.
+ Local variables in a multiline DEF are declared using DIM.
+ Line numbers are not written to, nor read from, data files.
+ Literal values for file names are not supported, use string values instead.
+ This is a design decision to support the following:
+ 100 INPUT "Which files?"; A$, B$, C$
+ 110 FILES A$, B$, C$
+ FILES does not support passwords.
+
+ OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix
+ MANUAL:
+ MBASIC.TXT
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+ The ERR function returns different values.
+ Specifying "D" in the exponent is not supported, instead use "E".
+
+ OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC
+ MANUAL:
+ PDP-8.TXT
+ NOT IMPLEMENTED:
+ NO RUBOUTS, RUBOUTS
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+
+ OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC
+ MANUAL:
+ PDP-11.TXT
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+
+ OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX
+ MANUAL:
+ RBASIC.TXT
+ NOT IMPLEMENTED:
+ "+" command, COMPILE, CVT$, CVTF$, CVT$%, CVT$F
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+ The ERR function returns different values.
+
+ OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS
+ MANUAL:
+ RSTS-11.TXT
+ ADDITIONAL INFORMATION:
+ "BASIC-PLUS Language Manual : for use with RSTS-11 (PDP-11 Resource Time-Sharing System)"
+ by Digital Equipment Corporation
+ (c) 1972, Digital Equipment Corporation
+ http://bitsavers.trailing-edge.com/pdf/dec/pdp11/rsts/V04/
+ DEC-11-ORBPA-A-D_BASIC-PLUS_LangMan_Oct72.pdf
+ ADDITIONAL INFORMATION:
+ "PDP-11 : BASIC-PLUS Language Manual"
+ by Digital Equipment Corporation
+ (c) 1975, Digital Equipment Corporation
+ http://bitsavers.trailing-edge.com/pdf/dec/pdp11/rsts/V06/
+ DEC-11-ORBPB-A-D_BASIC-PLUS_LangMan_Jul75.pdf
+ NOT IMPLEMENTED:
+ HELLO, RENAME, REPLACE, COMPILE, LENGTH, TAPE, KEY, ASSIGN, DEASSIGN.
+ FOR ... WHILE, FOR ... UNTIL, statement modifiers.
+ NOTES:
+ The APPENDIXES are implementation specific and are not supported.
+ The ERR function returns different values.
+ The statemnet NAME ... AS does not support the specifier.
+
+ OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC
+ MANUAL:
+ SYSTEM-360.TXT
+ ADDITIONAL INFORMATION:
+ "IBM System/360 0S(TS0) ITF:BASIC Terminal User's Guide"
+ by International Business Machines Corporation
+ (c) 1971, International Business Machines Corporation
+ http://bitsavers.org/pdf/ibm/360/os/tso/
+ SC28-6840-0_TSO_ITF_BASIC_Terminal_UG_Apr71.pdf
+ NOT IMPLEMENTED:
+ MAT PRINT USING.
+ NOTES:
+ The APPENDIXES are implementation specific and are not supported.
+
+ OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC
+ MANUAL:
+ SYSTEM-370.TXT
+ NOT IMPLEMENTED:
+ MAT PRINT USING.
+ NOTES:
+ The APPENDIXES are implementation specific and are not supported.
+
+ OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC
+ MANUAL:
+ TRS-80.TXT
+ NOT IMPLEMENTED:
+ CMD, SET EOF, cassette I/O.
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+ The ERR function returns different values.
+ For the TRS-80 Model I use "WIDTH 16,64" in "profile.bas".
+ For the TRS-80 Model III use "WIDTH 16,64" in "profile.bas".
+ For the TRS-80 Model 4 use "WIDTH 24,80" in "profile.bas".
+ bwBASIC requires a space around all keywords, so the LINEINPUT
+ command must be written as LINE INPUT, and so on.
+ PRINT #-1 is sent to the printer.
+ INPUT #-1 is an ERROR.
+
+ OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1
+ MANUAL:
+ VINTAGE.TXT
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+
+ OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX
+ MANUAL:
+ XBASIC.TXT
+ NOT IMPLEMENTED:
+ "+" command, COMPILE, CVT$, CVTF$, CVT$%, CVT$F
+ NOTES:
+ The APPENDICES are implementation specific and are not supported.
+ The ERR function returns different values.
+
+
+5. PREDEFINED VARIABLES - no longer exist
+
+
+ BWB.EDITOR$
+ BWB.FILES$
+ BWB.PROMPT$
+ BWB.IMPLEMENTATION$
+
+ These preset variables no longer exist in bwBASIC. They have
+ been replaced with OPTION EDIT, OPTION FILES and OPTION PROMPT
+ commands.
+
+ The commands EDIT and FILES are pseudo-commands that launch
+ shell programs set by OPTION EDIT and OPTION FILES commands,
+ respectively. The default values for these commands can
+ be changed in bwBASIC.h (DEF_EDITOR and DEF_FILES), and they
+ can be changed on the fly by the user. It is expected that
+ the user will add the appropriate commands to "profile.bas"
+ for their specific implementation; OPTION FILES "ls -l" on Unix
+ systems and OPTION FILES "dir" on DOS systems.
+
+ The command OPTION PROMPT can be used to set the prompt
+ string for bwBASIC. Again, it is suggested that a user-
+ selected prompt can be set up in a "profile.bas" to be
+ initialized each time bwBASIC starts. Note that special
+ characters can be added to the prompt string, e.g.,
+
+ OPTION PROMPT "Ok"+CHR$(10)
+
+ will give an "Ok" prompt followed by a linefeed.
+
+ In previous versions, the preset variable BWB.IMPLEMENTATION$
+ would return "TTY" (IMP_IDSTRING) for the bwx_tty implementation.
+ In previous versions of bwBASIC, the existance of the keywords CLS,
+ COLOR and LOCATE were determined at compile and BWB.IMPLEMENTATION$
+ was used at runtime to determine whether these keywords existed.
+ In the current version, these keywords always exist and are now
+ controlled at runtime using the OPTION TERMINAL commands. With
+ OPTION TERMINAL NONE these keywords output nothing.
+
+
+6. UNIMPLEMENTED COMMANDS AND FUNCTIONS, and AGENDA FOR DEVELOPMENT
+
+
+ There are some items not implemented that have been so long
+ a part of some BASIC dialects that their absence may seem surprising.
+ In each case, though, their implementation would require
+ operating-system-specific functions or terminal-specific functions
+ that cannot be universally provided. Some specific examples are
+ detailed below.
+
+
+ INP reads a value from a hardware port. In the current version,
+ using INP() will generate ERROR 73. It is expected that you will
+ provide a suitable implementation for your specific application.
+ For example:
+ FUNCTION INP( X )
+ REM Return whatever value your application requires
+ INP = 0
+ END FUNCTION
+
+
+ OUT writes a value to a hardware port. In the current version,
+ using OUT() will generate ERROR 73. It is expected that you will
+ provide a suitable implementation for your specific application.
+ For example:
+ SUB OUT( X, Y )
+ REM do whatever your application requires
+ END SUB
+
+
+ PEEK reads a value from a memory location. In the current version,
+ using PEEK() will generate ERROR 73. It is expected that you will
+ provide a suitable implementation for your specific application.
+ For example:
+ FUNCTION PEEK( X )
+ REM Return whatever value your application requires
+ PEEK = 0
+ END FUNCTION
+
+
+ POKE writes a value to a memory location. In the current version,
+ using POKE() will generate ERROR 73. It is expected that you will
+ provide a suitable implementation for your specific application.
+ For example:
+ SUB POKE( X, Y )
+ REM do whatever your application requires
+ END SUB
+
+
+ WAIT reads a value from a hardware port. In the current version,
+ using WAIT() will generate ERROR 73. It is expected that you will
+ provide a suitable implementation for your specific application.
+ For example:
+ SUB WAIT( X, Y )
+ REM do whatever your application requires
+ END SUB
+ SUB WAIT( X, Y, Z )
+ REM do whatever your application requires
+ END SUB
+
+
+ USR executes a machine code routine. In the current version,
+ using USR() will generate ERROR 73. It is expected that you will
+ provide a suitable implementation for your specific application.
+ For example:
+ FUNCTION USR( ... )
+ REM Return whatever value your application requires
+ USR = 0
+ END FUNCTION
+
+
+ VARPTR reads a value from a memory location. In the current version,
+ using VARPTR() will generate ERROR 73. It is expected that you will
+ provide a suitable implementation for your specific application.
+ For example:
+ FUNCTION VARPTR( ... )
+ REM Return whatever value your application requires
+ VARPTR = 0
+ END FUNCTION
+
+
+ There are other commands, functions, and implementation details
+ that I am working on, and which are on the agenda list for future
+ versions of bwBASIC. These agenda include:
+
+
+ PARACT i.e., the ability to execute PARallel ACTions. This
+ is described in ANSI BASIC, although I have not seen it
+ implemented before. It will offer a rough, non-preemptive
+ form of multitasking within the scope of a BASIC program.
+ Programmers will note that the global My pointer provides
+ one possible hook mechanism for PARACT in bwBASIC. In the
+ interim, you might use the "ON TIMER" command to implement
+ a simple multitasking BASIC program.
+
+
+ XMEM PC-type computers usually are able to use extended
+ memory. If we could use extended memory for program
+ lines, variables, and function defitions, we could
+ write much longer programs. This would entail,
+ however, a fairly serious rewriting of the program
+ to utilize memory handles for these storage features
+ instead of direct memory pointers. In the interim,
+ you might use a "DOS Extender" which hooks calloc()
+ and free() to enable transparent access to EMS or XMS
+ memory.
+
+
+ Windows The addition of memory handles in addition to the
+ non-preemptive execution of program lines (in a
+ crude form, already present) will make it possible
+ to develop implementations for Windows and perhaps
+ for other graphical user interfaces. But what form
+ should this take? I have in mind presently a BASIC
+ that would run in the background, appearing only
+ as an icon in the GUI space, with pop-up editors
+ and output windows. Thus, the interpreted language
+ would serve a purpose something like 'cron' (a task
+ scheduler) under Unix systems. You may have some
+ reflections that would help me in this.
+
+
+ Graphics Here we face fairly critical differences in different
+ styles and implementations of graphics, e.g., between
+ GWBASIC, ANSI BASIC, VisualBASIC, etc. But it's
+ possible that Graphics commands and functions could
+ be added. These would all be OPTION VERSION specific.
+ In the interim, you might consider using ReGIS or Tektronix
+ graphics (ESC codes) with xterm.
+
+
+ The ANSI Standard for full BASIC does not specify which particular
+ commands or functions must be implemented, and in fact the standard
+ is very robust. Perhaps no implementation of BASIC would ever
+ include all of the items, but some ANSI commands and functions which
+ remain unimplemented are:
+
+ ACCESS
+ AREA
+ ARRAY
+ ASK
+ BSTR
+ BVAL
+ CELLS
+ CLIP
+ COLLATE
+ CONNECT
+ DATUM
+ DEBUG
+ DECLARE
+ DEVICE
+ DISCONNECT
+ DISPLAY
+ DOT
+ DRAW
+ ERASE
+ EVENT
+ EXCEPTION
+ GRAPH
+ HANDLER
+ IMAGE
+ KEY
+ LINES
+ MIX
+ MULTIPOINT
+ OUTIN
+ OUTPUT
+ PARACT
+ PICTURE
+ PIXEL
+ PLOT
+ POINTS
+ RECEIVE
+ RENUMBER
+ REWRITE
+ ROTATE
+ SEIZE
+ SEND
+ SHIFT
+ TIMEOUT
+ TRACE
+ TRANSFORM
+ VIEWPORT
+ WAIT
+ VIEWPORT
+ ZONEWIDTH
+
+
+7. THE STORY OF Bywater BASIC
+
+
+ This program was originally begun in 1982 by my grandmother, Mrs.
+ Verda Spell of Beaumont, TX. She was writing the program using
+ an ANSI C compiler on an Osborne I CP/M computer and although my
+ grandfather (Lockwood Spell) had bought an IBM PC with 256k of
+ RAM my grandmother would not use it, paraphrasing George Herbert
+ to the effect that "He who cannot in 64k program, cannot in 512k."
+ She had used Microsoft BASIC and although she had nothing against
+ it she said repeatedly that she didn't understand why Digital
+ Research didn't "sue the socks off of Microsoft" for version 1.0
+ of MSDOS and so I reckon that she hoped to undercut Microsoft's
+ entire market and eventually build a new software empire on
+ the North End of Beaumont. Her programming efforts were cut
+ tragically short when she was thrown from a Beaumont to Port
+ Arthur commuter train in the summer of 1986. I found the source
+ code to bwBASIC on a single-density Osborne diskette in her knitting
+ bag and eventually managed to have it all copied over to a PC
+ diskette. I have revised it slightly prior to this release. You
+ should know, though, that I myself am an historian, not a programmer.
+
+
+8. COMMUNICATIONS:
+
+
+ email: tcamp@delphi.com
+
+
+9. EXPANDED REFERENCE FOR COMMANDS, FUNCTIONS AND OPERATORS
+
+
+ bwBASIC provides a simple "HELP" command to refresh your memory
+ regarding the appropriate syntax for a specific command or function.
+ In the DOCS directory are text files which provide brief descriptions
+ of every intrinsic command, function and operator available in BASIC
+ dialect available in bwBASIC; these files are not intented to be an
+ authoritative or exhaustive reference. Refer to the reference document
+ for each dialect for details regarding each keyword.
+
+
+THE END
diff --git a/Junk/bwbasic.png b/Junk/bwbasic.png
new file mode 100644
index 0000000..9745723
Binary files /dev/null and b/Junk/bwbasic.png differ
diff --git a/bwbtest/HB2X/cms.bas.old b/Junk/cms.bas
similarity index 72%
rename from bwbtest/HB2X/cms.bas.old
rename to Junk/cms.bas
index 0cd6b1e..2dd98f3 100644
--- a/bwbtest/HB2X/cms.bas.old
+++ b/Junk/cms.bas
@@ -18,14 +18,17 @@ rem L$ The input line read from "bwbasic.h"
rem M$ The next line from "bwbasic.h" when L$ does not contain a semicolon
rem X The location of special characters in L$
rem H$ The hexadecimal value of N
+rem T Read count
rem -------------------------------------------------------------------------------
rem
let N = 0
let E$ = "extern "
let E = len( E$ )
open "bwbasic.h" for input as #1
-open "cms.h" for output as #2
+open "cms.txt" for output as #2
+T = 0
while not eof( #1 )
+ T = T + 1
line input #1, L$
L$ = trim$( L$ )
if left$( L$, E ) = E$ then
@@ -63,10 +66,38 @@ while not eof( #1 )
while left$( L$, 1 ) = "*"
L$ = trim$(mid$( L$, 2 ))
wend
- if L$ = "main" then
+ if L$ = "main" or L$ = "putenv" or L$="sleep" then
' ignore magic function name
else
' pad for alignment
+ REM L$ = L$ + space$(32)
+ REM L$ = left$( L$, 32 )
+ REM H$ = "00000" + hex$(N)
+ REM H$ = right$( H$, 5 )
+ REM print #2, "#define ";L$;" X";H$
+ REM N = N + 1
+ if len( L$ ) > 0 then
+ print #2, L$
+ end if
+ end if
+ end if
+wend
+print "Lines read from bwbasic.h :"; T
+close #2
+close #1
+REM sort before assigning value
+print "Sorting"
+if shell( "sort < cms.txt > cms.out" ) = 0 then
+ N = 0
+ open "cms.out" for input as #1
+ open "cms.h" for output as #2
+ T = 0
+ while not eof(#1)
+ T = T + 1
+ line input #1, L$
+ L$ = trim$(L$)
+ if len(L$) then
+ ' pad for alignment
L$ = L$ + space$(32)
L$ = left$( L$, 32 )
H$ = "00000" + hex$(N)
@@ -74,8 +105,13 @@ while not eof( #1 )
print #2, "#define ";L$;" X";H$
N = N + 1
end if
- end if
-wend
-close #2
-close #1
+ wend
+ print "Lines read from cms.out : "; T
+ close #2
+ close #1
+ rem Cleanup temporary files
+print "Output in cms.h"
+kill "cms.txt"
+kill "cms.out"
+end if
end
diff --git a/Junk/compile b/Junk/compile
new file mode 100755
index 0000000..1227be2
--- /dev/null
+++ b/Junk/compile
@@ -0,0 +1,35 @@
+echo "12/13/2019 Ken. Works under Ubuntu Linux 18.04, 19.10"
+echo "Ubuntu Mate 20.04 Debian 10 and Ubuntu under Windows WSL."
+echo " "
+rm -f bwbasic renum
+echo "Compile in progress..."
+gcc -ansi -o bwbasic bw*.c -lm
+gcc -ansi -o renum renum.c -lm
+dir -l bwbasic renum
+echo " "
+echo -e "Be sure you are NOT running this as root. You are ($USER).\a"
+echo -e -n "Results look OK?? If yes press ENTER otherwise press Ctrl/c: \a"
+read j
+echo " "
+echo "Copying in progress"
+sudo cp bwbasic /usr/local/bin/bwbasic
+sudo cp bwbasic.png /usr/share/pixmaps/bwbasic.png
+sudo cp renum /usr/local/bin/renum
+echo "Setting up mode and ownership to root."
+sudo chmod 755 /usr/local/bin/bwbasic
+sudo chown root /usr/local/bin/bwbasic
+sudo chmod 755 /usr/local/bin/renum
+sudo chown root /usr/local/bin/renum
+echo "Copying Desktop entry and icon for bwbasic on a GUI."
+echo "Entry should appear on the Desktop for $USER"
+sudo cp bwbasic.desktop /home/$USER/Desktop/.
+echo "Setting up mode and ownership for desktop entry for $USER"
+sudo chmod 777 /home/$USER/Desktop/bwbasic.desktop
+sudo chown $USER /home/$USER/Desktop/bwbasic.desktop
+echo "Copying completed"
+echo " "
+echo "You should now be able to run bwbasic from the command line or desktop."
+echo "And use renum (renumbering tool) from the command line."
+echo " "
+echo -e "-- Done --\a"
+
diff --git a/Junk/compile.bat b/Junk/compile.bat
new file mode 100644
index 0000000..38791bc
--- /dev/null
+++ b/Junk/compile.bat
@@ -0,0 +1,51 @@
+@echo off
+echo 12/13/2019 Ken. bwbasic. Works under Windows 10 using gcc 7.4.0
+echo and gcc 8.1.0 64 bit
+echo Wait
+echo.
+
+if exist *.o del *.o
+if exist bwbasic.exe del bwbasic.exe
+if exist renum.exe del renum.exe
+
+call stdcomp bwbasic.c
+call stdcomp bwb_int.c
+call stdcomp bwb_tbl.c
+call stdcomp bwb_cmd.c
+call stdcomp bwb_prn.c
+call stdcomp bwb_exp.c
+call stdcomp bwb_var.c
+call stdcomp bwb_inp.c
+call stdcomp bwb_fnc.c
+call stdcomp bwb_cnd.c
+call stdcomp bwb_dio.c
+call stdcomp bwb_str.c
+call stdcomp bwb_stc.c
+call stdcomp bwx_tty.c
+call stdcomp bwd_cmd.c
+call stdcomp bwd_fun.c
+
+gcc -s -ansi -o bwbasic.exe bwb_cmd.o bwb_cnd.o bwb_dio.o bwb_exp.o bwb_fnc.o bwb_inp.o bwb_int.o bwb_prn.o bwb_stc.o bwb_str.o bwb_tbl.o bwb_var.o bwbasic.o bwd_cmd.o bwd_fun.o bwx_tty.o
+
+gcc -s -ansi -DMSDOS -o renum.exe renum.c
+
+if exist "renum.exe" (
+ echo.
+ echo Compile suceeded for renum.exe.
+) else (
+ echo.
+ echo Compile FAILED for renum.exe.
+)
+
+if exist "bwbasic.exe" (
+ echo.
+ echo Compile suceeded for bwbasic.exe.
+) else (
+ echo.
+ echo Compile FAILED. Bwbasic.exe was not created.
+)
+
+echo.
+echo --Done--
+echo.
+@echo on
diff --git a/Junk/factorials.bas b/Junk/factorials.bas
new file mode 100644
index 0000000..3f59829
--- /dev/null
+++ b/Junk/factorials.bas
@@ -0,0 +1,6 @@
+100 f = 1
+200 FOR i = 0 TO 16
+300 PRINT i; "! ="; f
+400 f = f * (i + 1)
+500 NEXT i
+
diff --git a/Junk/renum.c b/Junk/renum.c
new file mode 100644
index 0000000..bb34a9c
--- /dev/null
+++ b/Junk/renum.c
@@ -0,0 +1,608 @@
+/*-------------------------------------------------------------------*/
+/* renum.c -- Renumbers a BASIC program in an ASCII file. */
+/* Originally written in HP 2000 BASIC by David Lance Robinson, 1977 */
+/* Adapted to MS BASIC and translated to C 4/1995 by Jon B. Volkoff */
+/* (eidetics@cerf.net) */
+/*-------------------------------------------------------------------*/
+
+#include
+#include
+#include
+
+#define MAX_LINE_LENGTH 255
+#define MAX_LINE_COUNT 1500
+
+int instr();
+char *midstr1();
+char *midstr2();
+void binary_search(void);
+
+int f2, l2, n, x;
+int sidx[MAX_LINE_COUNT][2];
+char rstr[MAX_LINE_LENGTH];
+
+int main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int f, d, s, p, s1, t, l, g;
+ int c, f1, c1, i, f8, r, l1, l3;
+ int v1, f6, l6, b, f9, x9, b1, p8, p9, a, d9;
+ char pstr[MAX_LINE_LENGTH];
+ char sstr[MAX_LINE_LENGTH];
+ char f9str[MAX_LINE_LENGTH];
+ char s9str[MAX_LINE_LENGTH];
+ char tempstr[MAX_LINE_LENGTH + 64];
+ FILE *fdin;
+ FILE *fdout;
+ int skip, bp, temp, getout, disp_msg;
+
+ f = 1;
+
+ printf("Version 12/13/2019\n");
+
+ if (argc > 1) strcpy(pstr, argv[1]);
+ else
+ {
+ printf("Program in file? ");
+ fgets(pstr,MAX_LINE_LENGTH, stdin);
+ if (strchr(pstr, '\n') != NULL)
+ {
+ pstr[strlen(pstr)-1] = '\0';
+ }
+
+ }
+ if (strlen(pstr) == 0) strcpy(pstr, "0.doc");
+
+ fdin = fopen(pstr, "r");
+ if (fdin == NULL)
+ {
+ printf("Unable to open input file\n");
+ exit(1);
+ }
+ strcpy(f9str, pstr);
+
+#if defined(__MVS__) || defined(__CMS__)
+ strcpy(pstr, "dd:editfl");
+#else
+ strcpy(pstr, "editfl");
+#endif
+
+ fdout = fopen(pstr, "w");
+ if (fdout == NULL)
+ {
+ printf("Unable to open temporary file editfl for output\n");
+ exit(1);
+ }
+
+ /* Main program begins here */
+ s = 0; l2 = 0; d = 0;
+ f2 = 10000;
+ printf ("PLEASE WAIT A FEW SECONDS!\n");
+ while (fgets(pstr, MAX_LINE_LENGTH, fdin) != NULL)
+ {
+ pstr[strlen(pstr) - 1] = '\0';
+ p = instr(pstr, " ");
+ if (p != 0 && p <= 5)
+ {
+ n = atoi(midstr2(pstr, 1, p));
+ if (n != 0)
+ {
+ s++;
+ if( s < MAX_LINE_COUNT )
+ {
+ /* OK */
+ }
+ else
+ {
+ printf("Too many lines\n");
+ exit(1);
+ }
+ sidx[s][0] = n;
+ s1 = s;
+ while (s1 >= 2)
+ {
+ s1--;
+ if (sidx[s1][0] < sidx[s1 + 1][0]) break;
+ if (sidx[s1][0] == sidx[s1 + 1][0])
+ {
+ printf("ERROR !!! MORE THAN ONE STATEMENT FOR A ");
+ printf("STATEMENT NUMBER\n");
+ exit(1);
+ }
+
+ t = sidx[s1][0];
+ sidx[s1][0] = sidx[s1 + 1][0];
+ sidx[s1 + 1][0] = t;
+ }
+ }
+ }
+ }
+ fclose(fdin);
+
+ strcpy(pstr, "");
+
+ if (s == 0)
+ {
+ printf("NO PROGRAM IS IN THE FILE!\n");
+ exit(1);
+ }
+
+ for (l = 1; l <= s; l++)
+ sidx[l][1] = sidx[l][0];
+ g = 1;
+ disp_msg = 1;
+
+ /*------------------------------------------------------------------------*/
+ /* Find out how and what to renumber (using HP BASIC renumber parameters) */
+ /* MS BASIC renumber is: RENUM (newnum) (,(oldnum) (,increment)) */
+ /*------------------------------------------------------------------------*/
+
+ while(1)
+ {
+ if (disp_msg == 1)
+ {
+ printf("RENUMBER (-starting number (,interval (,first statement ");
+ printf("(,last))))\n");
+ disp_msg = 0;
+ }
+
+ skip = 0;
+ bp = 0;
+ printf("RENUMBER-");
+ fgets(pstr,MAX_LINE_LENGTH,stdin);
+ p = strlen(pstr);
+
+ if (g == 0)
+ {
+ if (strlen(pstr) == 0) break;
+ if (p == 0) skip = 1;
+ else
+ {
+ t = atoi(midstr2(pstr, 1, 1));
+ if (t == 0) break;
+ }
+ }
+
+ if (strlen(pstr) == 0) skip = 1;
+
+ if (skip == 0)
+ {
+ c = instr(pstr, ",");
+ temp = 0; if (c != 0) temp = -1;
+ f1 = atoi(midstr2(pstr, 1, p + temp*(p - c + 1)));
+ if (f1 == 0) bp = 1;
+ if (c == 0) skip = 2;
+ }
+
+ if (skip == 0 && bp == 0)
+ {
+ c1 = instr(midstr1(pstr, c + 1), ",") + c;
+ temp = 0; if (c1 != c) temp = -1;
+ i = atoi(midstr2(pstr, c + 1, p + temp*(p - c1 + 1) - c));
+ if (i == 0) bp = 1;
+ if (c1 == c) skip = 3;
+ }
+
+ if (skip == 0 && bp == 0)
+ {
+ c = instr(midstr1(pstr, c1 + 1), ",") + c1;
+ temp = 0; if (c != c1) temp = -1;
+ f8 = atoi(midstr2(pstr, c1 + 1, p + temp*(p - c + 1) - c1));
+ if (f8 == 0) bp = 1;
+ if (c == c1) skip = 4;
+ }
+
+ if (skip == 0 && bp == 0)
+ {
+ l = atoi(midstr1(pstr, c + 1));
+ if (l == 0) bp = 1;
+ }
+
+ if (bp == 0) switch (skip)
+ {
+ case 1:
+ f1 = 10;
+ i = 10;
+ f8 = 1;
+ l = 99999;
+ break;
+
+ case 2:
+ i = 10;
+ f8 = 1;
+ l = 99999;
+ break;
+
+ case 3:
+ f8 = 1;
+ l = 99999;
+ break;
+
+ case 4:
+ l = 99999;
+ break;
+ }
+
+ if (f1 < 1 || i == 0 || f8 < 1 || l < 1) bp = 1;
+
+ if (f1 > 99999 || i > 99999 || f8 > 99999 || l > 99999 || f8 > l)
+ bp = 1;
+
+ c = 0;
+ for (r = 1; r <= s; r++)
+ if (sidx[r][0] >= f8 && sidx[r][0] <= l) c = c + 1;
+ if (c == 0)
+ {
+ printf("There is nothing to renumber !!\n");
+ disp_msg = 1;
+ }
+
+ /*------------------------------------*/
+ /* Make list of new statement numbers */
+ /*------------------------------------*/
+
+ l1 = f1 + (c - 1)*i;
+ if (l1 < 1 || l1 > 99999) bp = 1;
+
+ x = 0; c = 0;
+ if (bp == 0 && disp_msg == 0) for (r = 1; r <= s; r++)
+ {
+ if (sidx[r][0] < f8 || sidx[r][0] > l)
+ if (sidx[r][1] >= f1 && sidx[r][1] <= l1)
+ {
+ printf("SEQUENCE NUMBER OVERLAP\n");
+ exit(1);
+ }
+ else {}
+ else
+ {
+ if (sidx[r][0] != f1 + c*i)
+ {
+ if (x == 0)
+ {
+ if (r < f2) f2 = r;
+ x = 1;
+ }
+
+ if (r > l2) l2 = r;
+ }
+
+ sidx[r][1] = f1 + c*i;
+ c++;
+ l3 = r;
+ }
+ }
+
+ if (bp == 0 && disp_msg == 0) g = 0;
+
+ if (bp == 1) printf("BAD PARAMETER\n");
+ }
+
+ /*-------------------*/
+ /* Start renumbering */
+ /*-------------------*/
+
+ if (l2 == 0)
+ {
+ printf("NOTHING RENUMBERED!\n");
+ exit(1);
+ }
+
+ printf("RENUMBERING\n");
+
+/*
+ for (r = 1; r <= s; r ++)
+ printf("%d -> %d\n", sidx[r][0], sidx[r][1]);
+ */
+
+ printf("VERIFY? N or n cancels:");
+ fgets(pstr,MAX_LINE_LENGTH,stdin);
+ v1 = 0;
+ if (strcmp(midstr2(pstr, 1, 1), "N") == 0) v1 = 1;
+ if (strcmp(midstr2(pstr, 1, 1), "n") == 0) v1 = 1;
+
+ if (v1 == 1) {
+ printf("Operation cancelled\n");
+ exit(1);
+ }
+
+ fdin = fopen(f9str, "r");
+ if (fdin == NULL)
+ {
+ printf("Unable to open input file\n");
+ exit(1);
+ }
+
+ f6 = sidx[f2][0];
+ l6 = sidx[l2][0];
+
+ while (fgets(pstr, MAX_LINE_LENGTH, fdin) != NULL)
+ {
+ pstr[strlen(pstr) - 1] = '\0';
+ b = instr(pstr, " ");
+ if (b != 0)
+ {
+ n = atoi(midstr2(pstr, 1, b));
+ if (n != 0)
+ {
+ if (n >= f6 && n <= l6)
+ {
+ binary_search();
+ if (x == 0)
+ {
+ strcat(rstr, midstr1(pstr, b));
+ strcpy(pstr, rstr);
+ b = instr(pstr, " ");
+ }
+ }
+ b++;
+
+ /*-------------------------------------------------------------*/
+ /* There are differences, of course, between processing for HP */
+ /* BASIC and MS BASIC. */
+ /* */
+ /* CONVERT, PRINT USING, and MAT PRINT USING changes are not */
+ /* applicable in MS BASIC. */
+ /* */
+ /* Had to also add capability for multiple statements here. */
+ /*-------------------------------------------------------------*/
+
+ while(1)
+ {
+ if (strcmp(midstr2(pstr, b, 3), "REM") == 0 ||
+ strcmp(midstr2(pstr, b, 1), "'") == 0) break;
+
+ f9 = 0;
+ skip = 0;
+ for (x9 = b; x9 <= strlen(pstr); x9++)
+ {
+ if ((char)(*midstr2(pstr, x9, 1)) == 34)
+ {
+ if (f9 == 0)
+ f9 = 1;
+ else
+ f9 = 0;
+ }
+ else if (strcmp(midstr2(pstr, x9, 1), ":") == 0 &&
+ f9 == 0)
+ {
+ b1 = x9 - 1;
+ skip = 1;
+ break;
+ }
+ }
+ if (skip == 0) b1 = strlen(pstr);
+
+ t = instr("GOSGOTIF ON RESRET", midstr2(pstr, b, 3));
+
+ temp = (t + 5)/3;
+ if (temp != 1)
+ {
+ if (temp == 2 || temp == 3 || temp == 4 || temp == 6 ||
+ temp == 7)
+ {
+ /*-------------------------------------------------*/
+ /* Change GOSUB, GOTO, IF, RESTORE, RESUME, RETURN */
+ /* routine. */
+ /* Go word by word through the statement. */
+ /*-------------------------------------------------*/
+ getout = 0;
+ p8 = b;
+ strcpy(s9str, " ");
+ }
+ else if (temp == 5)
+ {
+ /*---------------------------------------------------*/
+ /* Change ON event/expression GOSUB/GOTO routine. */
+ /* Find starting point appropriate to this statement */
+ /* type. */
+ /*---------------------------------------------------*/
+ getout = 1;
+ for (x9 = b1; x9 >= b; x9--)
+ {
+ if (strcmp(midstr2(pstr, x9, 1), " ") == 0)
+ {
+ p8 = x9 + 1;
+ getout = 0;
+ break;
+ }
+ }
+
+ if (getout == 0) strcpy(s9str, ",");
+ }
+
+ /* Start looping here */
+ if (getout == 0) while(1)
+ {
+ f9 = 0;
+ skip = 0;
+ for (x9 = p8; x9 <= b1; x9++)
+ {
+ if ((char)(*midstr2(pstr, x9, 1)) == 34)
+ {
+ if (f9 == 0)
+ f9 = 1;
+ else
+ f9 = 0;
+ }
+ else if (strcmp(midstr2(pstr, x9, 1), s9str) == 0 &&
+ f9 == 0)
+ {
+ p9 = x9 - 1;
+ skip = 1;
+ break;
+ }
+ }
+ if (skip == 0) p9 = b1;
+
+ skip = 0;
+ for (x9 = p8; x9 <= p9; x9++)
+ {
+ a = (char)(*midstr2(pstr, x9, 1));
+ if (a < 48 || a > 57)
+ {
+ skip = 1;
+ break;
+ }
+ }
+
+ if (skip == 0)
+ {
+ /*---------------------*/
+ /* Found a line number */
+ /*---------------------*/
+ n = atoi(midstr2(pstr, p8, p9 - p8 + 1));
+ if (n != 0)
+ {
+ if (n >= f6 && n <= l6)
+ {
+ binary_search();
+ if (x == 0)
+ {
+ if (p9 == strlen(pstr))
+ {
+ strcpy(tempstr, midstr2(pstr, 1, p8 - 1));
+ strcat(tempstr, rstr);
+ strcpy(pstr, tempstr);
+ }
+ else
+ {
+ strcpy(tempstr, midstr2(pstr, 1, p8 - 1));
+ strcat(tempstr, rstr);
+ strcat(tempstr, midstr1(pstr, p9 + 1));
+ strcpy(pstr, tempstr);
+ }
+
+ /*-----------------------------------*/
+ /* Adjust indices to account for new */
+ /* substring length, if any. */
+ /*-----------------------------------*/
+ d9 = strlen(rstr) - (p9 - p8 + 1);
+ p9 = p9 + d9;
+ b1 = b1 + d9;
+ }
+ }
+ }
+ }
+
+ p8 = p9 + 2;
+ if (p8 > b1) break;
+ }
+ }
+
+ /*--------------------------------------------------*/
+ /* No more words to process in the statement, go to */
+ /* next statement. */
+ /*--------------------------------------------------*/
+ if (b1 == strlen(pstr)) break;
+ b = b1 + 2;
+ }
+ }
+ }
+
+ fprintf(fdout, "%s\n", pstr);
+ if (v1 == 0) printf("%s\n", pstr);
+ }
+
+ fclose(fdin);
+ fclose(fdout);
+
+#if !defined(__MVS__) && !defined(__CMS__) && !defined(MSDOS)
+ tempstr[strlen(tempstr)] = '\0';
+ sprintf(tempstr, "cp editfl %s", f9str);
+ system(tempstr);
+#endif
+#if defined(MSDOS)
+ tempstr[strlen(tempstr)] = '\0';
+ sprintf(tempstr, "copy editfl %s", f9str);
+ system(tempstr);
+#endif
+
+ return (0);
+}
+
+
+int instr(astr, bstr)
+ char *astr, *bstr;
+{
+ char *p;
+ int q;
+
+ p = strstr(astr, bstr);
+ if (p == NULL)
+ {
+ q = 0;
+ }
+ else
+ {
+ q = (p - astr) + 1;
+ }
+ return q;
+}
+
+
+char *midstr1(astr, start)
+ char *astr;
+ int start;
+{
+ static char tempstr[MAX_LINE_LENGTH];
+ char *startptr;
+
+ strcpy(tempstr, astr);
+ startptr = (char *)((long)(tempstr) + start - 1);
+
+ return startptr;
+}
+
+
+char *midstr2(astr, start, len)
+ char *astr;
+ int start, len;
+{
+ static char tempstr[MAX_LINE_LENGTH];
+ char *startptr, *endptr;
+
+ strcpy(tempstr, astr);
+ startptr = (char *)((long)(tempstr) + start - 1);
+ endptr = (char *)((long)(tempstr) + start + len - 1);
+ strcpy(endptr, "\0");
+
+ return startptr;
+}
+
+
+void binary_search(void)
+{
+ int f5, l5;
+
+ f5 = f2;
+ l5 = l2 + 1;
+
+ while(1)
+ {
+ int m;
+
+ m = (f5 + l5)/2;
+
+ if (sidx[m][0] == n)
+ {
+ rstr[strlen(rstr)] = '\0';
+ sprintf(rstr, "%d", sidx[m][1]);
+ x = 0;
+ return;
+ }
+
+ if (m == f5 || m == l5)
+ {
+ x = 1;
+ return;
+ }
+
+ if (sidx[m][0] < n)
+ f5 = m;
+ else
+ l5 = m;
+ }
+}
+
diff --git a/Junk/res.bas b/Junk/res.bas
new file mode 100644
index 0000000..c620f70
--- /dev/null
+++ b/Junk/res.bas
@@ -0,0 +1,7 @@
+ 100 for j = 1 to 22
+ 200 print j
+ 300 next j
+ 400 for j = 1 to 80
+ 500 print "I";
+ 600 next j
+
diff --git a/Junk/stdcomp.bat b/Junk/stdcomp.bat
new file mode 100644
index 0000000..3df173b
--- /dev/null
+++ b/Junk/stdcomp.bat
@@ -0,0 +1 @@
+gcc -w -c -ansi -I . %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/Makefile.in b/Makefile.in
index 5e6b018..bf4058e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,115 +1,115 @@
-# Unix Makefile for Bywater BASIC Interpreter
-
-##---------------------------------------------------------------##
-## NOTE: Modifications marked "JBV" were made by Jon B. Volkoff, ##
-## 11/1995 (eidetics@cerf.net). ##
-##---------------------------------------------------------------##
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-CC = @CC@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-DEFS = @DEFS@
-
-# Revised by JBV
-#CFLAGS = -O
-CFLAGS = -g -ansi -DHAVE_UNIX
-
-# Revised by JBV
-#LDFLAGS = -s
-
-prefix = /usr/local
-exec_prefix = $(prefix)
-bindir = $(exec_prefix)/bin
-
-SHELL = /bin/sh
-
-CFILES= 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
-
-OFILES= bwbasic.o bwb_cmd.o bwb_cnd.o bwb_dio.o\
- bwb_exp.o bwb_fnc.o bwb_inp.o bwb_int.o\
- bwb_prn.o bwb_stc.o bwb_str.o bwb_tbl.o\
- bwb_var.o bwd_cmd.o bwd_fun.o bwx_tty.o
-
-HFILES= bwbasic.h
-
-MISCFILES= COPYING INSTALL Makefile.in README bwbasic.doc\
- bwbasic.mak configure.in configure makefile.qcl\
- bwb_tcc.c bwx_iqc.c bwx_iqc.h
-
-TESTFILES= \
- abs.bas assign.bas callfunc.bas callsub.bas chain1.bas\
- chain2.bas dataread.bas deffn.bas dim.bas doloop.bas\
- dowhile.bas elseif.bas end.bas err.bas fncallfn.bas\
- fornext.bas function.bas gosub.bas gotolabl.bas ifline.bas\
- index.txt input.bas lof.bas loopuntl.bas main.bas\
- mlifthen.bas on.bas onerr.bas onerrlbl.bas ongosub.bas\
- opentest.bas option.bas putget.bas random.bas selcase.bas\
- snglfunc.bas stop.bas term.bas whilwend.bas width.bas\
- writeinp.bas pascaltr.bas
-
-DISTFILES= $(CFILES) $(HFILES) $(MISCFILES)
-
-# Revised by JBV
-#all: bwbasic
-all: bwbasic renum
-
-bwbasic: $(OFILES)
- $(CC) $(OFILES) -lm -o $@ $(LDFLAGS)
-
-# Added by JBV
-renum:
- $(CC) renum.c -o renum
-
-$(OFILES): $(HFILES)
-
-.c.o:
- $(CC) -c $(CPPFLAGS) -I$(srcdir) $(DEFS) $(CFLAGS) $<
-
-install: all
- $(INSTALL_PROGRAM) bwbasic $(bindir)/bwbasic
-
-uninstall:
- rm -f $(bindir)/bwbasic
-
-Makefile: Makefile.in config.status
- $(SHELL) config.status
-config.status: configure
- $(SHELL) config.status --recheck
-configure: configure.in
- cd $(srcdir); autoconf
-
-TAGS: $(CFILES)
- etags $(CFILES)
-
-clean:
- rm -f *.o bwbasic core
-
-mostlyclean: clean
-
-distclean: clean
- rm -f Makefile config.status
-
-realclean: distclean
- rm -f TAGS
-
-dist: $(DISTFILES)
- echo bwbasic-2.61 > .fname
- rm -rf `cat .fname`
- mkdir `cat .fname`
- ln $(DISTFILES) `cat .fname`
- mkdir `cat .fname`/bwbtest
- cd bwbtest; ln $(TESTFILES) ../`cat ../.fname`/bwbtest
- tar czhf `cat .fname`.tar.gz `cat .fname`
- rm -rf `cat .fname` .fname
-
-# Prevent GNU make v3 from overflowing arg limit on SysV.
-.NOEXPORT:
+# Unix Makefile for Bywater BASIC Interpreter
+
+##---------------------------------------------------------------##
+## NOTE: Modifications marked "JBV" were made by Jon B. Volkoff, ##
+## 11/1995 (eidetics@cerf.net). ##
+##---------------------------------------------------------------##
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+DEFS = @DEFS@
+
+# Revised by JBV
+#CFLAGS = -O
+CFLAGS = -g -ansi -DHAVE_UNIX
+
+# Revised by JBV
+#LDFLAGS = -s
+
+prefix = /usr/local
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+
+SHELL = /bin/sh
+
+CFILES= 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
+
+OFILES= bwbasic.o bwb_cmd.o bwb_cnd.o bwb_dio.o\
+ bwb_exp.o bwb_fnc.o bwb_inp.o bwb_int.o\
+ bwb_prn.o bwb_stc.o bwb_str.o bwb_tbl.o\
+ bwb_var.o bwd_cmd.o bwd_fun.o bwx_tty.o
+
+HFILES= bwbasic.h
+
+MISCFILES= COPYING INSTALL Makefile.in README bwbasic.doc\
+ bwbasic.mak configure.in configure makefile.qcl\
+ bwb_tcc.c bwx_iqc.c bwx_iqc.h
+
+TESTFILES= \
+ abs.bas assign.bas callfunc.bas callsub.bas chain1.bas\
+ chain2.bas dataread.bas deffn.bas dim.bas doloop.bas\
+ dowhile.bas elseif.bas end.bas err.bas fncallfn.bas\
+ fornext.bas function.bas gosub.bas gotolabl.bas ifline.bas\
+ index.txt input.bas lof.bas loopuntl.bas main.bas\
+ mlifthen.bas on.bas onerr.bas onerrlbl.bas ongosub.bas\
+ opentest.bas option.bas putget.bas random.bas selcase.bas\
+ snglfunc.bas stop.bas term.bas whilwend.bas width.bas\
+ writeinp.bas pascaltr.bas
+
+DISTFILES= $(CFILES) $(HFILES) $(MISCFILES)
+
+# Revised by JBV
+#all: bwbasic
+all: bwbasic renum
+
+bwbasic: $(OFILES)
+ $(CC) $(OFILES) -lm -o $@ $(LDFLAGS)
+
+# Added by JBV
+renum:
+ $(CC) renum.c -o renum
+
+$(OFILES): $(HFILES)
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) -I$(srcdir) $(DEFS) $(CFLAGS) $<
+
+install: all
+ $(INSTALL_PROGRAM) bwbasic $(bindir)/bwbasic
+
+uninstall:
+ rm -f $(bindir)/bwbasic
+
+Makefile: Makefile.in config.status
+ $(SHELL) config.status
+config.status: configure
+ $(SHELL) config.status --recheck
+configure: configure.in
+ cd $(srcdir); autoconf
+
+TAGS: $(CFILES)
+ etags $(CFILES)
+
+clean:
+ rm -f *.o bwbasic core
+
+mostlyclean: clean
+
+distclean: clean
+ rm -f Makefile config.status
+
+realclean: distclean
+ rm -f TAGS
+
+dist: $(DISTFILES)
+ echo bwbasic-2.61 > .fname
+ rm -rf `cat .fname`
+ mkdir `cat .fname`
+ ln $(DISTFILES) `cat .fname`
+ mkdir `cat .fname`/bwbtest
+ cd bwbtest; ln $(TESTFILES) ../`cat ../.fname`/bwbtest
+ tar czhf `cat .fname`.tar.gz `cat .fname`
+ rm -rf `cat .fname` .fname
+
+# Prevent GNU make v3 from overflowing arg limit on SysV.
+.NOEXPORT:
diff --git a/Makefile.ncu b/Makefile.ncu
index 70f2c4b..ec4e8e9 100644
--- a/Makefile.ncu
+++ b/Makefile.ncu
@@ -1,121 +1,121 @@
-# Generated automatically from Makefile.in by configure.
-# Unix Makefile for Bywater BASIC Interpreter
-
-##---------------------------------------------------------------##
-## NOTE: Modifications marked "JBV" were made by Jon B. Volkoff, ##
-## 10/1995 (eidetics@cerf.net). ##
-##---------------------------------------------------------------##
-
-# 2015-04-25 Updated for version 3.00 by Howard Wulf, AF5NE
-
-srcdir = .
-VPATH = .
-
-CC = cc
-
-INSTALL = cp
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL)
-
-DEFS = -DHAVE_STRING=1 -DHAVE_STDLIB=1 -DHAVE_RAISE=1 -DHAVE_UNISTD=1
-
-# Revised by JBV
-#CFLAGS = -O
-CFLAGS = -g -ansi -DHAVE_UNIX
-
-# Revised by JBV
-#LDFLAGS = -s
-
-prefix = /usr/local
-exec_prefix = $(prefix)
-bindir = $(exec_prefix)/bin
-
-SHELL = /bin/sh
-
-CFILES= 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
-
-OFILES= bwbasic.o bwb_cmd.o bwb_cnd.o bwb_dio.o\
- bwb_exp.o bwb_fnc.o bwb_inp.o bwb_int.o\
- bwb_prn.o bwb_stc.o bwb_str.o bwb_tbl.o\
- bwb_var.o bwd_cmd.o bwd_fun.o bwx_tty.o
-
-
-HFILES= bwbasic.h
-
-MISCFILES= COPYING INSTALL Makefile.in README bwbasic.doc\
- bwbasic.mak configure.in configure makefile.qcl
-
-TESTFILES= \
- abs.bas assign.bas callfunc.bas callsub.bas chain1.bas\
- chain2.bas dataread.bas deffn.bas dim.bas doloop.bas\
- dowhile.bas elseif.bas end.bas err.bas fncallfn.bas\
- fornext.bas function.bas gosub.bas gotolabl.bas ifline.bas\
- index.txt input.bas lof.bas loopuntl.bas main.bas\
- mlifthen.bas on.bas onerr.bas onerrlbl.bas ongosub.bas\
- opentest.bas option.bas putget.bas random.bas selcase.bas\
- snglfunc.bas stop.bas term.bas whilwend.bas width.bas\
- writeinp.bas pascaltr.bas
-
-DISTFILES= $(CFILES) $(HFILES) $(MISCFILES)
-
-# Revised by JBV
-#all: bwbasic
-all: bwbasic renum
-
-bwbasic: $(OFILES)
- $(CC) $(OFILES) -lm -o $@ $(LDFLAGS)
-
-# Added by JBV
-renum:
- $(CC) renum.c -o renum
-
-$(OFILES): $(HFILES)
-
-.c.o:
- $(CC) -c $(CPPFLAGS) -I$(srcdir) $(DEFS) $(CFLAGS) $<
-
-install: all
- $(INSTALL_PROGRAM) bwbasic $(bindir)/bwbasic
-
-uninstall:
- rm -f $(bindir)/bwbasic
-
-Makefile: Makefile.in config.status
- $(SHELL) config.status
-config.status: configure
- $(SHELL) config.status --recheck
-configure: configure.in
- cd $(srcdir); autoconf
-
-TAGS: $(CFILES)
- etags $(CFILES)
-
-clean:
- rm -f *.o bwbasic core
-
-mostlyclean: clean
-
-distclean: clean
- rm -f Makefile config.status
-
-realclean: distclean
- rm -f TAGS
-
-# Version number changed to 2.61 by PE
-dist: $(DISTFILES)
- echo bwbasic-3.00 > .fname
- rm -rf `cat .fname`
- mkdir `cat .fname`
- ln $(DISTFILES) `cat .fname`
- mkdir `cat .fname`/bwbtest
- cd bwbtest; ln $(TESTFILES) ../`cat ../.fname`/bwbtest
- tar czhf `cat .fname`.tar.gz `cat .fname`
- rm -rf `cat .fname` .fname
-
-# Prevent GNU make v3 from overflowing arg limit on SysV.
-.NOEXPORT:
-
-# EOF
+# Generated automatically from Makefile.in by configure.
+# Unix Makefile for Bywater BASIC Interpreter
+
+##---------------------------------------------------------------##
+## NOTE: Modifications marked "JBV" were made by Jon B. Volkoff, ##
+## 10/1995 (eidetics@cerf.net). ##
+##---------------------------------------------------------------##
+
+# 2015-04-25 Updated for version 3.00 by Howard Wulf, AF5NE
+
+srcdir = .
+VPATH = .
+
+CC = cc
+
+INSTALL = cp
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_DATA = $(INSTALL)
+
+DEFS = -DHAVE_STRING=1 -DHAVE_STDLIB=1 -DHAVE_RAISE=1 -DHAVE_UNISTD=1
+
+# Revised by JBV
+#CFLAGS = -O
+CFLAGS = -g -ansi -DHAVE_UNIX
+
+# Revised by JBV
+#LDFLAGS = -s
+
+prefix = /usr/local
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+
+SHELL = /bin/sh
+
+CFILES= 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
+
+OFILES= bwbasic.o bwb_cmd.o bwb_cnd.o bwb_dio.o\
+ bwb_exp.o bwb_fnc.o bwb_inp.o bwb_int.o\
+ bwb_prn.o bwb_stc.o bwb_str.o bwb_tbl.o\
+ bwb_var.o bwd_cmd.o bwd_fun.o bwx_tty.o
+
+
+HFILES= bwbasic.h
+
+MISCFILES= COPYING INSTALL Makefile.in README bwbasic.doc\
+ bwbasic.mak configure.in configure makefile.qcl
+
+TESTFILES= \
+ abs.bas assign.bas callfunc.bas callsub.bas chain1.bas\
+ chain2.bas dataread.bas deffn.bas dim.bas doloop.bas\
+ dowhile.bas elseif.bas end.bas err.bas fncallfn.bas\
+ fornext.bas function.bas gosub.bas gotolabl.bas ifline.bas\
+ index.txt input.bas lof.bas loopuntl.bas main.bas\
+ mlifthen.bas on.bas onerr.bas onerrlbl.bas ongosub.bas\
+ opentest.bas option.bas putget.bas random.bas selcase.bas\
+ snglfunc.bas stop.bas term.bas whilwend.bas width.bas\
+ writeinp.bas pascaltr.bas
+
+DISTFILES= $(CFILES) $(HFILES) $(MISCFILES)
+
+# Revised by JBV
+#all: bwbasic
+all: bwbasic renum
+
+bwbasic: $(OFILES)
+ $(CC) $(OFILES) -lm -o $@ $(LDFLAGS)
+
+# Added by JBV
+renum:
+ $(CC) renum.c -o renum
+
+$(OFILES): $(HFILES)
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) -I$(srcdir) $(DEFS) $(CFLAGS) $<
+
+install: all
+ $(INSTALL_PROGRAM) bwbasic $(bindir)/bwbasic
+
+uninstall:
+ rm -f $(bindir)/bwbasic
+
+Makefile: Makefile.in config.status
+ $(SHELL) config.status
+config.status: configure
+ $(SHELL) config.status --recheck
+configure: configure.in
+ cd $(srcdir); autoconf
+
+TAGS: $(CFILES)
+ etags $(CFILES)
+
+clean:
+ rm -f *.o bwbasic core
+
+mostlyclean: clean
+
+distclean: clean
+ rm -f Makefile config.status
+
+realclean: distclean
+ rm -f TAGS
+
+# Version number changed to 2.61 by PE
+dist: $(DISTFILES)
+ echo bwbasic-3.00 > .fname
+ rm -rf `cat .fname`
+ mkdir `cat .fname`
+ ln $(DISTFILES) `cat .fname`
+ mkdir `cat .fname`/bwbtest
+ cd bwbtest; ln $(TESTFILES) ../`cat ../.fname`/bwbtest
+ tar czhf `cat .fname`.tar.gz `cat .fname`
+ rm -rf `cat .fname` .fname
+
+# Prevent GNU make v3 from overflowing arg limit on SysV.
+.NOEXPORT:
+
+# EOF
diff --git a/abs.bas b/abs.bas
new file mode 100644
index 0000000..ebc2813
--- /dev/null
+++ b/abs.bas
@@ -0,0 +1,5 @@
+500 rem ABS.BAS -- Test ABS() function
+505 X = -1.23456789
+510 ABSX = ABS( X )
+515 print "The absolute value of "; X; " is"; ABSX
+520 print "Is that correct?"
diff --git a/allcms.exec b/allcms.exec
index ef8f686..fa47cdf 100644
--- a/allcms.exec
+++ b/allcms.exec
@@ -1,28 +1,28 @@
-* Usage - ALLCMS
-
-* This script compiles all the files on SRC disk (default is A)
-* and copies the resultant modules to the EXE disk (default B)
-
-&SRC = A
-&EXE = B
-
-
-&IF &INDEX EQ 0 &GOTO -FINARGS
-&SRC = &1
-&ARGS &2 &3 &4 &5 &6 &7 &8 &9
-
-&IF &INDEX EQ 0 &GOTO -FINARGS
-&EXE = &1
-
--FINARGS
-
-
-FILEDEF INPUT TAP1 (LRECL 0 BLKSIZE 32760 RECFM U
-MVSUNZIP DD:INPUT &SRC
-FILEDEF INPUT CLEAR
-
-
-EXEC COMPILE &SRC &EXE
-
-
-VMARC PACK * * &EXE (TAP2 BLOCK 80
+* Usage - ALLCMS
+
+* This script compiles all the files on SRC disk (default is A)
+* and copies the resultant modules to the EXE disk (default B)
+
+&SRC = A
+&EXE = B
+
+
+&IF &INDEX EQ 0 &GOTO -FINARGS
+&SRC = &1
+&ARGS &2 &3 &4 &5 &6 &7 &8 &9
+
+&IF &INDEX EQ 0 &GOTO -FINARGS
+&EXE = &1
+
+-FINARGS
+
+
+FILEDEF INPUT TAP1 (LRECL 0 BLKSIZE 32760 RECFM U
+MVSUNZIP DD:INPUT &SRC
+FILEDEF INPUT CLEAR
+
+
+EXEC COMPILE &SRC &EXE
+
+
+VMARC PACK * * &EXE (TAP2 BLOCK 80
diff --git a/bwbtest/B15A/abs.bas b/bas/abs.bas
similarity index 100%
rename from bwbtest/B15A/abs.bas
rename to bas/abs.bas
diff --git a/bwbtest/B93/assign.bas b/bas/assign.bas
similarity index 100%
rename from bwbtest/B93/assign.bas
rename to bas/assign.bas
diff --git a/bwbtest/B93/callfunc.bas b/bas/callfunc.bas
similarity index 85%
rename from bwbtest/B93/callfunc.bas
rename to bas/callfunc.bas
index 30f7178..e19d489 100644
--- a/bwbtest/B93/callfunc.bas
+++ b/bas/callfunc.bas
@@ -30,7 +30,5 @@ Function TestFnc( xarg, yarg$, tvar )
tvar = 99
Print "The value of variable is reset to "; tvar
TestFnc = xarg + tvar
-REM bwBASIC 3.20 using the function in expressions is recursion
- REM Print "The Function should return "; TestFnc
- Print "The Function should return "; xarg + tvar
+ Print "The Function should return "; TestFnc
End Function
diff --git a/bwbtest/B15A/callsub.bas b/bas/callsub.bas
similarity index 96%
rename from bwbtest/B15A/callsub.bas
rename to bas/callsub.bas
index 1315eff..4682909 100644
--- a/bwbtest/B15A/callsub.bas
+++ b/bas/callsub.bas
@@ -8,7 +8,7 @@ Print "The next printed line should be from the Subroutine."
Print
testvar = 17
-Call TestSub( 5, "Hello", testvar)
+Call TestSub 5, "Hello", testvar
Print
Print "This is back at the main program. "
diff --git a/bwbtest/B93/chain1.bas b/bas/chain1.bas
similarity index 100%
rename from bwbtest/B93/chain1.bas
rename to bas/chain1.bas
diff --git a/bwbtest/B93/chain2.bas b/bas/chain2.bas
similarity index 100%
rename from bwbtest/B93/chain2.bas
rename to bas/chain2.bas
diff --git a/bas/curve2.bas b/bas/curve2.bas
new file mode 100644
index 0000000..cb6c78d
--- /dev/null
+++ b/bas/curve2.bas
@@ -0,0 +1,13 @@
+ 50 rem 12/13/2019 Ken curve
+ 100 REM PLOT A NORMAL DISTRIBUTION CURVE
+ 120 DEF FNN(X) = EXP(-(X^2/2))/SQR(2*3.14159265)
+ 140 FOR X = -2 TO 2 STEP .1
+ 150 LET Y = FNN(X)
+ 160 LET Y = INT(100*Y)
+ 170 FOR Z = 1 TO Y
+ 180 PRINT " ";
+ 190 NEXT Z
+ 200 PRINT "*"
+ 210 NEXT X
+ 220 END
+
diff --git a/bwbtest/B93/dataread.bas b/bas/dataread.bas
similarity index 100%
rename from bwbtest/B93/dataread.bas
rename to bas/dataread.bas
diff --git a/bwbtest/B93/deffn.bas b/bas/deffn.bas
similarity index 100%
rename from bwbtest/B93/deffn.bas
rename to bas/deffn.bas
diff --git a/bwbtest/B93/dim.bas b/bas/dim.bas
similarity index 100%
rename from bwbtest/B93/dim.bas
rename to bas/dim.bas
diff --git a/bwbtest/B93/doloop.bas b/bas/doloop.bas
similarity index 100%
rename from bwbtest/B93/doloop.bas
rename to bas/doloop.bas
diff --git a/bwbtest/B93/dowhile.bas b/bas/dowhile.bas
similarity index 100%
rename from bwbtest/B93/dowhile.bas
rename to bas/dowhile.bas
diff --git a/bas/eliza.bas b/bas/eliza.bas
new file mode 100644
index 0000000..b4c13e9
--- /dev/null
+++ b/bas/eliza.bas
@@ -0,0 +1,259 @@
+ 1 rem start 12/13/2019 Ken
+ 4 CALL CLS
+ 5 PRINT TAB(16)"**************************"
+ 10 PRINT TAB(26)"ELIZA"
+ 20 PRINT TAB(20)"CREATIVE COMPUTING"
+ 30 PRINT TAB(18)"MORRISTOWN, NEW JERSEY"
+ : PRINT
+ 40 PRINT TAB(19)"ADAPTED FOR IBM PC BY"
+ 50 PRINT TAB(20)"PATRICIA DANIELSON AND PAUL HASHFIELD"
+ 52 PRINT TAB(21)"BE SURE THAT THE CAPS LOCK IS ON"
+ 53 PRINT
+ : PRINT TAB(16)"PLEASE DON'T USE COMMAS OR PERIODS IN YOUR INPUTS"
+ : PRINT
+ 55 PRINT TAB(16)"*************************"
+ 60 PRINT
+ : PRINT
+ : PRINT
+ 80 REM*****INITIALIZATION**********
+ 100 DIM S(36),R(36),N(36)
+ 105 DIM KEYWORD$(36),WORDIN$(7),WORDOUT$(7),REPLIES$(112)
+ 110 N1=36
+ : N2=14
+ : N3=112
+ 112 FOR X = 1 TO N1
+ : READ KEYWORD$(X)
+ : NEXT X
+ 114 FOR X = 1 TO N2/2
+ : READ WORDIN$(X)
+ : READ WORDOUT$(X)
+ : NEXT X
+ 116 FOR X = 1 TO N3
+ : READ REPLIES$(X)
+ : NEXT X
+ 130 FOR X=1 TO N1
+ 140 READ S(X),L
+ : R(X)=S(X)
+ : N(X)=S(X)+L-1
+ 150 NEXT X
+ 160 PRINT "HI! I'M ELIZA. WHAT'S YOUR PROBLEM?"
+ 170 REM ***********************************
+ 180 REM *******USER INPUT SECTION**********
+ 190 REM ***********************************
+ 200 INPUT I$
+ 201 I$=" "+I$+" "
+ 210 REM GET RID OF APOSTROPHES
+ 220 FOR L=1 TO LEN(I$)
+ 230 REM IF MID$(I$,L,1)="'"THEN I$=LEFT$(I$,L-1)+RIGHT$(I$,LEN(I$)-L):GOTO 230
+ 240 IF L+4>LEN(I$)THEN 250
+ 241 IF MID$(I$,L,4) <> "SHUT" THEN 250
+ 242 PRINT "O.K. IF YOU FEEL THAT WAY I'LL SHUT UP...."
+ 243 END
+ 250 NEXT L
+ 255 IF I$=P$ THEN
+ : PRINT "PLEASE DON'T REPEAT YOURSELF!"
+ : GOTO 170
+ : END IF
+ 260 REM ***********************************
+ 270 REM ********FIND KEYWORD IN I$*********
+ 280 REM ***********************************
+ 300 FOR K=1 TO N1
+ 320 FOR L=1 TO LEN (I$)-LEN (KEYWORD$(K))+1
+ 340 IF MID$(I$,L,LEN(KEYWORD$(K)))<>KEYWORD$(K) THEN 350
+ 341 IF K <> 13 THEN 349
+ 342 IF MID$(I$,L,LEN(KEYWORD$(29)))=KEYWORD$(29) THEN
+ : K = 29
+ : END IF
+ 349 F$ = KEYWORD$(K)
+ : GOTO 390
+ 350 NEXT L
+ 360 NEXT K
+ 370 K=36
+ : GOTO 570
+ : REM WE DIDN'T FIND ANY KEYWORDS
+ 380 REM ******************************************
+ 390 REM **TAKE PART OF STRING AND CONJUGATE IT****
+ 400 REM **USING THE LIST OF STRINGS TO BE SWAPPED*
+ 410 REM ******************************************
+ 430 C$=" "+RIGHT$(I$,LEN(I$)-LEN(F$)-L+1)+" "
+ 440 FOR X=1 TO N2/2
+ 460 FOR L=1 TO LEN(C$)
+ 470 IF L+LEN(WORDIN$(X))>LEN(C$) THEN 510
+ 480 IF MID$(C$,L,LEN(WORDIN$(X)))<>WORDIN$(X) THEN 510
+ 490 C$=LEFT$(C$,L-1)+WORDOUT$(X)+RIGHT$(C$,LEN(C$)-L-LEN(WORDIN$(X))+1)
+ 495 L = L+LEN(WORDOUT$(X))
+ 500 GOTO 540
+ 510 IF L+LEN(WORDOUT$(X))>LEN(C$)THEN 540
+ 520 IF MID$(C$,L,LEN(WORDOUT$(X)))<>WORDOUT$(X) THEN 540
+ 530 C$=LEFT$(C$,L-1)+WORDIN$(X)+RIGHT$(C$,LEN(C$)-L-LEN(WORDOUT$(X))+1)
+ 535 L=L+LEN(WORDIN$(X))
+ 540 NEXT L
+ 550 NEXT X
+ 555 IF MID$(C$,2,1)=" "THEN
+ : C$=RIGHT$(C$,LEN(C$)-1)
+ : END IFREM ONLY 1 SPACE
+ 556 FOR L=1 TO LEN(C$)
+ 557 IF MID$(C$,L,1)="!" THEN
+ : C$=LEFT$(C$,L-1)+RIGHT$(C$,LEN(C$)-L)
+ : GOTO 557
+ : END IF
+ 558 NEXT L
+ 560 REM **********************************************
+ 570 REM **NOW USING THE KEYWORD NUMBER (K) GET REPLY**
+ 580 REM **********************************************
+ 600 F$ = REPLIES$(R(K))
+ 610 R(K)=R(K)+1
+ : IF R(K)>N(K) THEN
+ : R(K)=S(K)
+ : END IF
+ 620 IF RIGHT$(F$,1)<>"*" THEN
+ : PRINT F$
+ : P$=I$
+ : GOTO 170
+ : END IF
+ 625 IF C$<>" " THEN 630
+ 626 PRINT "YOU WILL HAVE TO ELABORATE MORE FOR ME TO HELP YOU"
+ 627 GOTO 170
+ 630 PRINT LEFT$(F$,LEN(F$)-1);C$
+ 640 P$=I$
+ : GOTO 170
+ 1000 REM *******************************
+ 1010 REM *****PROGRAM DATA FOLLOWS******
+ 1020 REM *******************************
+ 1030 REM *********KEYWORDS**************
+ 1049 REM *******************************
+ 1050 DATA "CAN YOU ","CAN I ","YOU ARE ","YOU'RE ","I DON'T ","I FEEL "
+ 1060 DATA "WHY DON'T YOU ","WHY CAN'T I ","ARE YOU ","I CAN'T ","I AM ","I'M "
+ 1070 DATA "YOU ","I WANT ","WHAT ","HOW ","WHO ","WHERE ","WHEN ","WHY "
+ 1080 DATA "NAME ","CAUSE ","SORRY ","DREAM ","HELLO ","HI ","MAYBE "
+ 1090 DATA "NO","YOUR ","ALWAYS ","THINK ","ALIKE ","YES ","FRIEND "
+ 1100 DATA "COMPUTER", "NOKEYFOUND"
+ 1200 REM *********************************
+ 1210 REM ***STRING DATA FOR CONJUGATIONS**
+ 1220 REM *********************************
+ 1230 DATA " ARE "," AM "," WERE "," WAS "," YOU "," I "," YOUR"," MY "
+ 1235 DATA " I'VE "," YOU'VE "," I'M "," YOU'RE "
+ 1240 DATA " ME "," YOU "
+ 1300 REM ******************************
+ 1310 REM *********REPLIES**************
+ 1320 REM ******************************
+ 1330 DATA "DON'T YOU BELIEVE THAT I CAN*"
+ 1340 DATA "PERHAPS YOU WOULD LIKE TO BE LIKE ME*"
+ 1350 DATA "YOU WANT ME TO BE ABLE TO*"
+ 1360 DATA "PERHAPS YOU DON'T WANT TO*"
+ 1365 DATA "DO YOU WANT TO BE ABLE TO*"
+ 1370 DATA "WHAT MAKES YOU THINK I AM*"
+ 1380 DATA "DOES IT PLEASE YOU TO BELIEVE I AM*"
+ 1390 DATA "PERHAPS YOU WOULD LIKE TO BE*"
+ 1400 DATA "DO YOU SOMETIMES WISH YOU WERE*"
+ 1410 DATA "DON'T YOU REALLY*"
+ 1420 DATA "WHY DON'T YOU*"
+ 1430 DATA "DO YOU WISH TO BE ABLE TO*"
+ 1440 DATA "DOES THAT TROUBLE YOU*"
+ 1450 DATA "DO YOU OFTEN FEEL*"
+ 1460 DATA "DO YOU OFTEN FEEL*"
+ 1470 DATA "DO YOU ENJOY FEELING*"
+ 1480 DATA "DO YOU REALLY BELIEVE I DON'T*"
+ 1490 DATA "PERHAPS IN GOOD TIME I WILL*"
+ 1500 DATA "DO YOU WANT ME TO*"
+ 1510 DATA "DO YOU THINK YOU SHOULD BE ABLE TO*"
+ 1520 DATA "WHY CAN'T YOU*"
+ 1530 DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*"
+ 1540 DATA "WOULD YOU PREFER IF I WERE NOT*"
+ 1550 DATA "PERHAPS IN YOUR FANTASIES I AM*"
+ 1560 DATA "HOW DO YOU KNOW YOU CAN'T*"
+ 1570 DATA "HAVE YOU TRIED?"
+ 1580 DATA "PERHAPS YOU CAN NOW*"
+ 1590 DATA "DID YOU COME TO ME BECAUSE YOU ARE*"
+ 1600 DATA "HOW LONG HAVE YOU BEEN*"
+ 1610 DATA "DO YOU BELIEVE IT IS NORMAL TO BE*"
+ 1620 DATA "DO YOU ENJOY BEING*"
+ 1630 DATA "WE WERE DISCUSSING YOU--NOT ME."
+ 1640 DATA "OH, I*"
+ 1650 DATA "YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?"
+ 1660 DATA "WHAT WOULD IT MEAN TO YOU IF YOU GOT*"
+ 1670 DATA "WHY DO YOU WANT*"
+ 1680 DATA "SUPPOSE YOU SOON GOT*"
+ 1690 DATA "WHAT IF YOU NEVER GOT*"
+ 1700 DATA "I SOMETIMES ALSO WANT*"
+ 1710 DATA "WHY DO YOU ASK?"
+ 1720 DATA "DOES THAT QUESTION INTEREST YOU?"
+ 1730 DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?"
+ 1740 DATA "WHAT DO YOU THINK?"
+ 1750 DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?"
+ 1760 DATA "WHAT IS IT THAT YOU REALLY WANT TO KNOW?"
+ 1770 DATA "HAVE YOU ASKED ANYONE ELSE?"
+ 1780 DATA "HAVE YOU ASKED SUCH QUESTIONS BEFORE?"
+ 1790 DATA "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?"
+ 1800 DATA "NAMES DON'T INTEREST ME."
+ 1810 DATA "I DON'T CARE ABOUT NAMES --PLEASE GO ON."
+ 1820 DATA "IS THAT THE REAL REASON?"
+ 1830 DATA "DON'T ANY OTHER REASONS COME TO MIND?"
+ 1840 DATA "DOES THAT REASON EXPLAIN ANYTHING ELSE?"
+ 1850 DATA "WHAT OTHER REASONS MIGHT THERE BE?"
+ 1860 DATA "PLEASE DON'T APOLOGIZE!"
+ 1870 DATA "APOLOGIES ARE NOT NECESSARY."
+ 1880 DATA "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?"
+ 1890 DATA "DON'T BE SO DEFENSIVE!"
+ 1900 DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?"
+ 1910 DATA "DO YOU DREAM OFTEN?"
+ 1920 DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?"
+ 1930 DATA "ARE YOU DISTURBED BY YOUR DREAMS?"
+ 1940 DATA "HOW DO YOU DO ...PLEASE STATE YOUR PROBLEM."
+ 1950 DATA "YOU DON'T SEEM QUITE CERTAIN."
+ 1960 DATA "WHY THE UNCERTAIN TONE?"
+ 1970 DATA "CAN'T YOU BE MORE POSITIVE?"
+ 1980 DATA "YOU AREN'T SURE?"
+ 1990 DATA "DON'T YOU KNOW?"
+ 2000 DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?"
+ 2010 DATA "YOU ARE BEING A BIT NEGATIVE."
+ 2020 DATA "WHY NOT?"
+ 2030 DATA "ARE YOU SURE?"
+ 2040 DATA "WHY NO?"
+ 2050 DATA "WHY ARE YOU CONCERNED ABOUT MY*"
+ 2060 DATA "WHAT ABOUT YOUR OWN*"
+ 2070 DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?"
+ 2080 DATA "WHEN?"
+ 2090 DATA "WHAT ARE YOU THINKING OF?"
+ 2100 DATA "REALLY, ALWAYS?"
+ 2110 DATA "DO YOU REALLY THINK SO?"
+ 2120 DATA "BUT YOU ARE NOT SURE YOU*"
+ 2130 DATA "DO YOU DOUBT YOU*"
+ 2140 DATA "IN WHAT WAY?"
+ 2150 DATA "WHAT RESEMBLANCE DO YOU SEE?"
+ 2160 DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?"
+ 2170 DATA "WHAT OTHER CONNECTIONS DO YOU SEE?"
+ 2180 DATA "COULD THERE REALLY BE SOME CONNECTION?"
+ 2190 DATA "HOW?"
+ 2200 DATA "YOU SEEM QUITE POSITIVE."
+ 2210 DATA "ARE YOU SURE?"
+ 2220 DATA "I SEE."
+ 2230 DATA "I UNDERSTAND."
+ 2240 DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?"
+ 2250 DATA "DO YOUR FRIENDS WORRY YOU?"
+ 2260 DATA "DO YOUR FRIENDS PICK ON YOU?"
+ 2270 DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?"
+ 2280 DATA "DO YOU IMPOSE ON YOUR FRIENDS?"
+ 2290 DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU."
+ 2300 DATA "DO COMPUTERS WORRY YOU?"
+ 2310 DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?"
+ 2320 DATA "ARE YOU FRIGHTENED BY MACHINES?"
+ 2330 DATA "WHY DO YOU MENTION COMPUTERS?"
+ 2340 DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?"
+ 2350 DATA "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?"
+ 2360 DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?"
+ 2370 DATA "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?"
+ 2380 DATA "WHAT DOES THAT SUGGEST TO YOU?"
+ 2390 DATA "I SEE."
+ 2400 DATA "I'M NOT SURE I UNDERSTAND YOU FULLY."
+ 2410 DATA "COME COME ELUCIDATE YOUR THOUGHTS."
+ 2420 DATA "CAN YOU ELABORATE ON THAT?"
+ 2430 DATA "THAT IS QUITE INTERESTING."
+ 2500 REM *************************
+ 2510 REM *****DATA FOR FINDING RIGHT REPLIES
+ 2520 REM *************************
+ 2530 DATA 1,3,4,2,6,4,6,4,10,4,14,3,17,3,20,2,22,3,25,3
+ 2540 DATA 28,4,28,4,32,3,35,5,40,9,40,9,40,9,40,9,40,9,40,9
+ 2550 DATA 49,2,51,4,55,4,59,4,63,1,63,1,64,5,69,5,74,2,76,4
+ 2560 DATA 80,3,83,7,90,3,93,6,99,7,106,6
+
diff --git a/bwbtest/B93/elseif.bas b/bas/elseif.bas
similarity index 100%
rename from bwbtest/B93/elseif.bas
rename to bas/elseif.bas
diff --git a/bwbtest/B93/end.bas b/bas/end.bas
similarity index 100%
rename from bwbtest/B93/end.bas
rename to bas/end.bas
diff --git a/bwbtest/B93/err.bas b/bas/err.bas
similarity index 100%
rename from bwbtest/B93/err.bas
rename to bas/err.bas
diff --git a/bas/factorials.bas b/bas/factorials.bas
new file mode 100644
index 0000000..9f9a47e
--- /dev/null
+++ b/bas/factorials.bas
@@ -0,0 +1,7 @@
+ 10 rem 12/13/2019 Ken Factorials
+ 100 f = 1
+ 200 FOR i = 0 TO 16
+ 300 PRINT i; "! ="; f
+ 400 f = f * (i + 1)
+ 500 NEXT i
+
diff --git a/bas/fibonacci.bas b/bas/fibonacci.bas
new file mode 100644
index 0000000..8a5adfe
--- /dev/null
+++ b/bas/fibonacci.bas
@@ -0,0 +1,14 @@
+ 10 rem 12/13/2019 Ken Fibonacci
+ 100 DIM F(16)
+ 150 F(1) = 1
+ 200 F(2) = 1
+ 250 FOR i = 3 TO 16
+ 260 F(i) = F(i - 1) + F(i - 2)
+ 270 NEXT i
+ 280 S$ = ""
+ 290 FOR i = 1 TO 16
+ 300 S$ = S$ + STR$(F(i)) + ","
+ 350 NEXT i
+ 400 S$ = S$ + " ..."
+ 500 PRINT S$
+
diff --git a/bwbtest/B93/fncallfn.bas b/bas/fncallfn.bas
similarity index 100%
rename from bwbtest/B93/fncallfn.bas
rename to bas/fncallfn.bas
diff --git a/bwbtest/B93/fornext.bas b/bas/fornext.bas
similarity index 100%
rename from bwbtest/B93/fornext.bas
rename to bas/fornext.bas
diff --git a/bwbtest/B93/function.bas b/bas/function.bas
similarity index 100%
rename from bwbtest/B93/function.bas
rename to bas/function.bas
diff --git a/bwbtest/B93/gosub.bas b/bas/gosub.bas
similarity index 100%
rename from bwbtest/B93/gosub.bas
rename to bas/gosub.bas
diff --git a/bwbtest/B93/gotolabl.bas b/bas/gotolabl.bas
similarity index 100%
rename from bwbtest/B93/gotolabl.bas
rename to bas/gotolabl.bas
diff --git a/bas/guess2.bas b/bas/guess2.bas
new file mode 100644
index 0000000..41d902a
--- /dev/null
+++ b/bas/guess2.bas
@@ -0,0 +1,21 @@
+ 10 rem 12/13/2019 Ken guess a number game
+ 100 REM GUESSING GAME
+ 120 PRINT "GUESS THE NUMBER BETWEEN 1 AND 100."
+ 140 LET X = INT(100*RND(0)+1)
+ 150 LET N = 0
+ 160 PRINT "YOUR GUESS";
+ 170 INPUT G
+ 180 LET N = N+1
+ 190 IF G = X THEN 300
+ 200 IF G < X THEN 250
+ 210 PRINT "TOO LARGE, GUESS AGAIN"
+ 220 GOTO 160
+ 250 PRINT "TOO SMALL, GUESS AGAIN"
+ 260 GOTO 160
+ 300 PRINT "YOU GUESSED IT, IN"; N; "TRIES"
+ 310 PRINT "ANOTHER GAME (YES = 1, NO = 0)";
+ 320 INPUT A
+ 330 IF A = 1 THEN 140
+ 340 PRINT "THANKS FOR PLAYING"
+ 350 END
+
diff --git a/bwbtest/B93/ifline.bas b/bas/ifline.bas
similarity index 100%
rename from bwbtest/B93/ifline.bas
rename to bas/ifline.bas
diff --git a/bwbtest/B93/input.bas b/bas/input.bas
similarity index 100%
rename from bwbtest/B93/input.bas
rename to bas/input.bas
diff --git a/bwbtest/B93/lof.bas b/bas/lof.bas
similarity index 100%
rename from bwbtest/B93/lof.bas
rename to bas/lof.bas
diff --git a/bwbtest/B93/loopuntl.bas b/bas/loopuntl.bas
similarity index 100%
rename from bwbtest/B93/loopuntl.bas
rename to bas/loopuntl.bas
diff --git a/bwbtest/B15A/main.bas b/bas/main.bas
similarity index 98%
rename from bwbtest/B15A/main.bas
rename to bas/main.bas
index 4562510..c527072 100644
--- a/bwbtest/B15A/main.bas
+++ b/bas/main.bas
@@ -14,6 +14,4 @@ Sub Subsequent
Print "This should not print."
End Sub
-Main
-
diff --git a/bwbtest/B93/mlifthen.bas b/bas/mlifthen.bas
similarity index 100%
rename from bwbtest/B93/mlifthen.bas
rename to bas/mlifthen.bas
diff --git a/bwbtest/B93/on.bas b/bas/on.bas
similarity index 100%
rename from bwbtest/B93/on.bas
rename to bas/on.bas
diff --git a/bwbtest/B93/onerr.bas b/bas/onerr.bas
similarity index 100%
rename from bwbtest/B93/onerr.bas
rename to bas/onerr.bas
diff --git a/bwbtest/B93/onerrlbl.bas b/bas/onerrlbl.bas
similarity index 100%
rename from bwbtest/B93/onerrlbl.bas
rename to bas/onerrlbl.bas
diff --git a/bwbtest/B93/ongosub.bas b/bas/ongosub.bas
similarity index 100%
rename from bwbtest/B93/ongosub.bas
rename to bas/ongosub.bas
diff --git a/bwbtest/B93/opentest.bas b/bas/opentest.bas
similarity index 100%
rename from bwbtest/B93/opentest.bas
rename to bas/opentest.bas
diff --git a/bwbtest/B93/option.bas b/bas/option.bas
similarity index 100%
rename from bwbtest/B93/option.bas
rename to bas/option.bas
diff --git a/bwbtest/B93/pascaltr.bas b/bas/pascaltr.bas
similarity index 100%
rename from bwbtest/B93/pascaltr.bas
rename to bas/pascaltr.bas
diff --git a/bwbtest/B93/putget.bas b/bas/putget.bas
similarity index 100%
rename from bwbtest/B93/putget.bas
rename to bas/putget.bas
diff --git a/bwbtest/B93/random.bas b/bas/random.bas
similarity index 100%
rename from bwbtest/B93/random.bas
rename to bas/random.bas
diff --git a/bwbtest/B93/selcase.bas b/bas/selcase.bas
similarity index 100%
rename from bwbtest/B93/selcase.bas
rename to bas/selcase.bas
diff --git a/bwbtest/B93/snglfunc.bas b/bas/snglfunc.bas
similarity index 100%
rename from bwbtest/B93/snglfunc.bas
rename to bas/snglfunc.bas
diff --git a/bwbtest/B93/stop.bas b/bas/stop.bas
similarity index 100%
rename from bwbtest/B93/stop.bas
rename to bas/stop.bas
diff --git a/bas/tab.bas b/bas/tab.bas
new file mode 100644
index 0000000..3237231
--- /dev/null
+++ b/bas/tab.bas
@@ -0,0 +1,7 @@
+ 10 rem Showing TAB function
+ 15 rem 12/13/2019 Ken
+ 30 for x = 0 to 15 step .5
+ 40 print tab(30+15*sin(x)*exp(-.1*x));"*"
+ 50 next x
+ 60 end
+
diff --git a/bwbtest/B93/term.bas b/bas/term.bas
similarity index 100%
rename from bwbtest/B93/term.bas
rename to bas/term.bas
diff --git a/bwbtest/B93/whilwend.bas b/bas/whilwend.bas
similarity index 100%
rename from bwbtest/B93/whilwend.bas
rename to bas/whilwend.bas
diff --git a/bwbtest/B93/width.bas b/bas/width.bas
similarity index 100%
rename from bwbtest/B93/width.bas
rename to bas/width.bas
diff --git a/bwbtest/B93/writeinp.bas b/bas/writeinp.bas
similarity index 100%
rename from bwbtest/B93/writeinp.bas
rename to bas/writeinp.bas
diff --git a/bwb_cmd.c b/bwb_cmd.c
index d627d34..be2ba2d 100644
--- a/bwb_cmd.c
+++ b/bwb_cmd.c
@@ -36,6 +36,8 @@
/* */
/* Version 3.20 by Howard Wulf, AF5NE */
/* */
+/* Version 3.20A by Ken Martin Mainly corrected fprint issues */
+/* */
/*---------------------------------------------------------------*/
@@ -6260,7 +6262,7 @@ bwb_CMDS (LineType * l)
t = 0;
for (n = 0; n < NUM_COMMANDS; n++)
{
- fprintf (My->SYSOUT->cfp, IntrinsicCommandTable[n].name);
+ fprintf (My->SYSOUT->cfp, "%s", IntrinsicCommandTable[n].name);
if (t < 4)
{
fprintf (My->SYSOUT->cfp, "\t");
@@ -6659,32 +6661,32 @@ DumpAllCommandTableDefinitions (FILE * file)
fprintf (file, " ");
CommandUniqueID (i, tbuf);
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
fprintf (file, ", /* UniqueID */\n");
fprintf (file, " ");
fprintf (file, "\"");
ProcessEscapeChars (IntrinsicCommandTable[i].Syntax, tbuf);
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
fprintf (file, "\"");
fprintf (file, ", /* Syntax */\n");
fprintf (file, " ");
fprintf (file, "\"");
ProcessEscapeChars (IntrinsicCommandTable[i].Description, tbuf);
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
fprintf (file, "\"");
fprintf (file, ", /* Description */\n");
fprintf (file, " ");
fprintf (file, "\"");
- fprintf (file, IntrinsicCommandTable[i].name);
+ fprintf (file, "%s", IntrinsicCommandTable[i].name);
fprintf (file, "\"");
fprintf (file, ", /* Name */\n");
fprintf (file, " ");
CommandOptionVersion (i, tbuf);
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
fprintf (file, " /* OptionVersionBitmask */\n");
fprintf (file, "},\n");
@@ -6734,14 +6736,14 @@ DumpAllCommandSwitchStatement (FILE * file)
fprintf (file, " ");
fprintf (file, "case ");
CommandUniqueID (i, tbuf);
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
fprintf (file, ":\n");
fprintf (file, " ");
fprintf (file, " ");
fprintf (file, "r = ");
CommandVector (i, tbuf);
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
fprintf (file, "( l );\n");
fprintf (file, " ");
@@ -6961,13 +6963,13 @@ DumpAllCommandHtmlTable (FILE * file)
{
fprintf (file, "");
fprintf (file, "");
- fprintf (file, bwb_vertable[j].ID);
+ fprintf (file, "%s", bwb_vertable[j].ID);
fprintf (file, " | ");
fprintf (file, "");
- fprintf (file, bwb_vertable[j].Name);
+ fprintf (file, "%s", bwb_vertable[j].Name);
fprintf (file, " | ");
fprintf (file, "");
- fprintf (file, bwb_vertable[j].Description);
+ fprintf (file, "%s", bwb_vertable[j].Description);
fprintf (file, " | ");
fprintf (file, "
\n");
}
@@ -6989,7 +6991,7 @@ DumpAllCommandHtmlTable (FILE * file)
{
fprintf (file, "");
fprintf (file, "");
- fprintf (file, bwb_vertable[j].ID);
+ fprintf (file, "%s", bwb_vertable[j].ID);
fprintf (file, "");
fprintf (file, " | ");
}
@@ -7002,7 +7004,7 @@ DumpAllCommandHtmlTable (FILE * file)
{
fprintf (file, "");
fprintf (file, "");
- fprintf (file, (char *) IntrinsicCommandTable[i].Syntax);
+ fprintf (file, "%s", (char *) IntrinsicCommandTable[i].Syntax);
fprintf (file, " | ");
for (j = 0; j < NUM_VERSIONS; j++)
@@ -7110,7 +7112,7 @@ bwb_HELP (LineType * l)
fprintf (My->SYSOUT->cfp,
"The following topics are a partial match:\n");
}
- fprintf (My->SYSOUT->cfp, IntrinsicCommandTable[n].name);
+ fprintf (My->SYSOUT->cfp, "%s", IntrinsicCommandTable[n].name);
fprintf (My->SYSOUT->cfp, "\t");
Found = TRUE;
}
@@ -7125,7 +7127,7 @@ bwb_HELP (LineType * l)
fprintf (My->SYSOUT->cfp,
"The following topics are a partial match:\n");
}
- fprintf (My->SYSOUT->cfp, IntrinsicFunctionTable[n].Name);
+ fprintf (My->SYSOUT->cfp, "%s", IntrinsicFunctionTable[n].Name);
fprintf (My->SYSOUT->cfp, "\t");
Found = TRUE;
}
@@ -7696,7 +7698,7 @@ DumpAllFunctionSwitch (FILE * file)
fprintf (file, "case ");
IntrinsicFunctionUniqueID (&(IntrinsicFunctionTable[i]), tbuf);
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
fprintf (file, ":\n");
fprintf (file, " break;\n");
}
@@ -7796,7 +7798,7 @@ DumpAllFuctionTableDefinitions (FILE * file)
fprintf (file, " ");
fprintf (file, "\"");
ProcessEscapeChars (f->Description, tbuf);
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
fprintf (file, "\"");
fprintf (file, ", /* Description */\n");
fprintf (file, " \"%s\", /* Name */\n", f->Name);
@@ -7857,7 +7859,7 @@ DumpAllFuctionTableDefinitions (FILE * file)
}
}
bwb_strcat (tbuf, ", /* ParameterTypes */\n");
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
bwb_strcpy (tbuf, " ");
@@ -7876,7 +7878,7 @@ DumpAllFuctionTableDefinitions (FILE * file)
/* Conversion may lose significant digits */
}
bwb_strcat (tbuf, ", /* ParameterTests */\n");
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
}
bwb_strcpy (tbuf, " ");
j = 0;
@@ -7893,7 +7895,7 @@ DumpAllFuctionTableDefinitions (FILE * file)
}
}
bwb_strcat (tbuf, " /* OptionVersionBitmask */\n");
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
fprintf (file, "},\n");
}
fprintf (file, "};\n");
@@ -7965,7 +7967,7 @@ DumpOneFunctionSyntax (FILE * file, int IsXref, int n)
/* Conversion may lose significant digits */
NumVar++;
}
- fprintf (file, tbuf);
+ fprintf (file, "%s", tbuf);
fprintf (file, "\n");
ParameterTypes = ParameterTypes >> 1;
ParameterTests = ParameterTests >> 4;
@@ -8071,13 +8073,13 @@ DumpAllFunctionHtmlTable (FILE * file)
{
fprintf (file, "
");
fprintf (file, "");
- fprintf (file, bwb_vertable[j].ID);
+ fprintf (file, "%s", bwb_vertable[j].ID);
fprintf (file, " | ");
fprintf (file, "");
- fprintf (file, bwb_vertable[j].Name);
+ fprintf (file, "%s", bwb_vertable[j].Name);
fprintf (file, " | ");
fprintf (file, "");
- fprintf (file, bwb_vertable[j].Description);
+ fprintf (file, "%s", bwb_vertable[j].Description);
fprintf (file, " | ");
fprintf (file, "
\n");
}
@@ -8099,7 +8101,7 @@ DumpAllFunctionHtmlTable (FILE * file)
{
fprintf (file, "");
fprintf (file, "");
- fprintf (file, bwb_vertable[j].ID);
+ fprintf (file, "%s", bwb_vertable[j].ID);
fprintf (file, "");
fprintf (file, " | ");
}
@@ -8112,7 +8114,7 @@ DumpAllFunctionHtmlTable (FILE * file)
{
fprintf (file, "");
fprintf (file, "");
- fprintf (file, (char *) IntrinsicFunctionTable[i].Syntax);
+ fprintf (file, "%s", (char *) IntrinsicFunctionTable[i].Syntax);
fprintf (file, " | ");
for (j = 0; j < NUM_VERSIONS; j++)
@@ -8163,7 +8165,7 @@ bwb_FNCS (LineType * l)
t = 0;
for (n = 0; n < NUM_FUNCTIONS; n++)
{
- fprintf (My->SYSOUT->cfp, IntrinsicFunctionTable[n].Name);
+ fprintf (My->SYSOUT->cfp, "%s", IntrinsicFunctionTable[n].Name);
if (t < 4)
{
fprintf (My->SYSOUT->cfp, "\t");
diff --git a/bwb_var.c b/bwb_var.c
index 5f8e62e..2e90020 100644
--- a/bwb_var.c
+++ b/bwb_var.c
@@ -110,7 +110,7 @@ bwb_COMMON (LineType * l)
{
/* COMMON A(,,) : DIM A( 5, 10, 20 ) */
dimensions++;
- while (line_skip_seperator (l));
+ while (line_skip_seperator (l))
{
dimensions++;
}
diff --git a/bwbasic.c b/bwbasic.c
index 4549495..cfd80f2 100644
--- a/bwbasic.c
+++ b/bwbasic.c
@@ -36,6 +36,8 @@
/* */
/* Version 3.20 by Howard Wulf, AF5NE */
/* */
+/* Version 3.20A by Ken Martin */
+/* */
/*---------------------------------------------------------------*/
@@ -73,7 +75,6 @@ static char *Banner[] = {
"## ## ## ## ## ## ## ## ## ## ## ## ",
"######## ## ### ### ## ## ## ######## ## ## ",
" ",
- " ",
" ######## ### ###### #### ###### ",
" ## ## ## ## ## ## ## ## ##",
" ## ## ## ## ## ## ## ",
@@ -82,10 +83,11 @@ static char *Banner[] = {
" ## ## ## ## ## ## ## ## ##",
" ######## ## ## ###### #### ###### ",
" ",
- "Bywater BASIC Interpreter, version 3.20 ",
+ "Bywater BASIC Interpreter, version 3.20A ",
"Copyright (c) 1993, Ted A. Campbell ",
- "Copyright (c) 1995-1997, Jon B. Volkoff ",
- "Copyright (c) 2014-2017, Howard Wulf, AF5NE ",
+ "Copyright (c) 1995-1997 , Jon B. Volkoff ",
+ "Copyright (c) 2014-2017 , Howard Wulf, AF5NE ",
+ "Copyright (c) 11/2019 , Ken Martin ",
" ",
NULL
};
diff --git a/bwbasic.desktop b/bwbasic.desktop
new file mode 100644
index 0000000..add1fac
--- /dev/null
+++ b/bwbasic.desktop
@@ -0,0 +1,11 @@
+#!/usr/bin/env xdg-open
+[Desktop Entry]
+Encoding=UTF-8
+Name=Bywater BASIC
+GenericName=Bywater BASIC
+Type=Application
+Exec=bwbasic
+Icon=/usr/share/pixmaps/bwbasic.png
+StartupNotify=true
+Terminal=true
+Categories=Development
diff --git a/bwbasic.mak b/bwbasic.mak
index 1627117..d03a022 100644
--- a/bwbasic.mak
+++ b/bwbasic.mak
@@ -1,85 +1,85 @@
-PROJ =BWBASIC
-DEBUG =0
-CC =qcl
-CFLAGS_G = /AL /W3 /Za /DMSDOS
-CFLAGS_D = /Zd /Gi$(PROJ).mdt /Od
-CFLAGS_R = /O /Ot /Gs /DNDEBUG
-CFLAGS =$(CFLAGS_G) $(CFLAGS_R)
-LFLAGS_G = /CP:0xffff /NOI /NOE /SE:0x80 /ST:0x1fa0
-LFLAGS_D = /INCR
-LFLAGS_R =
-LFLAGS =$(LFLAGS_G) $(LFLAGS_R)
-RUNFLAGS =
-OBJS_EXT =
-LIBS_EXT =
-
-all: $(PROJ).exe
-
-bwbasic.obj: bwbasic.c
-
-bwb_cmd.obj: bwb_cmd.c
-
-bwb_cnd.obj: bwb_cnd.c
-
-bwb_dio.obj: bwb_dio.c
-
-bwb_elx.obj: bwb_elx.c
-
-bwb_exp.obj: bwb_exp.c
-
-bwb_fnc.obj: bwb_fnc.c
-
-bwb_inp.obj: bwb_inp.c
-
-bwb_int.obj: bwb_int.c
-
-bwb_mth.obj: bwb_mth.c
-
-bwb_ops.obj: bwb_ops.c
-
-bwb_par.obj: bwb_par.c
-
-bwb_prn.obj: bwb_prn.c
-
-bwb_stc.obj: bwb_stc.c
-
-bwb_str.obj: bwb_str.c
-
-bwb_tbl.obj: bwb_tbl.c
-
-bwb_var.obj: bwb_var.c
-
-bwx_tty.obj: bwx_tty.c
-
-$(PROJ).exe: bwbasic.obj bwb_cmd.obj bwb_cnd.obj bwb_dio.obj bwb_elx.obj bwb_exp.obj \
- bwb_fnc.obj bwb_inp.obj bwb_int.obj bwb_mth.obj bwb_ops.obj bwb_par.obj bwb_prn.obj \
- bwb_stc.obj bwb_str.obj bwb_tbl.obj bwb_var.obj bwx_tty.obj $(OBJS_EXT)
- echo >NUL @<<$(PROJ).crf
-bwbasic.obj +
-bwb_cmd.obj +
-bwb_cnd.obj +
-bwb_dio.obj +
-bwb_elx.obj +
-bwb_exp.obj +
-bwb_fnc.obj +
-bwb_inp.obj +
-bwb_int.obj +
-bwb_mth.obj +
-bwb_ops.obj +
-bwb_par.obj +
-bwb_prn.obj +
-bwb_stc.obj +
-bwb_str.obj +
-bwb_tbl.obj +
-bwb_var.obj +
-bwx_tty.obj +
-$(OBJS_EXT)
-$(PROJ).exe
-
-$(LIBS_EXT);
-<<
- link $(LFLAGS) @$(PROJ).crf
-
-run: $(PROJ).exe
- $(PROJ) $(RUNFLAGS)
-
+PROJ =BWBASIC
+DEBUG =0
+CC =qcl
+CFLAGS_G = /AL /W3 /Za /DMSDOS
+CFLAGS_D = /Zd /Gi$(PROJ).mdt /Od
+CFLAGS_R = /O /Ot /Gs /DNDEBUG
+CFLAGS =$(CFLAGS_G) $(CFLAGS_R)
+LFLAGS_G = /CP:0xffff /NOI /NOE /SE:0x80 /ST:0x1fa0
+LFLAGS_D = /INCR
+LFLAGS_R =
+LFLAGS =$(LFLAGS_G) $(LFLAGS_R)
+RUNFLAGS =
+OBJS_EXT =
+LIBS_EXT =
+
+all: $(PROJ).exe
+
+bwbasic.obj: bwbasic.c
+
+bwb_cmd.obj: bwb_cmd.c
+
+bwb_cnd.obj: bwb_cnd.c
+
+bwb_dio.obj: bwb_dio.c
+
+bwb_elx.obj: bwb_elx.c
+
+bwb_exp.obj: bwb_exp.c
+
+bwb_fnc.obj: bwb_fnc.c
+
+bwb_inp.obj: bwb_inp.c
+
+bwb_int.obj: bwb_int.c
+
+bwb_mth.obj: bwb_mth.c
+
+bwb_ops.obj: bwb_ops.c
+
+bwb_par.obj: bwb_par.c
+
+bwb_prn.obj: bwb_prn.c
+
+bwb_stc.obj: bwb_stc.c
+
+bwb_str.obj: bwb_str.c
+
+bwb_tbl.obj: bwb_tbl.c
+
+bwb_var.obj: bwb_var.c
+
+bwx_tty.obj: bwx_tty.c
+
+$(PROJ).exe: bwbasic.obj bwb_cmd.obj bwb_cnd.obj bwb_dio.obj bwb_elx.obj bwb_exp.obj \
+ bwb_fnc.obj bwb_inp.obj bwb_int.obj bwb_mth.obj bwb_ops.obj bwb_par.obj bwb_prn.obj \
+ bwb_stc.obj bwb_str.obj bwb_tbl.obj bwb_var.obj bwx_tty.obj $(OBJS_EXT)
+ echo >NUL @<<$(PROJ).crf
+bwbasic.obj +
+bwb_cmd.obj +
+bwb_cnd.obj +
+bwb_dio.obj +
+bwb_elx.obj +
+bwb_exp.obj +
+bwb_fnc.obj +
+bwb_inp.obj +
+bwb_int.obj +
+bwb_mth.obj +
+bwb_ops.obj +
+bwb_par.obj +
+bwb_prn.obj +
+bwb_stc.obj +
+bwb_str.obj +
+bwb_tbl.obj +
+bwb_var.obj +
+bwx_tty.obj +
+$(OBJS_EXT)
+$(PROJ).exe
+
+$(LIBS_EXT);
+<<
+ link $(LFLAGS) @$(PROJ).crf
+
+run: $(PROJ).exe
+ $(PROJ) $(RUNFLAGS)
+
diff --git a/bwbasic.png b/bwbasic.png
new file mode 100644
index 0000000..9745723
Binary files /dev/null and b/bwbasic.png differ
diff --git a/bwbasic1.jcl b/bwbasic1.jcl
index 8def5b0..af4fc57 100644
--- a/bwbasic1.jcl
+++ b/bwbasic1.jcl
@@ -1,9 +1,9 @@
-//BWBGEN JOB CLASS=C,REGION=0K
-//IDCAMS EXEC PGM=IDCAMS
-//SYSPRINT DD SYSOUT=*
-//SYSIN DD *
- DEFINE ALIAS (NAME(BWBASIC) RELATE(SYS1.UCAT.TSO)) -
- CATALOG(SYS1.VMASTCAT/SECRET)
- SET MAXCC=0
-/*
-//
+//BWBGEN JOB CLASS=C,REGION=0K
+//IDCAMS EXEC PGM=IDCAMS
+//SYSPRINT DD SYSOUT=*
+//SYSIN DD *
+ DEFINE ALIAS (NAME(BWBASIC) RELATE(SYS1.UCAT.TSO)) -
+ CATALOG(SYS1.VMASTCAT/SECRET)
+ SET MAXCC=0
+/*
+//
diff --git a/bwbasic2.jcl b/bwbasic2.jcl
index 1cda0a8..553938d 100644
--- a/bwbasic2.jcl
+++ b/bwbasic2.jcl
@@ -1,35 +1,35 @@
-//BWBGEN JOB CLASS=C,REGION=0K
-//*
-//CREATE PROC BWBPREF='BWBASIC'
-//DELETE EXEC PGM=IEFBR14
-//DD1 DD DSN=&BWBPREF..SOURCE,DISP=(MOD,DELETE),
-// UNIT=SYSALLDA,SPACE=(TRK,(0))
-//DD2 DD DSN=&BWBPREF..INCLUDE,DISP=(MOD,DELETE),
-// UNIT=SYSALLDA,SPACE=(TRK,(0))
-//DD3 DD DSN=&BWBPREF..NCALIB,DISP=(MOD,DELETE),
-// UNIT=SYSALLDA,SPACE=(TRK,(0))
-//DD4 DD DSN=&BWBPREF..LINKLIB,DISP=(MOD,DELETE),
-// UNIT=SYSALLDA,SPACE=(TRK,(0))
-//DD5 DD DSN=&BWBPREF..JCL,DISP=(MOD,DELETE),
-// UNIT=SYSALLDA,SPACE=(TRK,(0))
-//*
-//ALLOC EXEC PGM=IEFBR14
-//DD1 DD DSN=&BWBPREF..SOURCE,DISP=(,CATLG),
-// DCB=(RECFM=VB,LRECL=255,BLKSIZE=6233),
-// SPACE=(6233,(180,180,44)),UNIT=SYSALLDA
-//DD2 DD DSN=&BWBPREF..INCLUDE,DISP=(,CATLG),
-// DCB=(RECFM=VB,LRECL=255,BLKSIZE=6233),
-// SPACE=(6233,(26,26,44)),UNIT=SYSALLDA
-//DD3 DD DSN=&BWBPREF..NCALIB,DISP=(,CATLG),
-// DCB=(RECFM=U,LRECL=0,BLKSIZE=6144),
-// SPACE=(6144,(130,130,44)),UNIT=SYSALLDA
-//DD4 DD DSN=&BWBPREF..LINKLIB,DISP=(,CATLG),
-// DCB=(RECFM=U,LRECL=0,BLKSIZE=6144),
-// SPACE=(6144,(130,130,44)),UNIT=SYSALLDA
-//DD5 DD DSN=&BWBPREF..JCL,DISP=(,CATLG),
-// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6080),
-// SPACE=(6080,(130,130,44)),UNIT=SYSALLDA
-// PEND
-//*
-//S1 EXEC CREATE
-//
+//BWBGEN JOB CLASS=C,REGION=0K
+//*
+//CREATE PROC BWBPREF='BWBASIC'
+//DELETE EXEC PGM=IEFBR14
+//DD1 DD DSN=&BWBPREF..SOURCE,DISP=(MOD,DELETE),
+// UNIT=SYSALLDA,SPACE=(TRK,(0))
+//DD2 DD DSN=&BWBPREF..INCLUDE,DISP=(MOD,DELETE),
+// UNIT=SYSALLDA,SPACE=(TRK,(0))
+//DD3 DD DSN=&BWBPREF..NCALIB,DISP=(MOD,DELETE),
+// UNIT=SYSALLDA,SPACE=(TRK,(0))
+//DD4 DD DSN=&BWBPREF..LINKLIB,DISP=(MOD,DELETE),
+// UNIT=SYSALLDA,SPACE=(TRK,(0))
+//DD5 DD DSN=&BWBPREF..JCL,DISP=(MOD,DELETE),
+// UNIT=SYSALLDA,SPACE=(TRK,(0))
+//*
+//ALLOC EXEC PGM=IEFBR14
+//DD1 DD DSN=&BWBPREF..SOURCE,DISP=(,CATLG),
+// DCB=(RECFM=VB,LRECL=255,BLKSIZE=6233),
+// SPACE=(6233,(180,180,44)),UNIT=SYSALLDA
+//DD2 DD DSN=&BWBPREF..INCLUDE,DISP=(,CATLG),
+// DCB=(RECFM=VB,LRECL=255,BLKSIZE=6233),
+// SPACE=(6233,(26,26,44)),UNIT=SYSALLDA
+//DD3 DD DSN=&BWBPREF..NCALIB,DISP=(,CATLG),
+// DCB=(RECFM=U,LRECL=0,BLKSIZE=6144),
+// SPACE=(6144,(130,130,44)),UNIT=SYSALLDA
+//DD4 DD DSN=&BWBPREF..LINKLIB,DISP=(,CATLG),
+// DCB=(RECFM=U,LRECL=0,BLKSIZE=6144),
+// SPACE=(6144,(130,130,44)),UNIT=SYSALLDA
+//DD5 DD DSN=&BWBPREF..JCL,DISP=(,CATLG),
+// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6080),
+// SPACE=(6080,(130,130,44)),UNIT=SYSALLDA
+// PEND
+//*
+//S1 EXEC CREATE
+//
diff --git a/bwbasic3.jcl b/bwbasic3.jcl
index a07da5f..8a7fcbc 100644
--- a/bwbasic3.jcl
+++ b/bwbasic3.jcl
@@ -1,22 +1,22 @@
-//BWBGEN JOB CLASS=C,REGION=0K
-//*
-//TRANSFER PROC BWBPREF='BWBASIC',PDPPREF='PDPCLIB'
-//DELETE EXEC PGM=IEFBR14
-//DD1 DD DSN=&BWBPREF..ALLZIPS,DISP=(MOD,DELETE),
-// UNIT=SYSALLDA,SPACE=(TRK,(0))
-//*
-//COPY EXEC PGM=COPYFILE,PARM='-bb dd:in dd:out'
-//STEPLIB DD DSN=&PDPPREF..LINKLIB,DISP=SHR
-//IN DD DSN=HERC02.IN,DISP=OLD,
-// UNIT=TAPE,VOL=SER=PCTOMF,LABEL=(1,NL),
-// DCB=(RECFM=U,LRECL=0,BLKSIZE=32760)
-//OUT DD DSN=&BWBPREF..ALLZIPS,DISP=(,CATLG),
-// SPACE=(6233,(220,220),RLSE),UNIT=SYSALLDA,
-// DCB=(RECFM=U,LRECL=0,BLKSIZE=6233)
-//SYSIN DD DUMMY
-//SYSPRINT DD SYSOUT=*
-//SYSTERM DD SYSOUT=*
-// PEND
-//*
-//S1 EXEC TRANSFER
-//
+//BWBGEN JOB CLASS=C,REGION=0K
+//*
+//TRANSFER PROC BWBPREF='BWBASIC',PDPPREF='PDPCLIB'
+//DELETE EXEC PGM=IEFBR14
+//DD1 DD DSN=&BWBPREF..ALLZIPS,DISP=(MOD,DELETE),
+// UNIT=SYSALLDA,SPACE=(TRK,(0))
+//*
+//COPY EXEC PGM=COPYFILE,PARM='-bb dd:in dd:out'
+//STEPLIB DD DSN=&PDPPREF..LINKLIB,DISP=SHR
+//IN DD DSN=HERC02.IN,DISP=OLD,
+// UNIT=TAPE,VOL=SER=PCTOMF,LABEL=(1,NL),
+// DCB=(RECFM=U,LRECL=0,BLKSIZE=32760)
+//OUT DD DSN=&BWBPREF..ALLZIPS,DISP=(,CATLG),
+// SPACE=(6233,(220,220),RLSE),UNIT=SYSALLDA,
+// DCB=(RECFM=U,LRECL=0,BLKSIZE=6233)
+//SYSIN DD DUMMY
+//SYSPRINT DD SYSOUT=*
+//SYSTERM DD SYSOUT=*
+// PEND
+//*
+//S1 EXEC TRANSFER
+//
diff --git a/bwbasic4.jcl b/bwbasic4.jcl
index 3ba3868..0e30f0f 100644
--- a/bwbasic4.jcl
+++ b/bwbasic4.jcl
@@ -1,32 +1,32 @@
-//BWBGEN JOB CLASS=C,REGION=0K
-//*
-//CREATE EXEC PGM=IEFBR14
-//DD1 DD DSN=&&ZIPS,DISP=(,PASS),
-// DCB=(RECFM=U,LRECL=0,BLKSIZE=6233),
-// SPACE=(6233,(220,220,44)),UNIT=SYSALLDA
-//*
-//UNZIP1 PROC MINPREF='MINIZIP',BWBPREF='BWBASIC'
-//MINI EXEC PGM=MINIUNZ,PARM='dd:input dd:output'
-//STEPLIB DD DSN=&MINPREF..LINKLIB,DISP=SHR
-//INPUT DD DSN=&BWBPREF..ALLZIPS,DISP=SHR
-//OUTPUT DD DSN=&&ZIPS,DISP=(OLD,PASS)
-//SYSIN DD DUMMY
-//SYSPRINT DD SYSOUT=*
-//SYSTERM DD SYSOUT=*
-// PEND
-//*
-//UNZIP2 PROC IN=,OUT=,MINPREF='MINIZIP',BWBPREF='BWBASIC'
-//MINI EXEC PGM=MINIUNZ,PARM='-a dd:input dd:output'
-//STEPLIB DD DSN=&MINPREF..LINKLIB,DISP=SHR
-//INPUT DD DSN=&&ZIPS(&IN),DISP=(OLD,PASS)
-//OUTPUT DD DSN=&BWBPREF..&OUT,DISP=SHR
-//SYSIN DD DUMMY
-//SYSPRINT DD SYSOUT=*
-//SYSTERM DD SYSOUT=*
-// PEND
-//*
-//S1 EXEC UNZIP1
-//S2 EXEC UNZIP2,IN='BWBSRC',OUT='SOURCE'
-//S3 EXEC UNZIP2,IN='BWBINC',OUT='INCLUDE'
-//S4 EXEC UNZIP2,IN='BWBJCL',OUT='JCL'
-//
+//BWBGEN JOB CLASS=C,REGION=0K
+//*
+//CREATE EXEC PGM=IEFBR14
+//DD1 DD DSN=&&ZIPS,DISP=(,PASS),
+// DCB=(RECFM=U,LRECL=0,BLKSIZE=6233),
+// SPACE=(6233,(220,220,44)),UNIT=SYSALLDA
+//*
+//UNZIP1 PROC MINPREF='MINIZIP',BWBPREF='BWBASIC'
+//MINI EXEC PGM=MINIUNZ,PARM='dd:input dd:output'
+//STEPLIB DD DSN=&MINPREF..LINKLIB,DISP=SHR
+//INPUT DD DSN=&BWBPREF..ALLZIPS,DISP=SHR
+//OUTPUT DD DSN=&&ZIPS,DISP=(OLD,PASS)
+//SYSIN DD DUMMY
+//SYSPRINT DD SYSOUT=*
+//SYSTERM DD SYSOUT=*
+// PEND
+//*
+//UNZIP2 PROC IN=,OUT=,MINPREF='MINIZIP',BWBPREF='BWBASIC'
+//MINI EXEC PGM=MINIUNZ,PARM='-a dd:input dd:output'
+//STEPLIB DD DSN=&MINPREF..LINKLIB,DISP=SHR
+//INPUT DD DSN=&&ZIPS(&IN),DISP=(OLD,PASS)
+//OUTPUT DD DSN=&BWBPREF..&OUT,DISP=SHR
+//SYSIN DD DUMMY
+//SYSPRINT DD SYSOUT=*
+//SYSTERM DD SYSOUT=*
+// PEND
+//*
+//S1 EXEC UNZIP1
+//S2 EXEC UNZIP2,IN='BWBSRC',OUT='SOURCE'
+//S3 EXEC UNZIP2,IN='BWBINC',OUT='INCLUDE'
+//S4 EXEC UNZIP2,IN='BWBJCL',OUT='JCL'
+//
diff --git a/bwbasic5.jcl b/bwbasic5.jcl
index 982964e..cbe69fa 100644
--- a/bwbasic5.jcl
+++ b/bwbasic5.jcl
@@ -1,64 +1,64 @@
-//BWBGEN JOB CLASS=C,REGION=0K
-//*
-//BWBCMP PROC BWBPREF='BWBASIC',MEMBER='',GCCPREF='GCC',
-// PDPPREF='PDPCLIB',
-// COS1='-Os -S -ansi',
-// COS2='-o dd:out -'
-//*
-//COMP EXEC PGM=GCC,
-// PARM='&COS1 &COS2'
-//STEPLIB DD DSN=&GCCPREF..LINKLIB,DISP=SHR
-//SYSIN DD DSN=&BWBPREF..SOURCE(&MEMBER),DISP=SHR
-//INCLUDE DD DSN=&BWBPREF..INCLUDE,DISP=SHR,DCB=BLKSIZE=32720
-// DD DSN=&PDPPREF..INCLUDE,DISP=SHR
-//SYSINCL DD DSN=&BWBPREF..INCLUDE,DISP=SHR,DCB=BLKSIZE=32720
-// DD DSN=&PDPPREF..INCLUDE,DISP=SHR
-//OUT DD DSN=&&TEMP1,DISP=(,PASS),UNIT=SYSALLDA,
-// DCB=(LRECL=80,BLKSIZE=6080,RECFM=FB),
-// SPACE=(6080,(500,500))
-//SYSPRINT DD SYSOUT=*
-//SYSTERM DD SYSOUT=*
-//*
-//ASM EXEC PGM=ASMA90,
-// PARM='DECK,NOLIST',
-// COND=(4,LT,COMP)
-//SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR
-// DD DSN=&PDPPREF..MACLIB,DISP=SHR
-//SYSUT1 DD UNIT=SYSALLDA,SPACE=(CYL,(20,10))
-//SYSUT2 DD UNIT=SYSALLDA,SPACE=(CYL,(20,10))
-//SYSUT3 DD UNIT=SYSALLDA,SPACE=(CYL,(2,1))
-//SYSPRINT DD SYSOUT=*
-//SYSLIN DD DUMMY
-//SYSGO DD DUMMY
-//SYSPUNCH DD DSN=&&OBJSET,UNIT=SYSALLDA,SPACE=(80,(240,200)),
-// DISP=(,PASS)
-//SYSIN DD DSN=&&TEMP1,DISP=(OLD,DELETE)
-//*
-//LKED EXEC PGM=IEWL,PARM='NCAL',
-// COND=((4,LT,COMP),(0,LT,ASM))
-//SYSLIN DD DSN=&&OBJSET,DISP=(OLD,DELETE)
-//SYSLMOD DD DSN=&BWBPREF..NCALIB(&MEMBER),DISP=SHR
-//SYSUT1 DD UNIT=SYSALLDA,SPACE=(CYL,(2,1))
-//SYSPRINT DD SYSOUT=*
-// PEND
-//*
-//BWBASIC EXEC BWBCMP,MEMBER=BWBASIC
-//BWB@INT EXEC BWBCMP,MEMBER=BWB@INT
-//BWB@TBL EXEC BWBCMP,MEMBER=BWB@TBL
-//BWB@CMD EXEC BWBCMP,MEMBER=BWB@CMD
-//BWB@PRN EXEC BWBCMP,MEMBER=BWB@PRN
-//BWB@EXP EXEC BWBCMP,MEMBER=BWB@EXP
-//BWB@VAR EXEC BWBCMP,MEMBER=BWB@VAR
-//BWB@INP EXEC BWBCMP,MEMBER=BWB@INP
-//BWB@FNC EXEC BWBCMP,MEMBER=BWB@FNC
-//BWB@CND EXEC BWBCMP,MEMBER=BWB@CND
-//BWB@DIO EXEC BWBCMP,MEMBER=BWB@DIO
-//BWB@STR EXEC BWBCMP,MEMBER=BWB@STR
-//BWB@STC EXEC BWBCMP,MEMBER=BWB@STC
-//BWX@TTY EXEC BWBCMP,MEMBER=BWX@TTY
-//BWD@CMD EXEC BWBCMP,MEMBER=BWD@CMD
-//BWD@FUN EXEC BWBCMP,MEMBER=BWD@FUN
-//UNIXIO EXEC BWBCMP,MEMBER=UNIXIO
-//RENUM EXEC BWBCMP,MEMBER=RENUM
-//*
-//
+//BWBGEN JOB CLASS=C,REGION=0K
+//*
+//BWBCMP PROC BWBPREF='BWBASIC',MEMBER='',GCCPREF='GCC',
+// PDPPREF='PDPCLIB',
+// COS1='-Os -S -ansi',
+// COS2='-o dd:out -'
+//*
+//COMP EXEC PGM=GCC,
+// PARM='&COS1 &COS2'
+//STEPLIB DD DSN=&GCCPREF..LINKLIB,DISP=SHR
+//SYSIN DD DSN=&BWBPREF..SOURCE(&MEMBER),DISP=SHR
+//INCLUDE DD DSN=&BWBPREF..INCLUDE,DISP=SHR,DCB=BLKSIZE=32720
+// DD DSN=&PDPPREF..INCLUDE,DISP=SHR
+//SYSINCL DD DSN=&BWBPREF..INCLUDE,DISP=SHR,DCB=BLKSIZE=32720
+// DD DSN=&PDPPREF..INCLUDE,DISP=SHR
+//OUT DD DSN=&&TEMP1,DISP=(,PASS),UNIT=SYSALLDA,
+// DCB=(LRECL=80,BLKSIZE=6080,RECFM=FB),
+// SPACE=(6080,(500,500))
+//SYSPRINT DD SYSOUT=*
+//SYSTERM DD SYSOUT=*
+//*
+//ASM EXEC PGM=ASMA90,
+// PARM='DECK,NOLIST',
+// COND=(4,LT,COMP)
+//SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR
+// DD DSN=&PDPPREF..MACLIB,DISP=SHR
+//SYSUT1 DD UNIT=SYSALLDA,SPACE=(CYL,(20,10))
+//SYSUT2 DD UNIT=SYSALLDA,SPACE=(CYL,(20,10))
+//SYSUT3 DD UNIT=SYSALLDA,SPACE=(CYL,(2,1))
+//SYSPRINT DD SYSOUT=*
+//SYSLIN DD DUMMY
+//SYSGO DD DUMMY
+//SYSPUNCH DD DSN=&&OBJSET,UNIT=SYSALLDA,SPACE=(80,(240,200)),
+// DISP=(,PASS)
+//SYSIN DD DSN=&&TEMP1,DISP=(OLD,DELETE)
+//*
+//LKED EXEC PGM=IEWL,PARM='NCAL',
+// COND=((4,LT,COMP),(0,LT,ASM))
+//SYSLIN DD DSN=&&OBJSET,DISP=(OLD,DELETE)
+//SYSLMOD DD DSN=&BWBPREF..NCALIB(&MEMBER),DISP=SHR
+//SYSUT1 DD UNIT=SYSALLDA,SPACE=(CYL,(2,1))
+//SYSPRINT DD SYSOUT=*
+// PEND
+//*
+//BWBASIC EXEC BWBCMP,MEMBER=BWBASIC
+//BWB@INT EXEC BWBCMP,MEMBER=BWB@INT
+//BWB@TBL EXEC BWBCMP,MEMBER=BWB@TBL
+//BWB@CMD EXEC BWBCMP,MEMBER=BWB@CMD
+//BWB@PRN EXEC BWBCMP,MEMBER=BWB@PRN
+//BWB@EXP EXEC BWBCMP,MEMBER=BWB@EXP
+//BWB@VAR EXEC BWBCMP,MEMBER=BWB@VAR
+//BWB@INP EXEC BWBCMP,MEMBER=BWB@INP
+//BWB@FNC EXEC BWBCMP,MEMBER=BWB@FNC
+//BWB@CND EXEC BWBCMP,MEMBER=BWB@CND
+//BWB@DIO EXEC BWBCMP,MEMBER=BWB@DIO
+//BWB@STR EXEC BWBCMP,MEMBER=BWB@STR
+//BWB@STC EXEC BWBCMP,MEMBER=BWB@STC
+//BWX@TTY EXEC BWBCMP,MEMBER=BWX@TTY
+//BWD@CMD EXEC BWBCMP,MEMBER=BWD@CMD
+//BWD@FUN EXEC BWBCMP,MEMBER=BWD@FUN
+//UNIXIO EXEC BWBCMP,MEMBER=UNIXIO
+//RENUM EXEC BWBCMP,MEMBER=RENUM
+//*
+//
diff --git a/bwbasic6.jcl b/bwbasic6.jcl
index a97e1d6..deff54b 100644
--- a/bwbasic6.jcl
+++ b/bwbasic6.jcl
@@ -1,38 +1,38 @@
-//BWBGEN JOB CLASS=C,REGION=0K
-//LINK PROC BWBPREF='BWBASIC',PDPPREF='PDPCLIB',EXE=''
-//LKED EXEC PGM=IEWL,PARM='MAP,LIST,SIZE=(999424,65536)'
-//SYSUT1 DD UNIT=SYSALLDA,SPACE=(CYL,(30,10))
-//SYSPRINT DD SYSOUT=*
-//SYSLIB DD DSN=&PDPPREF..NCALIB,DISP=SHR,DCB=BLKSIZE=32760
-// DD DSN=&BWBPREF..NCALIB,DISP=SHR
-//SYSLMOD DD DSN=&BWBPREF..LINKLIB(&EXE),DISP=SHR
-// PEND
-//DOLINK1 EXEC LINK,EXE=BWBASIC
-//LKED.SYSLIN DD *
- INCLUDE SYSLIB(BWBASIC)
- INCLUDE SYSLIB(BWB@INT)
- INCLUDE SYSLIB(BWB@TBL)
- INCLUDE SYSLIB(BWB@CMD)
- INCLUDE SYSLIB(BWB@PRN)
- INCLUDE SYSLIB(BWB@EXP)
- INCLUDE SYSLIB(BWB@VAR)
- INCLUDE SYSLIB(BWB@INP)
- INCLUDE SYSLIB(BWB@FNC)
- INCLUDE SYSLIB(BWB@CND)
- INCLUDE SYSLIB(BWB@DIO)
- INCLUDE SYSLIB(BWB@STR)
- INCLUDE SYSLIB(BWB@STC)
- INCLUDE SYSLIB(BWX@TTY)
- INCLUDE SYSLIB(BWD@CMD)
- INCLUDE SYSLIB(BWD@FUN)
- INCLUDE SYSLIB(UNIXIO)
- ENTRY @@MAIN
-/*
-//*
-//DOLINK2 EXEC LINK,EXE=RENUM
-//LKED.SYSLIN DD *
- INCLUDE SYSLIB(RENUM)
- ENTRY @@MAIN
-/*
-//*
-//
+//BWBGEN JOB CLASS=C,REGION=0K
+//LINK PROC BWBPREF='BWBASIC',PDPPREF='PDPCLIB',EXE=''
+//LKED EXEC PGM=IEWL,PARM='MAP,LIST,SIZE=(999424,65536)'
+//SYSUT1 DD UNIT=SYSALLDA,SPACE=(CYL,(30,10))
+//SYSPRINT DD SYSOUT=*
+//SYSLIB DD DSN=&PDPPREF..NCALIB,DISP=SHR,DCB=BLKSIZE=32760
+// DD DSN=&BWBPREF..NCALIB,DISP=SHR
+//SYSLMOD DD DSN=&BWBPREF..LINKLIB(&EXE),DISP=SHR
+// PEND
+//DOLINK1 EXEC LINK,EXE=BWBASIC
+//LKED.SYSLIN DD *
+ INCLUDE SYSLIB(BWBASIC)
+ INCLUDE SYSLIB(BWB@INT)
+ INCLUDE SYSLIB(BWB@TBL)
+ INCLUDE SYSLIB(BWB@CMD)
+ INCLUDE SYSLIB(BWB@PRN)
+ INCLUDE SYSLIB(BWB@EXP)
+ INCLUDE SYSLIB(BWB@VAR)
+ INCLUDE SYSLIB(BWB@INP)
+ INCLUDE SYSLIB(BWB@FNC)
+ INCLUDE SYSLIB(BWB@CND)
+ INCLUDE SYSLIB(BWB@DIO)
+ INCLUDE SYSLIB(BWB@STR)
+ INCLUDE SYSLIB(BWB@STC)
+ INCLUDE SYSLIB(BWX@TTY)
+ INCLUDE SYSLIB(BWD@CMD)
+ INCLUDE SYSLIB(BWD@FUN)
+ INCLUDE SYSLIB(UNIXIO)
+ ENTRY @@MAIN
+/*
+//*
+//DOLINK2 EXEC LINK,EXE=RENUM
+//LKED.SYSLIN DD *
+ INCLUDE SYSLIB(RENUM)
+ ENTRY @@MAIN
+/*
+//*
+//
diff --git a/bwbasic7.jcl b/bwbasic7.jcl
index a2e164b..5dbf5eb 100644
--- a/bwbasic7.jcl
+++ b/bwbasic7.jcl
@@ -1,45 +1,45 @@
-//BWBGEN JOB CLASS=C,REGION=0K
-//*
-//RUNBW PROC BWBPREF='BWBASIC'
-//BWBASIC EXEC PGM=BWBASIC,PARM='DD:INPUT'
-//STEPLIB DD DSN=&BWBPREF..LINKLIB,DISP=SHR
-//SYSIN DD DUMMY
-//SYSPRINT DD SYSOUT=*
-//SYSTERM DD SYSOUT=*
-// PEND
-//*
-//RUNRE PROC BWBPREF='BWBASIC'
-//BWBASIC EXEC PGM=RENUM,PARM='DD:INPUT'
-//STEPLIB DD DSN=&BWBPREF..LINKLIB,DISP=SHR
-//SYSIN DD DUMMY
-//SYSPRINT DD SYSOUT=*
-//SYSTERM DD SYSOUT=*
-// PEND
-//*
-//CLEAN PROC BWBPREF='BWBASIC'
-//DELETE EXEC PGM=IEFBR14
-//DD0 DD DSN=&BWBPREF..ALLZIPS,DISP=(MOD,DELETE),
-// UNIT=SYSALLDA,SPACE=(TRK,(0))
-//DD3 DD DSN=&BWBPREF..NCALIB,DISP=(MOD,DELETE),
-// UNIT=SYSALLDA,SPACE=(TRK,(0))
-// PEND
-//*
-//S1 EXEC RUNBW
-//INPUT DD *
-x = 1
-print "hello, world",x
-x = 2
-print "hello, world",x
-end
-/*
-//*
-//S2 EXEC RUNRE
-//INPUT DD *
-5 hi
-7 folks
-9 there
-/*
-//EDITFL DD SYSOUT=*
-//*
-//S3 EXEC CLEAN
-//
+//BWBGEN JOB CLASS=C,REGION=0K
+//*
+//RUNBW PROC BWBPREF='BWBASIC'
+//BWBASIC EXEC PGM=BWBASIC,PARM='DD:INPUT'
+//STEPLIB DD DSN=&BWBPREF..LINKLIB,DISP=SHR
+//SYSIN DD DUMMY
+//SYSPRINT DD SYSOUT=*
+//SYSTERM DD SYSOUT=*
+// PEND
+//*
+//RUNRE PROC BWBPREF='BWBASIC'
+//BWBASIC EXEC PGM=RENUM,PARM='DD:INPUT'
+//STEPLIB DD DSN=&BWBPREF..LINKLIB,DISP=SHR
+//SYSIN DD DUMMY
+//SYSPRINT DD SYSOUT=*
+//SYSTERM DD SYSOUT=*
+// PEND
+//*
+//CLEAN PROC BWBPREF='BWBASIC'
+//DELETE EXEC PGM=IEFBR14
+//DD0 DD DSN=&BWBPREF..ALLZIPS,DISP=(MOD,DELETE),
+// UNIT=SYSALLDA,SPACE=(TRK,(0))
+//DD3 DD DSN=&BWBPREF..NCALIB,DISP=(MOD,DELETE),
+// UNIT=SYSALLDA,SPACE=(TRK,(0))
+// PEND
+//*
+//S1 EXEC RUNBW
+//INPUT DD *
+x = 1
+print "hello, world",x
+x = 2
+print "hello, world",x
+end
+/*
+//*
+//S2 EXEC RUNRE
+//INPUT DD *
+5 hi
+7 folks
+9 there
+/*
+//EDITFL DD SYSOUT=*
+//*
+//S3 EXEC CLEAN
+//
diff --git a/bwbtest/B15A/00readme.txt b/bwbtest/B15A/00readme.txt
deleted file mode 100644
index 0000c2a..0000000
--- a/bwbtest/B15A/00readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-These programs are part of regression testing.
diff --git a/bwbtest/B15A/00test.sh b/bwbtest/B15A/00test.sh
deleted file mode 100644
index 3183201..0000000
--- a/bwbtest/B15A/00test.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-# Puropose: Verify existing BWBASIC behavior
-# Author: Howard Wulf, AF5NE
-# Date: 2014-02-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/bwbtest
-# ash ./00test.sh
-#
-
-rm *.80
-rm *.OUT
-rm *.LPT
-rm *.dif
-
-# ----------------------------------------------
-# Regression Tests
-# ----------------------------------------------
-testcase()
-{
- TESTCASE=${1}
- echo "TESTCASE=${TESTCASE}"
- ~/bwbasic --tape ${TESTCASE}.INP --profile B15.PRO --profile ${TESTCASE}.PRO ${TESTCASE}.BAS 1> ${TESTCASE}.OUT 2> ${TESTCASE}.LPT
-
-
- echo "500 DATA ${TESTCASE}.OUT, ${TESTCASE}.80" > PAD80.INP
- ~/bwbasic --profile PAD80.PRO PAD80.BAS
-
-
- diff ${TESTCASE}.run ${TESTCASE}.80 > ${TESTCASE}.dif
- if test -s ${TESTCASE}.dif
- then
- echo less ${TESTCASE}.dif
- fi
-}
-
-# ---------------------------------------------
-
-testcase abs
-testcase assign
-testcase callfunc
-testcase callsub
-testcase chain1
-testcase chain2
-testcase dataread
-testcase deffn
-testcase dim
-testcase doloop
-testcase dowhile
-testcase elseif
-testcase end
-testcase err
-testcase fncallfn
-testcase fornext
-testcase function
-testcase gosub
-testcase gotolabl
-testcase ifline
-testcase input
-testcase lof
-testcase loopuntl
-testcase main
-testcase mlifthen
-testcase on
-testcase onerr
-testcase onerrlbl
-testcase ongosub
-testcase opentest
-testcase option
-testcase pascaltr
-testcase putget
-testcase random
-testcase selcase
-testcase snglfunc
-testcase stop
-testcase term
-testcase whilwend
-testcase width
-testcase writeinp
-testcase error1
-testcase error2
-testcase error3
-testcase error4
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/B15A/01test.sh b/bwbtest/B15A/01test.sh
deleted file mode 100644
index 64c51bc..0000000
--- a/bwbtest/B15A/01test.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-# Filename: 01test.sh
-# Purpose: automted regression review
-# Author: Howard Wulf, AF5NE
-# Date: 2015-01-29
-# Uasage: implementation defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic/NBS2
-# ash ./01test.sh
-#
-#
-
-# review ERRORS
-cat *.dif > dif.OUT
-if test -s dif.OUT
-then
- pwd > dif.OUT
- cat *.dif >> dif.OUT
- less dif.OUT
-fi
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/B15A/02ok.sh b/bwbtest/B15A/02ok.sh
deleted file mode 100644
index 118fddc..0000000
--- a/bwbtest/B15A/02ok.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Puropose: Promote current results to regression
-# Author: Howard Wulf
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/bwskytel
-# ash ./01ok.sh
-#
-
-for f in *.80; do mv "$f" "${f/.80/.run}"; done
-# EOF
diff --git a/bwbtest/B15A/99test.sh b/bwbtest/B15A/99test.sh
deleted file mode 100644
index 5532865..0000000
--- a/bwbtest/B15A/99test.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-# Puropose: Cleanup after tests have passed
-# Author: Howard Wulf, AF5NE
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/BP100
-# ash ./99test.sh
-#
-
-rm *.80
-rm *.OUT
-rm *.LPT
-rm *.dif
-
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/B15A/B15.PRO b/bwbtest/B15A/B15.PRO
deleted file mode 100644
index 0450560..0000000
--- a/bwbtest/B15A/B15.PRO
+++ /dev/null
@@ -1,2 +0,0 @@
-OPTION VERSION "BYWATER"
-
diff --git a/bwbtest/B15A/PAD80.BAS b/bwbtest/B15A/PAD80.BAS
deleted file mode 100644
index 2a293c3..0000000
--- a/bwbtest/B15A/PAD80.BAS
+++ /dev/null
@@ -1,44 +0,0 @@
-010 REM OPTION VERSION BYWATER
-020 REM
-100 REM PAD80.BAS
-101 REM Pad the test output to 80 characters.
-102 REM bwbasic P001.BAS > P001.OUT
-103 REM echo "500 DATA P001.OUT, P001.80" > PAD80.INP
-104 REM bwbasic PAD80.BAS
-105 REM diff P001.run P001.80
-109 REM ----------------------------------------------------------
-120 REM GET FILE NAME INTO A$
-122 DELETE 500
-124 MERGE "PAD80.INP"
-126 REM LIST
-128 RESTORE 500
-130 READ A$
-135 REM PRINT "SOURCE:"; A$
-140 READ B$
-145 REM PRINT "TARGET:"; B$
-300 REM ----------------------------------------------------------
-301 REM PROCESS FILENAME IN A$
-302 REM ----------------------------------------------------------
-310 OPEN A$ FOR INPUT AS #2
-315 OPEN B$ FOR OUTPUT AS #3
-320 REM PRINT "PROCESS TEXT LINE"
-330 IF EOF( 2 ) THEN 390
-335 REM PRINT "NOT EOF"
-340 LINE INPUT #2, C$
-345 REM PRINT "C$=";C$
-350 C$ = LEFT$( C$ + SPACE$( 80 ), 80 )
-355 REM PRINT "yyy"
-360 REM WRITE OUTPUT LINE
-370 PRINT #3, C$
-375 REM PRINT "zzz"
-380 GOTO 320
-390 REM CLOSE FILES
-400 CLOSE #3
-410 CLOSE #2
-499 REM ----------------------------------------------------------
-500 REM REPLACED BY CONTENTS OF "PAD80.INP"
-501 REM ----------------------------------------------------------
-900 REM ----------------------------------------------------------
-910 REM THE END
-920 REM ----------------------------------------------------------
-999 END
diff --git a/bwbtest/B15A/PAD80.INP b/bwbtest/B15A/PAD80.INP
deleted file mode 100644
index 4693f02..0000000
--- a/bwbtest/B15A/PAD80.INP
+++ /dev/null
@@ -1 +0,0 @@
-500 DATA error4.OUT, error4.80
diff --git a/bwbtest/B15A/PAD80.PRO b/bwbtest/B15A/PAD80.PRO
deleted file mode 100644
index 4c31bf5..0000000
--- a/bwbtest/B15A/PAD80.PRO
+++ /dev/null
@@ -1,2 +0,0 @@
-OPTION VERSION "BYWATER"
-OPTION LABELS OFF
diff --git a/bwbtest/B15A/abs.run b/bwbtest/B15A/abs.run
deleted file mode 100644
index cb01bcc..0000000
--- a/bwbtest/B15A/abs.run
+++ /dev/null
@@ -1,2 +0,0 @@
-The absolute value of -1.23457 is 1.23457
-Is that correct?
diff --git a/bwbtest/B15A/assign.bas b/bwbtest/B15A/assign.bas
deleted file mode 100644
index 625eb93..0000000
--- a/bwbtest/B15A/assign.bas
+++ /dev/null
@@ -1,3 +0,0 @@
-10 Print "TEST.BAS -- TEST"
-20 X=7
-30 print "X is ";X
diff --git a/bwbtest/B15A/assign.run b/bwbtest/B15A/assign.run
deleted file mode 100644
index f160add..0000000
--- a/bwbtest/B15A/assign.run
+++ /dev/null
@@ -1,2 +0,0 @@
-TEST.BAS -- TEST
-X is 7
diff --git a/bwbtest/B15A/callfunc.bas b/bwbtest/B15A/callfunc.bas
deleted file mode 100644
index 62c63c1..0000000
--- a/bwbtest/B15A/callfunc.bas
+++ /dev/null
@@ -1,39 +0,0 @@
-
-rem ----------------------------------------------------
-rem CallFunc.BAS
-rem ----------------------------------------------------
-
-Print "CallFunc.BAS -- Test BASIC User-defined Function Statements"
-Print "The next printed line should be from the Function."
-Print
-testvar = 17
-
-x = TestFnc( 5, "Hello", testvar )
-
-Print
-Print "This is back at the main program. "
-Print "The value of variable is now "; testvar
-Print "The returned value from the function is "; x
-
-Print "Did it work?"
-End
-
-rem ----------------------------------------------------
-rem Subroutine TestFnc
-rem ----------------------------------------------------
-
-Function TestFnc( xarg, yarg$, tvar )
- Print "This is written from the Function."
- Print "The value of variable is"; xarg
- Print "The value of variable is "; yarg$
- Print "The value of variable is "; tvar
- tvar = 99
- Print "The value of variable is reset to "; tvar
- TestFnc = xarg + tvar
- rem
- rem The following is considered a recursive call:
- rem Print "The Function should return "; TestFnc
- rem Instead of using the above, use the following:
- Result = xarg + tvar
- Print "The Function should return "; Result
-End Function
diff --git a/bwbtest/B15A/callfunc.run b/bwbtest/B15A/callfunc.run
deleted file mode 100644
index edfedfb..0000000
--- a/bwbtest/B15A/callfunc.run
+++ /dev/null
@@ -1,14 +0,0 @@
-CallFunc.BAS -- Test BASIC User-defined Function Statements
-The next printed line should be from the Function.
-
-This is written from the Function.
-The value of variable is 5
-The value of variable is Hello
-The value of variable is 17
-The value of variable is reset to 99
-The Function should return 104
-
-This is back at the main program.
-The value of variable is now 17
-The returned value from the function is 104
-Did it work?
diff --git a/bwbtest/B15A/callsub.run b/bwbtest/B15A/callsub.run
deleted file mode 100644
index ce661ec..0000000
--- a/bwbtest/B15A/callsub.run
+++ /dev/null
@@ -1,12 +0,0 @@
-CallSub.BAS -- Test BASIC Call and Sub Statements
-The next printed line should be from the Subroutine.
-
-This is written from the Subroutine.
-The value of variable is 5
-The value of variable is Hello
-The value of variable is 17
-The value of variable is reset to 99
-
-This is back at the main program.
-The value of variable is now 17
-Did it work?
diff --git a/bwbtest/B15A/chain1.bas b/bwbtest/B15A/chain1.bas
deleted file mode 100644
index aa5a85e..0000000
--- a/bwbtest/B15A/chain1.bas
+++ /dev/null
@@ -1,7 +0,0 @@
-REM CHAIN1.BAS
-print "This is program CHAIN1.BAS"
-X = 5.6789
-common X
-print "The value of X is";X
-print "We shall no pass execution to program CHAIN2.BAS..."
-chain "chain2.bas"
diff --git a/bwbtest/B15A/chain1.run b/bwbtest/B15A/chain1.run
deleted file mode 100644
index dc7fb99..0000000
--- a/bwbtest/B15A/chain1.run
+++ /dev/null
@@ -1,6 +0,0 @@
-This is program CHAIN1.BAS
-The value of X is 5.6789
-We shall no pass execution to program CHAIN2.BAS...
-This is program CHAIN2.BAS
-The value of X is now 5.6789
-This concludes our CHAIN test.
diff --git a/bwbtest/B15A/chain2.bas b/bwbtest/B15A/chain2.bas
deleted file mode 100644
index bbe2c36..0000000
--- a/bwbtest/B15A/chain2.bas
+++ /dev/null
@@ -1,4 +0,0 @@
-REM CHAIN2.BAS
-print "This is program CHAIN2.BAS"
-print "The value of X is now";X
-print "This concludes our CHAIN test."
diff --git a/bwbtest/B15A/chain2.run b/bwbtest/B15A/chain2.run
deleted file mode 100644
index 944fef8..0000000
--- a/bwbtest/B15A/chain2.run
+++ /dev/null
@@ -1,3 +0,0 @@
-This is program CHAIN2.BAS
-The value of X is now 0
-This concludes our CHAIN test.
diff --git a/bwbtest/B15A/data.tmp b/bwbtest/B15A/data.tmp
deleted file mode 100644
index 408b6b0..0000000
--- a/bwbtest/B15A/data.tmp
+++ /dev/null
@@ -1 +0,0 @@
-"String 1",1.12346,"String 2",2.23457,"String 3",3.34568
diff --git a/bwbtest/B15A/dataread.bas b/bwbtest/B15A/dataread.bas
deleted file mode 100644
index b2d4ff6..0000000
--- a/bwbtest/B15A/dataread.bas
+++ /dev/null
@@ -1,14 +0,0 @@
-10 rem DATAREAD.BAS -- Test DATA, READ, and RESTORE Statements
-20 print "DATAREAD.BAS -- Test DATA, READ, and RESTORE Statements"
-30 DATA "Ted", 56.789
-40 REM just to see if it advances correctly
-50 DATA "Dale", 45.678
- 60 READ N$, NUMBER, ANOTHER$
- 70 READ ANUMBER
- 80 PRINT "Data read: ";N$;" ";NUMBER;" ";ANOTHER$;" ";ANUMBER
-90 RESTORE 30
- 100 READ ANOTHER$
- 110 READ ANUMBER, N$,NUMBER
- 120 PRINT "After RESTORE:"
- 130 PRINT "Data read: ";ANOTHER$;" ";ANUMBER;" ";N$;" ";NUMBER
-140 END
diff --git a/bwbtest/B15A/dataread.run b/bwbtest/B15A/dataread.run
deleted file mode 100644
index 60299f5..0000000
--- a/bwbtest/B15A/dataread.run
+++ /dev/null
@@ -1,4 +0,0 @@
-DATAREAD.BAS -- Test DATA, READ, and RESTORE Statements
-Data read: Ted 56.789 Dale 45.678
-After RESTORE:
-Data read: Ted 56.789 Dale 45.678
diff --git a/bwbtest/B15A/deffn.bas b/bwbtest/B15A/deffn.bas
deleted file mode 100644
index d3a52a4..0000000
--- a/bwbtest/B15A/deffn.bas
+++ /dev/null
@@ -1,7 +0,0 @@
-10 REM ------------------------------------------
-20 PRINT "DEFFN.BAS -- Test DEF FN Statement"
-30 DEF fnadd( x, y ) = x + y
-40 PRINT fnadd( 2, 3 )
-50 DEF fnjoin$( a$, b$ ) = a$ + b$
-60 PRINT fnjoin$( chr$( &h43 ), "orrect" )
-70 END
diff --git a/bwbtest/B15A/deffn.run b/bwbtest/B15A/deffn.run
deleted file mode 100644
index 5c4be7f..0000000
--- a/bwbtest/B15A/deffn.run
+++ /dev/null
@@ -1,3 +0,0 @@
-DEFFN.BAS -- Test DEF FN Statement
- 5
-Correct
diff --git a/bwbtest/B15A/dim.bas b/bwbtest/B15A/dim.bas
deleted file mode 100644
index fefb6dd..0000000
--- a/bwbtest/B15A/dim.bas
+++ /dev/null
@@ -1,6 +0,0 @@
-10 DIM n(5)
-20 FOR i = 0 to 5
-30 LET n(i) = i + 2
-40 PRINT "The value at position ";i;" is ";n(i)
-50 NEXT i
-60 END
diff --git a/bwbtest/B15A/dim.run b/bwbtest/B15A/dim.run
deleted file mode 100644
index e104629..0000000
--- a/bwbtest/B15A/dim.run
+++ /dev/null
@@ -1,6 +0,0 @@
-The value at position 0 is 2
-The value at position 1 is 3
-The value at position 2 is 4
-The value at position 3 is 5
-The value at position 4 is 6
-The value at position 5 is 7
diff --git a/bwbtest/B15A/doloop.bas b/bwbtest/B15A/doloop.bas
deleted file mode 100644
index f8eddda..0000000
--- a/bwbtest/B15A/doloop.bas
+++ /dev/null
@@ -1,9 +0,0 @@
-10 i = 0
-20 do
-30 i = i + 1
-40 print "i is";i
-50 if i > 12 then
- exit do
- end if
-60 loop
-70 print "End"
diff --git a/bwbtest/B15A/doloop.run b/bwbtest/B15A/doloop.run
deleted file mode 100644
index 46d5c3c..0000000
--- a/bwbtest/B15A/doloop.run
+++ /dev/null
@@ -1,14 +0,0 @@
-i is 1
-i is 2
-i is 3
-i is 4
-i is 5
-i is 6
-i is 7
-i is 8
-i is 9
-i is 10
-i is 11
-i is 12
-i is 13
-End
diff --git a/bwbtest/B15A/dowhile.bas b/bwbtest/B15A/dowhile.bas
deleted file mode 100644
index ff3ce05..0000000
--- a/bwbtest/B15A/dowhile.bas
+++ /dev/null
@@ -1,13 +0,0 @@
-10 REM DOWHILE.BAS -- Test DO WHILE-LOOP
-20 PRINT "START"
-30 LET X = 0
-40 DO WHILE X < 25
-50 PRINT "x is ";X
-60 LET X = X + 1
-70 LET Y = 0
-80 DO WHILE Y < 2
-90 PRINT "y is "; Y
-100 LET Y = Y + 1
-110 LOOP
-120 LOOP
-130 PRINT "END"
diff --git a/bwbtest/B15A/dowhile.run b/bwbtest/B15A/dowhile.run
deleted file mode 100644
index 90353ba..0000000
--- a/bwbtest/B15A/dowhile.run
+++ /dev/null
@@ -1,77 +0,0 @@
-START
-x is 0
-y is 0
-y is 1
-x is 1
-y is 0
-y is 1
-x is 2
-y is 0
-y is 1
-x is 3
-y is 0
-y is 1
-x is 4
-y is 0
-y is 1
-x is 5
-y is 0
-y is 1
-x is 6
-y is 0
-y is 1
-x is 7
-y is 0
-y is 1
-x is 8
-y is 0
-y is 1
-x is 9
-y is 0
-y is 1
-x is 10
-y is 0
-y is 1
-x is 11
-y is 0
-y is 1
-x is 12
-y is 0
-y is 1
-x is 13
-y is 0
-y is 1
-x is 14
-y is 0
-y is 1
-x is 15
-y is 0
-y is 1
-x is 16
-y is 0
-y is 1
-x is 17
-y is 0
-y is 1
-x is 18
-y is 0
-y is 1
-x is 19
-y is 0
-y is 1
-x is 20
-y is 0
-y is 1
-x is 21
-y is 0
-y is 1
-x is 22
-y is 0
-y is 1
-x is 23
-y is 0
-y is 1
-x is 24
-y is 0
-y is 1
-END
diff --git a/bwbtest/B15A/elseif.INP b/bwbtest/B15A/elseif.INP
deleted file mode 100644
index 7ed6ff8..0000000
--- a/bwbtest/B15A/elseif.INP
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/bwbtest/B15A/elseif.bas b/bwbtest/B15A/elseif.bas
deleted file mode 100644
index f91e2a0..0000000
--- a/bwbtest/B15A/elseif.bas
+++ /dev/null
@@ -1,26 +0,0 @@
-
-rem -----------------------------------------------------
-rem elseif.bas -- Test MultiLine IF-ELSEIF-THEN statement
-rem -----------------------------------------------------
-
-Print "ELSEIF.BAS -- Test MultiLine IF-THEN-ELSE Constructions"
-
-Print
-Print "The program should detect if the number you enter is 4 or 5 or 6."
-Input "Please enter a number, 1-9"; x
-
-If x = 4 then
- Print "The number is 4."
-
-Elseif x = 5 then
- Print "The number is 5."
-
-Elseif x = 6 then
- Print "The number is 6."
-
-Else
- Print "The number is neither 4 nor 5 nor 6."
-
-End If
-
-Print "This concludes our test."
diff --git a/bwbtest/B15A/elseif.run b/bwbtest/B15A/elseif.run
deleted file mode 100644
index f1b51f0..0000000
--- a/bwbtest/B15A/elseif.run
+++ /dev/null
@@ -1,6 +0,0 @@
-ELSEIF.BAS -- Test MultiLine IF-THEN-ELSE Constructions
-
-The program should detect if the number you enter is 4 or 5 or 6.
-Please enter a number, 1-9? 5
-The number is 5.
-This concludes our test.
diff --git a/bwbtest/B15A/end.bas b/bwbtest/B15A/end.bas
deleted file mode 100644
index 6ca2807..0000000
--- a/bwbtest/B15A/end.bas
+++ /dev/null
@@ -1,6 +0,0 @@
-10 REM END.BAS -- Test END Statement
-20 PRINT "END.BAS -- Test END Statement"
-30 PRINT "If the program ends after this line, END worked OK."
-40 END
-50 PRINT "But if this line printed, then it did not work."
-60 END
diff --git a/bwbtest/B15A/end.run b/bwbtest/B15A/end.run
deleted file mode 100644
index f89e2f5..0000000
--- a/bwbtest/B15A/end.run
+++ /dev/null
@@ -1,2 +0,0 @@
-END.BAS -- Test END Statement
-If the program ends after this line, END worked OK.
diff --git a/bwbtest/B15A/err.bas b/bwbtest/B15A/err.bas
deleted file mode 100644
index 92fa7a2..0000000
--- a/bwbtest/B15A/err.bas
+++ /dev/null
@@ -1,3 +0,0 @@
-10 dim n(5)
-20 print n(7)
-30 end
diff --git a/bwbtest/B15A/err.run b/bwbtest/B15A/err.run
deleted file mode 100644
index 2bead3b..0000000
--- a/bwbtest/B15A/err.run
+++ /dev/null
@@ -1,5 +0,0 @@
-
-ERROR in line 20: Subscript out of range
-
-STACK TRACE:
-20:print n(7)
diff --git a/bwbtest/B15A/error1.bas b/bwbtest/B15A/error1.bas
deleted file mode 100644
index e5fb795..0000000
--- a/bwbtest/B15A/error1.bas
+++ /dev/null
@@ -1,8 +0,0 @@
- 100 rem test
- 110 on error goto 200
- 120 for x == 1 to 10
- 130 print x
- 140 next x
- 150 goto 999
- 200 print "ERL="; ERL; ",ERR="; ERR; ", ERR$="; ERR$
- 999 end
diff --git a/bwbtest/B15A/error1.run b/bwbtest/B15A/error1.run
deleted file mode 100644
index d3488e7..0000000
--- a/bwbtest/B15A/error1.run
+++ /dev/null
@@ -1 +0,0 @@
-ERL= 120 ,ERR= 2 , ERR$=Syntax error
diff --git a/bwbtest/B15A/error2.bas b/bwbtest/B15A/error2.bas
deleted file mode 100644
index 41e7872..0000000
--- a/bwbtest/B15A/error2.bas
+++ /dev/null
@@ -1,16 +0,0 @@
- 100 rem Test ERROR( X )
- 105 rem NOTE: ERROR 0 should NOT cause any error whatsoever (it clears the error status)
- 110 on error goto 200
- 120 for i = 0 to 255
- 125 rem print "i="; i
- 130 error i
- 134 rem print "RESUME NEXT should have cleared ERR"; ERR
- 135 if ERR <> 0 goto 999
- 140 next i
- 150 goto 999
- 200 print "ERL="; ERL; ", ERR="; ERR; ", ERR$="; ERR$
- 202 if ERL <> 130 goto 999
- 205 if ERR = 0 goto 999
- 210 resume next
- 999 end
-
diff --git a/bwbtest/B15A/error2.run b/bwbtest/B15A/error2.run
deleted file mode 100644
index a45769e..0000000
--- a/bwbtest/B15A/error2.run
+++ /dev/null
@@ -1,255 +0,0 @@
-ERL= 130 , ERR= 1 , ERR$=NEXT without FOR
-ERL= 130 , ERR= 2 , ERR$=Syntax error
-ERL= 130 , ERR= 3 , ERR$=RETURN without GOSUB
-ERL= 130 , ERR= 4 , ERR$=Out of DATA
-ERL= 130 , ERR= 5 , ERR$=Illegal function call
-ERL= 130 , ERR= 6 , ERR$=Overflow
-ERL= 130 , ERR= 7 , ERR$=Out of memory
-ERL= 130 , ERR= 8 , ERR$=Undefined line
-ERL= 130 , ERR= 9 , ERR$=Subscript out of range
-ERL= 130 , ERR= 10 , ERR$=Redimensioned array
-ERL= 130 , ERR= 11 , ERR$=Division by zero
-ERL= 130 , ERR= 12 , ERR$=Illegal direct
-ERL= 130 , ERR= 13 , ERR$=Type mismatch
-ERL= 130 , ERR= 14 , ERR$=Out of string space
-ERL= 130 , ERR= 15 , ERR$=String too long
-ERL= 130 , ERR= 16 , ERR$=String formula too complex
-ERL= 130 , ERR= 17 , ERR$=Can't continue
-ERL= 130 , ERR= 18 , ERR$=Undefined user function
-ERL= 130 , ERR= 19 , ERR$=No RESUME
-ERL= 130 , ERR= 20 , ERR$=RESUME without error
-ERL= 130 , ERR= 21 , ERR$=Unprintable error
-ERL= 130 , ERR= 22 , ERR$=Missing operand
-ERL= 130 , ERR= 23 , ERR$=Line buffer overflow
-ERL= 130 , ERR= 24 , ERR$=
-ERL= 130 , ERR= 25 , ERR$=
-ERL= 130 , ERR= 26 , ERR$=FOR without NEXT
-ERL= 130 , ERR= 27 , ERR$=Bad DATA
-ERL= 130 , ERR= 28 , ERR$=
-ERL= 130 , ERR= 29 , ERR$=WHILE without WEND
-ERL= 130 , ERR= 30 , ERR$=WEND without WHILE
-ERL= 130 , ERR= 31 , ERR$=EXIT FUNCTION without FUNCTION
-ERL= 130 , ERR= 32 , ERR$=END FUNCTION without FUNCTION
-ERL= 130 , ERR= 33 , ERR$=EXIT SUB without SUB
-ERL= 130 , ERR= 34 , ERR$=END SUB without SUB
-ERL= 130 , ERR= 35 , ERR$=EXIT FOR without FOR
-ERL= 130 , ERR= 36 , ERR$=
-ERL= 130 , ERR= 37 , ERR$=
-ERL= 130 , ERR= 38 , ERR$=
-ERL= 130 , ERR= 39 , ERR$=
-ERL= 130 , ERR= 40 , ERR$=
-ERL= 130 , ERR= 41 , ERR$=
-ERL= 130 , ERR= 42 , ERR$=
-ERL= 130 , ERR= 43 , ERR$=
-ERL= 130 , ERR= 44 , ERR$=
-ERL= 130 , ERR= 45 , ERR$=
-ERL= 130 , ERR= 46 , ERR$=
-ERL= 130 , ERR= 47 , ERR$=
-ERL= 130 , ERR= 48 , ERR$=
-ERL= 130 , ERR= 49 , ERR$=
-ERL= 130 , ERR= 50 , ERR$=Field overflow
-ERL= 130 , ERR= 51 , ERR$=Internal error
-ERL= 130 , ERR= 52 , ERR$=Bad file number
-ERL= 130 , ERR= 53 , ERR$=File not found
-ERL= 130 , ERR= 54 , ERR$=Bad file mode
-ERL= 130 , ERR= 55 , ERR$=File already open
-ERL= 130 , ERR= 56 , ERR$=
-ERL= 130 , ERR= 57 , ERR$=Disk I/O error
-ERL= 130 , ERR= 58 , ERR$=File already exists
-ERL= 130 , ERR= 59 , ERR$=
-ERL= 130 , ERR= 60 , ERR$=
-ERL= 130 , ERR= 61 , ERR$=Disk full
-ERL= 130 , ERR= 62 , ERR$=Input past end
-ERL= 130 , ERR= 63 , ERR$=Bad record number
-ERL= 130 , ERR= 64 , ERR$=Bad file name
-ERL= 130 , ERR= 65 , ERR$=
-ERL= 130 , ERR= 66 , ERR$=Direct statement in file
-ERL= 130 , ERR= 67 , ERR$=Too many files
-ERL= 130 , ERR= 68 , ERR$=
-ERL= 130 , ERR= 69 , ERR$=
-ERL= 130 , ERR= 70 , ERR$=Variable Not Declared
-ERL= 130 , ERR= 71 , ERR$=
-ERL= 130 , ERR= 72 , ERR$=
-ERL= 130 , ERR= 73 , ERR$=Advanced Feature
-ERL= 130 , ERR= 74 , ERR$=
-ERL= 130 , ERR= 75 , ERR$=
-ERL= 130 , ERR= 76 , ERR$=
-ERL= 130 , ERR= 77 , ERR$=
-ERL= 130 , ERR= 78 , ERR$=
-ERL= 130 , ERR= 79 , ERR$=
-ERL= 130 , ERR= 80 , ERR$=
-ERL= 130 , ERR= 81 , ERR$=
-ERL= 130 , ERR= 82 , ERR$=
-ERL= 130 , ERR= 83 , ERR$=
-ERL= 130 , ERR= 84 , ERR$=
-ERL= 130 , ERR= 85 , ERR$=
-ERL= 130 , ERR= 86 , ERR$=
-ERL= 130 , ERR= 87 , ERR$=
-ERL= 130 , ERR= 88 , ERR$=
-ERL= 130 , ERR= 89 , ERR$=
-ERL= 130 , ERR= 90 , ERR$=
-ERL= 130 , ERR= 91 , ERR$=
-ERL= 130 , ERR= 92 , ERR$=
-ERL= 130 , ERR= 93 , ERR$=
-ERL= 130 , ERR= 94 , ERR$=
-ERL= 130 , ERR= 95 , ERR$=
-ERL= 130 , ERR= 96 , ERR$=
-ERL= 130 , ERR= 97 , ERR$=
-ERL= 130 , ERR= 98 , ERR$=
-ERL= 130 , ERR= 99 , ERR$=
-ERL= 130 , ERR= 100 , ERR$=
-ERL= 130 , ERR= 101 , ERR$=
-ERL= 130 , ERR= 102 , ERR$=
-ERL= 130 , ERR= 103 , ERR$=
-ERL= 130 , ERR= 104 , ERR$=
-ERL= 130 , ERR= 105 , ERR$=
-ERL= 130 , ERR= 106 , ERR$=
-ERL= 130 , ERR= 107 , ERR$=
-ERL= 130 , ERR= 108 , ERR$=
-ERL= 130 , ERR= 109 , ERR$=
-ERL= 130 , ERR= 110 , ERR$=
-ERL= 130 , ERR= 111 , ERR$=
-ERL= 130 , ERR= 112 , ERR$=
-ERL= 130 , ERR= 113 , ERR$=
-ERL= 130 , ERR= 114 , ERR$=
-ERL= 130 , ERR= 115 , ERR$=
-ERL= 130 , ERR= 116 , ERR$=
-ERL= 130 , ERR= 117 , ERR$=
-ERL= 130 , ERR= 118 , ERR$=
-ERL= 130 , ERR= 119 , ERR$=
-ERL= 130 , ERR= 120 , ERR$=
-ERL= 130 , ERR= 121 , ERR$=
-ERL= 130 , ERR= 122 , ERR$=
-ERL= 130 , ERR= 123 , ERR$=
-ERL= 130 , ERR= 124 , ERR$=
-ERL= 130 , ERR= 125 , ERR$=
-ERL= 130 , ERR= 126 , ERR$=
-ERL= 130 , ERR= 127 , ERR$=
-ERL= 130 , ERR= 128 , ERR$=
-ERL= 130 , ERR= 129 , ERR$=
-ERL= 130 , ERR= 130 , ERR$=
-ERL= 130 , ERR= 131 , ERR$=
-ERL= 130 , ERR= 132 , ERR$=
-ERL= 130 , ERR= 133 , ERR$=
-ERL= 130 , ERR= 134 , ERR$=
-ERL= 130 , ERR= 135 , ERR$=
-ERL= 130 , ERR= 136 , ERR$=
-ERL= 130 , ERR= 137 , ERR$=
-ERL= 130 , ERR= 138 , ERR$=
-ERL= 130 , ERR= 139 , ERR$=
-ERL= 130 , ERR= 140 , ERR$=
-ERL= 130 , ERR= 141 , ERR$=
-ERL= 130 , ERR= 142 , ERR$=
-ERL= 130 , ERR= 143 , ERR$=
-ERL= 130 , ERR= 144 , ERR$=
-ERL= 130 , ERR= 145 , ERR$=
-ERL= 130 , ERR= 146 , ERR$=
-ERL= 130 , ERR= 147 , ERR$=
-ERL= 130 , ERR= 148 , ERR$=
-ERL= 130 , ERR= 149 , ERR$=
-ERL= 130 , ERR= 150 , ERR$=
-ERL= 130 , ERR= 151 , ERR$=
-ERL= 130 , ERR= 152 , ERR$=
-ERL= 130 , ERR= 153 , ERR$=
-ERL= 130 , ERR= 154 , ERR$=
-ERL= 130 , ERR= 155 , ERR$=
-ERL= 130 , ERR= 156 , ERR$=
-ERL= 130 , ERR= 157 , ERR$=
-ERL= 130 , ERR= 158 , ERR$=
-ERL= 130 , ERR= 159 , ERR$=
-ERL= 130 , ERR= 160 , ERR$=
-ERL= 130 , ERR= 161 , ERR$=
-ERL= 130 , ERR= 162 , ERR$=
-ERL= 130 , ERR= 163 , ERR$=
-ERL= 130 , ERR= 164 , ERR$=
-ERL= 130 , ERR= 165 , ERR$=
-ERL= 130 , ERR= 166 , ERR$=
-ERL= 130 , ERR= 167 , ERR$=
-ERL= 130 , ERR= 168 , ERR$=
-ERL= 130 , ERR= 169 , ERR$=
-ERL= 130 , ERR= 170 , ERR$=
-ERL= 130 , ERR= 171 , ERR$=
-ERL= 130 , ERR= 172 , ERR$=
-ERL= 130 , ERR= 173 , ERR$=
-ERL= 130 , ERR= 174 , ERR$=
-ERL= 130 , ERR= 175 , ERR$=
-ERL= 130 , ERR= 176 , ERR$=
-ERL= 130 , ERR= 177 , ERR$=
-ERL= 130 , ERR= 178 , ERR$=
-ERL= 130 , ERR= 179 , ERR$=
-ERL= 130 , ERR= 180 , ERR$=
-ERL= 130 , ERR= 181 , ERR$=
-ERL= 130 , ERR= 182 , ERR$=
-ERL= 130 , ERR= 183 , ERR$=
-ERL= 130 , ERR= 184 , ERR$=
-ERL= 130 , ERR= 185 , ERR$=
-ERL= 130 , ERR= 186 , ERR$=
-ERL= 130 , ERR= 187 , ERR$=
-ERL= 130 , ERR= 188 , ERR$=
-ERL= 130 , ERR= 189 , ERR$=
-ERL= 130 , ERR= 190 , ERR$=
-ERL= 130 , ERR= 191 , ERR$=
-ERL= 130 , ERR= 192 , ERR$=
-ERL= 130 , ERR= 193 , ERR$=
-ERL= 130 , ERR= 194 , ERR$=
-ERL= 130 , ERR= 195 , ERR$=
-ERL= 130 , ERR= 196 , ERR$=
-ERL= 130 , ERR= 197 , ERR$=
-ERL= 130 , ERR= 198 , ERR$=
-ERL= 130 , ERR= 199 , ERR$=
-ERL= 130 , ERR= 200 , ERR$=
-ERL= 130 , ERR= 201 , ERR$=
-ERL= 130 , ERR= 202 , ERR$=
-ERL= 130 , ERR= 203 , ERR$=
-ERL= 130 , ERR= 204 , ERR$=
-ERL= 130 , ERR= 205 , ERR$=
-ERL= 130 , ERR= 206 , ERR$=
-ERL= 130 , ERR= 207 , ERR$=
-ERL= 130 , ERR= 208 , ERR$=
-ERL= 130 , ERR= 209 , ERR$=
-ERL= 130 , ERR= 210 , ERR$=
-ERL= 130 , ERR= 211 , ERR$=
-ERL= 130 , ERR= 212 , ERR$=
-ERL= 130 , ERR= 213 , ERR$=
-ERL= 130 , ERR= 214 , ERR$=
-ERL= 130 , ERR= 215 , ERR$=
-ERL= 130 , ERR= 216 , ERR$=
-ERL= 130 , ERR= 217 , ERR$=
-ERL= 130 , ERR= 218 , ERR$=
-ERL= 130 , ERR= 219 , ERR$=
-ERL= 130 , ERR= 220 , ERR$=
-ERL= 130 , ERR= 221 , ERR$=
-ERL= 130 , ERR= 222 , ERR$=
-ERL= 130 , ERR= 223 , ERR$=
-ERL= 130 , ERR= 224 , ERR$=
-ERL= 130 , ERR= 225 , ERR$=
-ERL= 130 , ERR= 226 , ERR$=
-ERL= 130 , ERR= 227 , ERR$=
-ERL= 130 , ERR= 228 , ERR$=
-ERL= 130 , ERR= 229 , ERR$=
-ERL= 130 , ERR= 230 , ERR$=
-ERL= 130 , ERR= 231 , ERR$=
-ERL= 130 , ERR= 232 , ERR$=
-ERL= 130 , ERR= 233 , ERR$=
-ERL= 130 , ERR= 234 , ERR$=
-ERL= 130 , ERR= 235 , ERR$=
-ERL= 130 , ERR= 236 , ERR$=
-ERL= 130 , ERR= 237 , ERR$=
-ERL= 130 , ERR= 238 , ERR$=
-ERL= 130 , ERR= 239 , ERR$=
-ERL= 130 , ERR= 240 , ERR$=
-ERL= 130 , ERR= 241 , ERR$=
-ERL= 130 , ERR= 242 , ERR$=
-ERL= 130 , ERR= 243 , ERR$=
-ERL= 130 , ERR= 244 , ERR$=
-ERL= 130 , ERR= 245 , ERR$=
-ERL= 130 , ERR= 246 , ERR$=
-ERL= 130 , ERR= 247 , ERR$=
-ERL= 130 , ERR= 248 , ERR$=
-ERL= 130 , ERR= 249 , ERR$=
-ERL= 130 , ERR= 250 , ERR$=
-ERL= 130 , ERR= 251 , ERR$=
-ERL= 130 , ERR= 252 , ERR$=
-ERL= 130 , ERR= 253 , ERR$=
-ERL= 130 , ERR= 254 , ERR$=
-ERL= 130 , ERR= 255 , ERR$=
diff --git a/bwbtest/B15A/error3.bas b/bwbtest/B15A/error3.bas
deleted file mode 100644
index 99f7ad5..0000000
--- a/bwbtest/B15A/error3.bas
+++ /dev/null
@@ -1,15 +0,0 @@
- 100 rem Test ERROR( X, A$ )
- 105 rem NOTE: ERROR 0 should NOT cause any error whatsoever (it clears the error status)
- 110 on error goto 200
- 120 for i = 0 to 255
- 130 error i, "#" & str$(i)
- 134 rem RESUME NEXT on line 210 should have cleared ERR
- 135 if ERR <> 0 goto 999
- 140 next i
- 150 goto 999
- 200 print "ERL="; ERL; ", ERR="; ERR; ", ERR$="; ERR$
- 202 if ERL <> 130 goto 999
- 205 if ERR = 0 goto 999
- 210 resume next
- 999 end
-
diff --git a/bwbtest/B15A/error3.run b/bwbtest/B15A/error3.run
deleted file mode 100644
index da96246..0000000
--- a/bwbtest/B15A/error3.run
+++ /dev/null
@@ -1,255 +0,0 @@
-ERL= 130 , ERR= 1 , ERR$=# 1
-ERL= 130 , ERR= 2 , ERR$=# 2
-ERL= 130 , ERR= 3 , ERR$=# 3
-ERL= 130 , ERR= 4 , ERR$=# 4
-ERL= 130 , ERR= 5 , ERR$=# 5
-ERL= 130 , ERR= 6 , ERR$=# 6
-ERL= 130 , ERR= 7 , ERR$=# 7
-ERL= 130 , ERR= 8 , ERR$=# 8
-ERL= 130 , ERR= 9 , ERR$=# 9
-ERL= 130 , ERR= 10 , ERR$=# 10
-ERL= 130 , ERR= 11 , ERR$=# 11
-ERL= 130 , ERR= 12 , ERR$=# 12
-ERL= 130 , ERR= 13 , ERR$=# 13
-ERL= 130 , ERR= 14 , ERR$=# 14
-ERL= 130 , ERR= 15 , ERR$=# 15
-ERL= 130 , ERR= 16 , ERR$=# 16
-ERL= 130 , ERR= 17 , ERR$=# 17
-ERL= 130 , ERR= 18 , ERR$=# 18
-ERL= 130 , ERR= 19 , ERR$=# 19
-ERL= 130 , ERR= 20 , ERR$=# 20
-ERL= 130 , ERR= 21 , ERR$=# 21
-ERL= 130 , ERR= 22 , ERR$=# 22
-ERL= 130 , ERR= 23 , ERR$=# 23
-ERL= 130 , ERR= 24 , ERR$=# 24
-ERL= 130 , ERR= 25 , ERR$=# 25
-ERL= 130 , ERR= 26 , ERR$=# 26
-ERL= 130 , ERR= 27 , ERR$=# 27
-ERL= 130 , ERR= 28 , ERR$=# 28
-ERL= 130 , ERR= 29 , ERR$=# 29
-ERL= 130 , ERR= 30 , ERR$=# 30
-ERL= 130 , ERR= 31 , ERR$=# 31
-ERL= 130 , ERR= 32 , ERR$=# 32
-ERL= 130 , ERR= 33 , ERR$=# 33
-ERL= 130 , ERR= 34 , ERR$=# 34
-ERL= 130 , ERR= 35 , ERR$=# 35
-ERL= 130 , ERR= 36 , ERR$=# 36
-ERL= 130 , ERR= 37 , ERR$=# 37
-ERL= 130 , ERR= 38 , ERR$=# 38
-ERL= 130 , ERR= 39 , ERR$=# 39
-ERL= 130 , ERR= 40 , ERR$=# 40
-ERL= 130 , ERR= 41 , ERR$=# 41
-ERL= 130 , ERR= 42 , ERR$=# 42
-ERL= 130 , ERR= 43 , ERR$=# 43
-ERL= 130 , ERR= 44 , ERR$=# 44
-ERL= 130 , ERR= 45 , ERR$=# 45
-ERL= 130 , ERR= 46 , ERR$=# 46
-ERL= 130 , ERR= 47 , ERR$=# 47
-ERL= 130 , ERR= 48 , ERR$=# 48
-ERL= 130 , ERR= 49 , ERR$=# 49
-ERL= 130 , ERR= 50 , ERR$=# 50
-ERL= 130 , ERR= 51 , ERR$=# 51
-ERL= 130 , ERR= 52 , ERR$=# 52
-ERL= 130 , ERR= 53 , ERR$=# 53
-ERL= 130 , ERR= 54 , ERR$=# 54
-ERL= 130 , ERR= 55 , ERR$=# 55
-ERL= 130 , ERR= 56 , ERR$=# 56
-ERL= 130 , ERR= 57 , ERR$=# 57
-ERL= 130 , ERR= 58 , ERR$=# 58
-ERL= 130 , ERR= 59 , ERR$=# 59
-ERL= 130 , ERR= 60 , ERR$=# 60
-ERL= 130 , ERR= 61 , ERR$=# 61
-ERL= 130 , ERR= 62 , ERR$=# 62
-ERL= 130 , ERR= 63 , ERR$=# 63
-ERL= 130 , ERR= 64 , ERR$=# 64
-ERL= 130 , ERR= 65 , ERR$=# 65
-ERL= 130 , ERR= 66 , ERR$=# 66
-ERL= 130 , ERR= 67 , ERR$=# 67
-ERL= 130 , ERR= 68 , ERR$=# 68
-ERL= 130 , ERR= 69 , ERR$=# 69
-ERL= 130 , ERR= 70 , ERR$=# 70
-ERL= 130 , ERR= 71 , ERR$=# 71
-ERL= 130 , ERR= 72 , ERR$=# 72
-ERL= 130 , ERR= 73 , ERR$=# 73
-ERL= 130 , ERR= 74 , ERR$=# 74
-ERL= 130 , ERR= 75 , ERR$=# 75
-ERL= 130 , ERR= 76 , ERR$=# 76
-ERL= 130 , ERR= 77 , ERR$=# 77
-ERL= 130 , ERR= 78 , ERR$=# 78
-ERL= 130 , ERR= 79 , ERR$=# 79
-ERL= 130 , ERR= 80 , ERR$=# 80
-ERL= 130 , ERR= 81 , ERR$=# 81
-ERL= 130 , ERR= 82 , ERR$=# 82
-ERL= 130 , ERR= 83 , ERR$=# 83
-ERL= 130 , ERR= 84 , ERR$=# 84
-ERL= 130 , ERR= 85 , ERR$=# 85
-ERL= 130 , ERR= 86 , ERR$=# 86
-ERL= 130 , ERR= 87 , ERR$=# 87
-ERL= 130 , ERR= 88 , ERR$=# 88
-ERL= 130 , ERR= 89 , ERR$=# 89
-ERL= 130 , ERR= 90 , ERR$=# 90
-ERL= 130 , ERR= 91 , ERR$=# 91
-ERL= 130 , ERR= 92 , ERR$=# 92
-ERL= 130 , ERR= 93 , ERR$=# 93
-ERL= 130 , ERR= 94 , ERR$=# 94
-ERL= 130 , ERR= 95 , ERR$=# 95
-ERL= 130 , ERR= 96 , ERR$=# 96
-ERL= 130 , ERR= 97 , ERR$=# 97
-ERL= 130 , ERR= 98 , ERR$=# 98
-ERL= 130 , ERR= 99 , ERR$=# 99
-ERL= 130 , ERR= 100 , ERR$=# 100
-ERL= 130 , ERR= 101 , ERR$=# 101
-ERL= 130 , ERR= 102 , ERR$=# 102
-ERL= 130 , ERR= 103 , ERR$=# 103
-ERL= 130 , ERR= 104 , ERR$=# 104
-ERL= 130 , ERR= 105 , ERR$=# 105
-ERL= 130 , ERR= 106 , ERR$=# 106
-ERL= 130 , ERR= 107 , ERR$=# 107
-ERL= 130 , ERR= 108 , ERR$=# 108
-ERL= 130 , ERR= 109 , ERR$=# 109
-ERL= 130 , ERR= 110 , ERR$=# 110
-ERL= 130 , ERR= 111 , ERR$=# 111
-ERL= 130 , ERR= 112 , ERR$=# 112
-ERL= 130 , ERR= 113 , ERR$=# 113
-ERL= 130 , ERR= 114 , ERR$=# 114
-ERL= 130 , ERR= 115 , ERR$=# 115
-ERL= 130 , ERR= 116 , ERR$=# 116
-ERL= 130 , ERR= 117 , ERR$=# 117
-ERL= 130 , ERR= 118 , ERR$=# 118
-ERL= 130 , ERR= 119 , ERR$=# 119
-ERL= 130 , ERR= 120 , ERR$=# 120
-ERL= 130 , ERR= 121 , ERR$=# 121
-ERL= 130 , ERR= 122 , ERR$=# 122
-ERL= 130 , ERR= 123 , ERR$=# 123
-ERL= 130 , ERR= 124 , ERR$=# 124
-ERL= 130 , ERR= 125 , ERR$=# 125
-ERL= 130 , ERR= 126 , ERR$=# 126
-ERL= 130 , ERR= 127 , ERR$=# 127
-ERL= 130 , ERR= 128 , ERR$=# 128
-ERL= 130 , ERR= 129 , ERR$=# 129
-ERL= 130 , ERR= 130 , ERR$=# 130
-ERL= 130 , ERR= 131 , ERR$=# 131
-ERL= 130 , ERR= 132 , ERR$=# 132
-ERL= 130 , ERR= 133 , ERR$=# 133
-ERL= 130 , ERR= 134 , ERR$=# 134
-ERL= 130 , ERR= 135 , ERR$=# 135
-ERL= 130 , ERR= 136 , ERR$=# 136
-ERL= 130 , ERR= 137 , ERR$=# 137
-ERL= 130 , ERR= 138 , ERR$=# 138
-ERL= 130 , ERR= 139 , ERR$=# 139
-ERL= 130 , ERR= 140 , ERR$=# 140
-ERL= 130 , ERR= 141 , ERR$=# 141
-ERL= 130 , ERR= 142 , ERR$=# 142
-ERL= 130 , ERR= 143 , ERR$=# 143
-ERL= 130 , ERR= 144 , ERR$=# 144
-ERL= 130 , ERR= 145 , ERR$=# 145
-ERL= 130 , ERR= 146 , ERR$=# 146
-ERL= 130 , ERR= 147 , ERR$=# 147
-ERL= 130 , ERR= 148 , ERR$=# 148
-ERL= 130 , ERR= 149 , ERR$=# 149
-ERL= 130 , ERR= 150 , ERR$=# 150
-ERL= 130 , ERR= 151 , ERR$=# 151
-ERL= 130 , ERR= 152 , ERR$=# 152
-ERL= 130 , ERR= 153 , ERR$=# 153
-ERL= 130 , ERR= 154 , ERR$=# 154
-ERL= 130 , ERR= 155 , ERR$=# 155
-ERL= 130 , ERR= 156 , ERR$=# 156
-ERL= 130 , ERR= 157 , ERR$=# 157
-ERL= 130 , ERR= 158 , ERR$=# 158
-ERL= 130 , ERR= 159 , ERR$=# 159
-ERL= 130 , ERR= 160 , ERR$=# 160
-ERL= 130 , ERR= 161 , ERR$=# 161
-ERL= 130 , ERR= 162 , ERR$=# 162
-ERL= 130 , ERR= 163 , ERR$=# 163
-ERL= 130 , ERR= 164 , ERR$=# 164
-ERL= 130 , ERR= 165 , ERR$=# 165
-ERL= 130 , ERR= 166 , ERR$=# 166
-ERL= 130 , ERR= 167 , ERR$=# 167
-ERL= 130 , ERR= 168 , ERR$=# 168
-ERL= 130 , ERR= 169 , ERR$=# 169
-ERL= 130 , ERR= 170 , ERR$=# 170
-ERL= 130 , ERR= 171 , ERR$=# 171
-ERL= 130 , ERR= 172 , ERR$=# 172
-ERL= 130 , ERR= 173 , ERR$=# 173
-ERL= 130 , ERR= 174 , ERR$=# 174
-ERL= 130 , ERR= 175 , ERR$=# 175
-ERL= 130 , ERR= 176 , ERR$=# 176
-ERL= 130 , ERR= 177 , ERR$=# 177
-ERL= 130 , ERR= 178 , ERR$=# 178
-ERL= 130 , ERR= 179 , ERR$=# 179
-ERL= 130 , ERR= 180 , ERR$=# 180
-ERL= 130 , ERR= 181 , ERR$=# 181
-ERL= 130 , ERR= 182 , ERR$=# 182
-ERL= 130 , ERR= 183 , ERR$=# 183
-ERL= 130 , ERR= 184 , ERR$=# 184
-ERL= 130 , ERR= 185 , ERR$=# 185
-ERL= 130 , ERR= 186 , ERR$=# 186
-ERL= 130 , ERR= 187 , ERR$=# 187
-ERL= 130 , ERR= 188 , ERR$=# 188
-ERL= 130 , ERR= 189 , ERR$=# 189
-ERL= 130 , ERR= 190 , ERR$=# 190
-ERL= 130 , ERR= 191 , ERR$=# 191
-ERL= 130 , ERR= 192 , ERR$=# 192
-ERL= 130 , ERR= 193 , ERR$=# 193
-ERL= 130 , ERR= 194 , ERR$=# 194
-ERL= 130 , ERR= 195 , ERR$=# 195
-ERL= 130 , ERR= 196 , ERR$=# 196
-ERL= 130 , ERR= 197 , ERR$=# 197
-ERL= 130 , ERR= 198 , ERR$=# 198
-ERL= 130 , ERR= 199 , ERR$=# 199
-ERL= 130 , ERR= 200 , ERR$=# 200
-ERL= 130 , ERR= 201 , ERR$=# 201
-ERL= 130 , ERR= 202 , ERR$=# 202
-ERL= 130 , ERR= 203 , ERR$=# 203
-ERL= 130 , ERR= 204 , ERR$=# 204
-ERL= 130 , ERR= 205 , ERR$=# 205
-ERL= 130 , ERR= 206 , ERR$=# 206
-ERL= 130 , ERR= 207 , ERR$=# 207
-ERL= 130 , ERR= 208 , ERR$=# 208
-ERL= 130 , ERR= 209 , ERR$=# 209
-ERL= 130 , ERR= 210 , ERR$=# 210
-ERL= 130 , ERR= 211 , ERR$=# 211
-ERL= 130 , ERR= 212 , ERR$=# 212
-ERL= 130 , ERR= 213 , ERR$=# 213
-ERL= 130 , ERR= 214 , ERR$=# 214
-ERL= 130 , ERR= 215 , ERR$=# 215
-ERL= 130 , ERR= 216 , ERR$=# 216
-ERL= 130 , ERR= 217 , ERR$=# 217
-ERL= 130 , ERR= 218 , ERR$=# 218
-ERL= 130 , ERR= 219 , ERR$=# 219
-ERL= 130 , ERR= 220 , ERR$=# 220
-ERL= 130 , ERR= 221 , ERR$=# 221
-ERL= 130 , ERR= 222 , ERR$=# 222
-ERL= 130 , ERR= 223 , ERR$=# 223
-ERL= 130 , ERR= 224 , ERR$=# 224
-ERL= 130 , ERR= 225 , ERR$=# 225
-ERL= 130 , ERR= 226 , ERR$=# 226
-ERL= 130 , ERR= 227 , ERR$=# 227
-ERL= 130 , ERR= 228 , ERR$=# 228
-ERL= 130 , ERR= 229 , ERR$=# 229
-ERL= 130 , ERR= 230 , ERR$=# 230
-ERL= 130 , ERR= 231 , ERR$=# 231
-ERL= 130 , ERR= 232 , ERR$=# 232
-ERL= 130 , ERR= 233 , ERR$=# 233
-ERL= 130 , ERR= 234 , ERR$=# 234
-ERL= 130 , ERR= 235 , ERR$=# 235
-ERL= 130 , ERR= 236 , ERR$=# 236
-ERL= 130 , ERR= 237 , ERR$=# 237
-ERL= 130 , ERR= 238 , ERR$=# 238
-ERL= 130 , ERR= 239 , ERR$=# 239
-ERL= 130 , ERR= 240 , ERR$=# 240
-ERL= 130 , ERR= 241 , ERR$=# 241
-ERL= 130 , ERR= 242 , ERR$=# 242
-ERL= 130 , ERR= 243 , ERR$=# 243
-ERL= 130 , ERR= 244 , ERR$=# 244
-ERL= 130 , ERR= 245 , ERR$=# 245
-ERL= 130 , ERR= 246 , ERR$=# 246
-ERL= 130 , ERR= 247 , ERR$=# 247
-ERL= 130 , ERR= 248 , ERR$=# 248
-ERL= 130 , ERR= 249 , ERR$=# 249
-ERL= 130 , ERR= 250 , ERR$=# 250
-ERL= 130 , ERR= 251 , ERR$=# 251
-ERL= 130 , ERR= 252 , ERR$=# 252
-ERL= 130 , ERR= 253 , ERR$=# 253
-ERL= 130 , ERR= 254 , ERR$=# 254
-ERL= 130 , ERR= 255 , ERR$=# 255
diff --git a/bwbtest/B15A/error4.bas b/bwbtest/B15A/error4.bas
deleted file mode 100644
index f0a384a..0000000
--- a/bwbtest/B15A/error4.bas
+++ /dev/null
@@ -1,8 +0,0 @@
- 100 rem Test ERROR 73
- 110 on error goto 200
- 120 out 1, 2
- 130 print "test failed"
- 140 goto 999
- 200 print "ERL="; ERL; ", ERR="; ERR; ", ERR$="; ERR$
- 999 end
-
diff --git a/bwbtest/B15A/error4.run b/bwbtest/B15A/error4.run
deleted file mode 100644
index 789545a..0000000
--- a/bwbtest/B15A/error4.run
+++ /dev/null
@@ -1 +0,0 @@
-ERL= 120 , ERR= 73 , ERR$=Advanced Feature
diff --git a/bwbtest/B15A/fncallfn.bas b/bwbtest/B15A/fncallfn.bas
deleted file mode 100644
index 809a29b..0000000
--- a/bwbtest/B15A/fncallfn.bas
+++ /dev/null
@@ -1,9 +0,0 @@
-10 rem FNCALLFN.BAS -- Test User-defined function called
-20 rem from user-defined function
-30 def fnabs(x) = abs(x)
-40 def fncmp(y) = 1.45678+fnabs(y)
-50 print "Test user-defined function calling user-defined function"
-60 print "The result should be: ";2.45678
-70 q = -1.000
-80 print "The result is: : "; fncmp( q )
-90 end
diff --git a/bwbtest/B15A/fncallfn.run b/bwbtest/B15A/fncallfn.run
deleted file mode 100644
index bbb61b1..0000000
--- a/bwbtest/B15A/fncallfn.run
+++ /dev/null
@@ -1,3 +0,0 @@
-Test user-defined function calling user-defined function
-The result should be: 2.45678
-The result is: : 2.45678
diff --git a/bwbtest/B15A/fornext.bas b/bwbtest/B15A/fornext.bas
deleted file mode 100644
index 67fab86..0000000
--- a/bwbtest/B15A/fornext.bas
+++ /dev/null
@@ -1,13 +0,0 @@
-10 REM FORNEXT.BAS -- Test FOR-NEXT Statements
-20 REM
-30 PRINT "FORNEXT.BAS: Test FOR-NEXT Statements"
-40 PRINT "A FOR-NEXT Loop with STEP statement:"
-50 FOR i=1 to 30 step 2
-60 PRINT "FOR: i is ";i
-70 NEXT i
-80 REM
-90 PRINT "A FOR-NEXT Loop without STEP statement:"
-100 FOR i = 2 to 7
-110 PRINT "FOR: i is ";i
-120 NEXT i
-130 END
diff --git a/bwbtest/B15A/fornext.run b/bwbtest/B15A/fornext.run
deleted file mode 100644
index 2ba3db4..0000000
--- a/bwbtest/B15A/fornext.run
+++ /dev/null
@@ -1,24 +0,0 @@
-FORNEXT.BAS: Test FOR-NEXT Statements
-A FOR-NEXT Loop with STEP statement:
-FOR: i is 1
-FOR: i is 3
-FOR: i is 5
-FOR: i is 7
-FOR: i is 9
-FOR: i is 11
-FOR: i is 13
-FOR: i is 15
-FOR: i is 17
-FOR: i is 19
-FOR: i is 21
-FOR: i is 23
-FOR: i is 25
-FOR: i is 27
-FOR: i is 29
-A FOR-NEXT Loop without STEP statement:
-FOR: i is 2
-FOR: i is 3
-FOR: i is 4
-FOR: i is 5
-FOR: i is 6
-FOR: i is 7
diff --git a/bwbtest/B15A/function.INP b/bwbtest/B15A/function.INP
deleted file mode 100644
index 88f774c..0000000
--- a/bwbtest/B15A/function.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-c
-A
-B
diff --git a/bwbtest/B15A/function.bas b/bwbtest/B15A/function.bas
deleted file mode 100644
index 04d152e..0000000
--- a/bwbtest/B15A/function.bas
+++ /dev/null
@@ -1,43 +0,0 @@
-1000 PRINT "ABS(-2.2): "; ABS(-2.2)
-1010 PRINT "DATE$: <"; DATE$; ">"
-1020 PRINT "TIME$: <"; TIME$; ">"
-1030 PRINT "ATN(-2.2): "; ATN(-2.2)
-1040 PRINT "COS(-2.2): "; COS(-2.2)
-1050 PRINT "LOG(2.2): "; LOG(2.2)
-1060 PRINT "SIN(-2.2): "; SIN(-2.2)
-1070 PRINT "SQR(2.2): "; SQR(2.2)
-1080 PRINT "TAN(-2.2): "; TAN(-2.2)
-1090 PRINT "SGN(-2.2): "; SGN(-2.2)
-1100 PRINT "INT(-2.2): "; INT(-2.2)
-1102 INPUT "Paused";X$
-1110 PRINT "RND(-2.2): "; RND(-2.2)
-1120 PRINT "CHR$(&h60): "; CHR$(&H60)
-1130 PRINT "TAB(52): <"; TAB(52); ">"
-1140 PRINT "SPC(5): <"; SPC(5); ">"
-1150 PRINT "SPACE$(5): <"; SPACE$(5); ">"
-1160 PRINT "STRING$(5,X): <"; STRING$(5,"X"); ">"
-1170 PRINT "MID$(0123456789, 5, 4): <"; MID$("0123456789", 5, 4); ">"
-1180 PRINT "LEFT$(0123456789, 5): <"; LEFT$("0123456789", 5); ">"
-1190 PRINT "RIGHT$(0123456789, 5): <"; RIGHT$("0123456789", 5); ">"
-1200 PRINT "TIMER: "; TIMER
-1202 INPUT "Paused";X$
-1210 PRINT "VAL(X): "; VAL("X")
-1230 PRINT "ERR: "; ERR
-1240 PRINT "ERL: "; ERL
-1250 PRINT "LEN(0123456789): "; LEN("0123456789")
-1260 PRINT "CSNG(-2.2): "; CSNG(-2.2)
-1270 PRINT "EXP(-2.2): "; EXP(-2.2)
-1280 PRINT "INSTR(0123456789, 234): "; INSTR("0123456789", "234")
-1290 PRINT "STR$(-2.2): <"; STR$(-2.2); ">"
-1300 PRINT "HEX$(27): <"; HEX$(27); ">"
-1302 INPUT "Paused";X$
-1310 PRINT "OCT$(27): <"; OCT$(27); ">"
-1320 PRINT "CINT(-2.2): "; CINT(-2.2)
-1330 PRINT "ASC(0123456789): "; ASC("0123456789")
-1340 PRINT "ENVIRON$(PATH): <"; ENVIRON$("PATH"); ">"
-1350 PRINT "MKD$(17): <"; MKD$(17); ">"
-1360 PRINT "MKI$(17): <"; MKI$(17); ">"
-1370 PRINT "MKS$(17): <"; MKS$(17); ">"
-1380 PRINT "CVD(MKD$(17)): "; CVD(MKD$(17))
-1390 PRINT "CVS(MKS$(17)): "; CVS(MKS$(17))
-1400 PRINT "CVI(MKI$(17)): "; CVI(MKI$(17))
diff --git a/bwbtest/B15A/function.run b/bwbtest/B15A/function.run
deleted file mode 100644
index 4d49c13..0000000
--- a/bwbtest/B15A/function.run
+++ /dev/null
@@ -1,48 +0,0 @@
-ABS(-2.2): 2.2
-DATE$: <03/07/2017>
-TIME$: <07:41:18>
-ATN(-2.2): -1.14417
-COS(-2.2): -.588501
-LOG(2.2): .788457
-SIN(-2.2): -.808496
-SQR(2.2): 1.48324
-TAN(-2.2): 1.37382
-SGN(-2.2): -1
-INT(-2.2): -3
-Paused? c
-RND(-2.2): .396465
-CHR$(&h60): `
-TAB(52): < >
-SPC(5): < >
-SPACE$(5): < >
-STRING$(5,X):
-MID$(0123456789, 5, 4): <4567>
-LEFT$(0123456789, 5): <01234>
-RIGHT$(0123456789, 5): <56789>
-TIMER: 27678
-Paused? A
-VAL(X): 0
-ERR: 0
-ERL: 0
-LEN(0123456789): 10
-CSNG(-2.2): -2.2
-EXP(-2.2): .110803
-INSTR(0123456789, 234): 3
-STR$(-2.2): <-2.2>
-HEX$(27): <1B>
-Paused? B
-OCT$(27): <33>
-CINT(-2.2): -2
-ASC(0123456789): 48
-ENVIRON$(PATH):
-MKD$(17): <>
-MKI$(17): < >
-MKS$(17): <>
-CVD(MKD$(17)): 17
-CVS(MKS$(17)): 17
-CVI(MKI$(17)): 17
diff --git a/bwbtest/B15A/gosub.INP b/bwbtest/B15A/gosub.INP
deleted file mode 100644
index c9046ae..0000000
--- a/bwbtest/B15A/gosub.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-1
-a
-9
diff --git a/bwbtest/B15A/gosub.bas b/bwbtest/B15A/gosub.bas
deleted file mode 100644
index 1f666b1..0000000
--- a/bwbtest/B15A/gosub.bas
+++ /dev/null
@@ -1,62 +0,0 @@
-10 REM --------------------------------------------------------
-20 REM GOSUB.BAS Test Bywater BASIC Interpreter GOSUB Statement
-30 REM --------------------------------------------------------
-40 GOSUB 160
-50 PRINT "Test GOSUB Statements"
-60 PRINT "---------------------"
-70 PRINT
-80 PRINT "1 - Run Subroutine"
-90 PRINT "9 - Exit to system"
-92 PRINT "x - Exit to BASIC"
-100 PRINT
-110 INPUT c$
-120 IF c$ = "1" then
- gosub 430
- end if
-125 IF c$ = "9" then
- goto 600
- end if
-130 IF c$ = "x" then
- end
- end if
-135 IF c$ = "X" then
- end
- end if
-140 GOTO 10
-150 END
-160 REM subroutine to clear screen
-170 PRINT
-180 PRINT
-190 PRINT
-200 PRINT
-210 PRINT
-220 PRINT
-230 PRINT
-240 PRINT
-250 PRINT
-260 PRINT
-270 PRINT
-280 PRINT
-290 PRINT
-300 PRINT
-310 PRINT
-320 PRINT
-330 PRINT
-340 PRINT
-350 PRINT
-360 PRINT
-370 PRINT
-380 PRINT
-390 PRINT
-400 PRINT
-410 PRINT
-420 RETURN
-430 REM subroutine to test branching
-435 GOSUB 160
-440 PRINT "This is the subroutine."
-445 PRINT "Press any key: ";
-450 INPUT x$
-460 RETURN
-600 GOSUB 160
-610 PRINT "Exit from Bywater BASIC Test Program"
-620 SYSTEM
diff --git a/bwbtest/B15A/gosub.run b/bwbtest/B15A/gosub.run
deleted file mode 100644
index 1ff06e3..0000000
--- a/bwbtest/B15A/gosub.run
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Test GOSUB Statements
----------------------
-
-1 - Run Subroutine
-9 - Exit to system
-x - Exit to BASIC
-
-? 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-This is the subroutine.
-Press any key: ? a
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Test GOSUB Statements
----------------------
-
-1 - Run Subroutine
-9 - Exit to system
-x - Exit to BASIC
-
-? 9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Exit from Bywater BASIC Test Program
-
diff --git a/bwbtest/B15A/gotolabl.bas b/bwbtest/B15A/gotolabl.bas
deleted file mode 100644
index 2827ab1..0000000
--- a/bwbtest/B15A/gotolabl.bas
+++ /dev/null
@@ -1,22 +0,0 @@
-Print "Hello"
-
-
-goto test_label
-Print "This should NOT print"
-
-
-test_label:
-gosub test_sub
-Print "Goodbye"
-End
-
-
-test_sub:
- Print "This is the subroutine."
- gosub test_subsub
- Return
-
-
-test_subsub:
- Print "This is the sub-subroutine."
- Return
diff --git a/bwbtest/B15A/gotolabl.run b/bwbtest/B15A/gotolabl.run
deleted file mode 100644
index f8404bf..0000000
--- a/bwbtest/B15A/gotolabl.run
+++ /dev/null
@@ -1,4 +0,0 @@
-Hello
-This is the subroutine.
-This is the sub-subroutine.
-Goodbye
diff --git a/bwbtest/B15A/ifline.bas b/bwbtest/B15A/ifline.bas
deleted file mode 100644
index 11a4201..0000000
--- a/bwbtest/B15A/ifline.bas
+++ /dev/null
@@ -1,6 +0,0 @@
-10 rem test if then followed by line number
-20 if 5 = 5 then 80
-30 print "The statement failed"
-40 stop
-80 print "The program succeeded"
-90 end
diff --git a/bwbtest/B15A/ifline.run b/bwbtest/B15A/ifline.run
deleted file mode 100644
index 963f2f7..0000000
--- a/bwbtest/B15A/ifline.run
+++ /dev/null
@@ -1 +0,0 @@
-The program succeeded
diff --git a/bwbtest/B15A/index.txt b/bwbtest/B15A/index.txt
deleted file mode 100644
index 39c8b94..0000000
--- a/bwbtest/B15A/index.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-Test Programs for bwBASIC:
--------------------------
-
-___ ___ ABS BAS
-___ ___ ASSIGN BAS
-___ ___ CALLFUNC BAS * STRUCT_CMDS
-___ ___ CALLSUB BAS * STRUCT_CMDS
-___ ___ CHAIN1 BAS
-___ ___ CHAIN2 BAS * called from CHAIN1.BAS
-___ ___ DATAREAD BAS
-___ ___ DEFFN BAS
-___ ___ DIM BAS
-___ ___ DOLOOP BAS * STRUCT_CMDS
-___ ___ DOWHILE BAS * STRUCT_CMDS
-___ ___ ELSEIF BAS * STRUCT_CMDS
-___ ___ END BAS
-___ ___ ERR BAS
-___ ___ FORNEXT BAS
-___ ___ FUNCTION BAS
-___ ___ GOSUB BAS
-___ ___ GOTOLABL BAS * STRUCT_CMDS
-___ ___ IFLINE BAS
-___ ___ INPUT BAS
-___ ___ LOF BAS * LOF(): IMPLEMENTATION-SPECIFIC
-___ ___ LOOPUNTL BAS * STRUCT_CMDS
-___ ___ MAIN BAS * STRUCT_CMDS
-___ ___ MLIFTHEN BAS * STRUCT_CMDS
-___ ___ ON BAS
-___ ___ ONERR BAS
-___ ___ ONERRLBL BAS * STRUCT_CMDS
-___ ___ ONGOSUB BAS
-___ ___ OPENTEST BAS
-___ ___ OPTION BAS
-___ ___ PUTGET BAS * KILL: IMPLEMENTATION-SPECIFIC
-___ ___ RANDOM BAS
-___ ___ SELCASE BAS * STRUCT_CMDS
-___ ___ SNGLFUNC BAS
-___ ___ STOP BAS
-___ ___ TERM BAS
-___ ___ WHILWEND BAS
-___ ___ WIDTH BAS
-___ ___ WRITEINP BAS
-
diff --git a/bwbtest/B15A/input.INP b/bwbtest/B15A/input.INP
deleted file mode 100644
index 7e00f52..0000000
--- a/bwbtest/B15A/input.INP
+++ /dev/null
@@ -1 +0,0 @@
-abc,123
diff --git a/bwbtest/B15A/input.bas b/bwbtest/B15A/input.bas
deleted file mode 100644
index 79311ce..0000000
--- a/bwbtest/B15A/input.bas
+++ /dev/null
@@ -1,7 +0,0 @@
-10 REM INPUT.BAS -- Test INPUT Statement
-20 PRINT "INPUT.BAS -- Test INPUT Statement"
-30 REM
-40 INPUT "Input string, number: "; s$, n
-50 PRINT "The string is: ";s$
-60 PRINT "The number is: ";n
-70 END
diff --git a/bwbtest/B15A/input.run b/bwbtest/B15A/input.run
deleted file mode 100644
index 95e528d..0000000
--- a/bwbtest/B15A/input.run
+++ /dev/null
@@ -1,4 +0,0 @@
-INPUT.BAS -- Test INPUT Statement
-Input string, number: ? abc,123
-The string is: abc
-The number is: 123
diff --git a/bwbtest/B15A/lof.INP b/bwbtest/B15A/lof.INP
deleted file mode 100644
index 7e1bde0..0000000
--- a/bwbtest/B15A/lof.INP
+++ /dev/null
@@ -1 +0,0 @@
-lof.bas
diff --git a/bwbtest/B15A/lof.bas b/bwbtest/B15A/lof.bas
deleted file mode 100644
index fb02ae6..0000000
--- a/bwbtest/B15A/lof.bas
+++ /dev/null
@@ -1,5 +0,0 @@
-10 print "Test LOF() Function"
-20 input "Filename";F$
-30 open "i", 1, F$
-40 print "Length of file ";F$;" is ";LOF(1);" bytes"
-50 close 1
diff --git a/bwbtest/B15A/lof.run b/bwbtest/B15A/lof.run
deleted file mode 100644
index 1fcc4fa..0000000
--- a/bwbtest/B15A/lof.run
+++ /dev/null
@@ -1,3 +0,0 @@
-Test LOF() Function
-Filename? lof.bas
-Length of file lof.bas is 142 bytes
diff --git a/bwbtest/B15A/loopuntl.bas b/bwbtest/B15A/loopuntl.bas
deleted file mode 100644
index 535c9d2..0000000
--- a/bwbtest/B15A/loopuntl.bas
+++ /dev/null
@@ -1,6 +0,0 @@
-10 rem LOOPUNTL.BAS
-20 i = 0
-30 do
-40 i = i + 1
-50 print "Value of i is";i
-60 loop until i > 12
diff --git a/bwbtest/B15A/loopuntl.run b/bwbtest/B15A/loopuntl.run
deleted file mode 100644
index 255bc69..0000000
--- a/bwbtest/B15A/loopuntl.run
+++ /dev/null
@@ -1,13 +0,0 @@
-Value of i is 1
-Value of i is 2
-Value of i is 3
-Value of i is 4
-Value of i is 5
-Value of i is 6
-Value of i is 7
-Value of i is 8
-Value of i is 9
-Value of i is 10
-Value of i is 11
-Value of i is 12
-Value of i is 13
diff --git a/bwbtest/B15A/main.run b/bwbtest/B15A/main.run
deleted file mode 100644
index fc4edc9..0000000
--- a/bwbtest/B15A/main.run
+++ /dev/null
@@ -1,2 +0,0 @@
-This is the MAIN subroutine.
-This should print.
diff --git a/bwbtest/B15A/mlifthen.bas b/bwbtest/B15A/mlifthen.bas
deleted file mode 100644
index 6ac0706..0000000
--- a/bwbtest/B15A/mlifthen.bas
+++ /dev/null
@@ -1,16 +0,0 @@
-
-rem -------------------------------------------------
-rem mlifthen.bas -- Test MultiLine IF-THEN statement
-rem -------------------------------------------------
-
-Print "MLIFTHEN.BAS -- Test MultiLine IF-THEN-ELSE Constructions"
-
-If 3 = 4 then
- Print "The Condition is true."
- Print "And it still is true."
-Else
- Print "The condition is false."
- Print "And it still is false."
-End If
-
-Print "This concludes our test."
diff --git a/bwbtest/B15A/mlifthen.run b/bwbtest/B15A/mlifthen.run
deleted file mode 100644
index b153c40..0000000
--- a/bwbtest/B15A/mlifthen.run
+++ /dev/null
@@ -1,4 +0,0 @@
-MLIFTHEN.BAS -- Test MultiLine IF-THEN-ELSE Constructions
-The condition is false.
-And it still is false.
-This concludes our test.
diff --git a/bwbtest/B15A/on.INP b/bwbtest/B15A/on.INP
deleted file mode 100644
index 7ed6ff8..0000000
--- a/bwbtest/B15A/on.INP
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/bwbtest/B15A/on.bas b/bwbtest/B15A/on.bas
deleted file mode 100644
index fa72374..0000000
--- a/bwbtest/B15A/on.bas
+++ /dev/null
@@ -1,14 +0,0 @@
-10 print "ON.BAS -- Test ON...GOTO Statement"
-20 input "Enter a number 1-5:";n
-30 on n goto 40, 60, 80, 100, 120
-40 print "You entered 1"
-50 goto 140
-60 print "You entered 2"
-70 goto 140
-80 print "You entered 3"
-90 goto 140
-100 print "You entered 4"
-110 goto 140
-120 print "You entered 5"
-130 goto 140
-140 end
diff --git a/bwbtest/B15A/on.run b/bwbtest/B15A/on.run
deleted file mode 100644
index 778dcd6..0000000
--- a/bwbtest/B15A/on.run
+++ /dev/null
@@ -1,3 +0,0 @@
-ON.BAS -- Test ON...GOTO Statement
-Enter a number 1-5:? 5
-You entered 5
diff --git a/bwbtest/B15A/onerr.bas b/bwbtest/B15A/onerr.bas
deleted file mode 100644
index 5fdb84b..0000000
--- a/bwbtest/B15A/onerr.bas
+++ /dev/null
@@ -1,13 +0,0 @@
-1 OPTION ERROR GOSUB
-10 rem onerr.bas -- test bwBASIC ON ERROR GOSUB statement
-20 print "Test bwBASIC ON ERROR GOSUB statement"
-30 on error gosub 100
-40 print "The next line will include an error"
-50 READ d$ ' if d$ = 78.98 then print "This should not print"
-60 print "This is the line after the error"
-70 end
-100 rem Error handler
-110 print "This is the error handler"
-120 print "The error number is ";err
-130 print "The error line is ";erl
-150 return
diff --git a/bwbtest/B15A/onerr.run b/bwbtest/B15A/onerr.run
deleted file mode 100644
index 5ec02e9..0000000
--- a/bwbtest/B15A/onerr.run
+++ /dev/null
@@ -1,6 +0,0 @@
-Test bwBASIC ON ERROR GOSUB statement
-The next line will include an error
-This is the error handler
-The error number is 4
-The error line is 50
-This is the line after the error
diff --git a/bwbtest/B15A/onerrlbl.bas b/bwbtest/B15A/onerrlbl.bas
deleted file mode 100644
index 061e4aa..0000000
--- a/bwbtest/B15A/onerrlbl.bas
+++ /dev/null
@@ -1,13 +0,0 @@
-1 OPTION ERROR GOSUB
-1000 rem onerrlbl.bas -- test bwBASIC ON ERROR GOSUB statement with label
-1010 print "Test bwBASIC ON ERROR GOSUB statement"
-1020 on error gosub handler
-1030 print "The next line will include an error"
-1040 READ d$ ' if d$ = 78.98 then print "This should not print"
-1050 print "This is the line after the error"
-1060 end
-1070 handler:
-1080 print "This is the error handler"
-1090 print "The error number is ";err
-1100 print "The error line is ";erl
-1110 return
diff --git a/bwbtest/B15A/onerrlbl.run b/bwbtest/B15A/onerrlbl.run
deleted file mode 100644
index db8d090..0000000
--- a/bwbtest/B15A/onerrlbl.run
+++ /dev/null
@@ -1,6 +0,0 @@
-Test bwBASIC ON ERROR GOSUB statement
-The next line will include an error
-This is the error handler
-The error number is 4
-The error line is 1040
-This is the line after the error
diff --git a/bwbtest/B15A/ongosub.INP b/bwbtest/B15A/ongosub.INP
deleted file mode 100644
index 7ed6ff8..0000000
--- a/bwbtest/B15A/ongosub.INP
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/bwbtest/B15A/ongosub.bas b/bwbtest/B15A/ongosub.bas
deleted file mode 100644
index 8cf1573..0000000
--- a/bwbtest/B15A/ongosub.bas
+++ /dev/null
@@ -1,15 +0,0 @@
-10 print "ONGOSUB.BAS -- Test ON..GOSUB Statement"
-20 input "Enter a number 1-5";n
-30 on n gosub 60, 80, 100, 120, 140
-40 print "The End"
-50 end
-60 print "You entered 1"
-70 return
-80 print "You entered 2"
-90 return
-100 print "You entered 3"
-110 return
-120 print "You entered 4"
-130 return
-140 print "You entered 5"
-150 return
diff --git a/bwbtest/B15A/ongosub.run b/bwbtest/B15A/ongosub.run
deleted file mode 100644
index 66af63b..0000000
--- a/bwbtest/B15A/ongosub.run
+++ /dev/null
@@ -1,4 +0,0 @@
-ONGOSUB.BAS -- Test ON..GOSUB Statement
-Enter a number 1-5? 5
-You entered 5
-The End
diff --git a/bwbtest/B15A/opentest.bas b/bwbtest/B15A/opentest.bas
deleted file mode 100644
index 2f1b3c8..0000000
--- a/bwbtest/B15A/opentest.bas
+++ /dev/null
@@ -1,12 +0,0 @@
-10 PRINT "OPENTEST.BAS -- Test OPEN, PRINT#, LINE INPUT#, and CLOSE"
-20 OPEN "test.out" FOR OUTPUT AS # 1
-30 PRINT #1,"This is line 1."
-40 PRINT #1, "This is line 2."
-50 CLOSE #1
-60 OPEN "test.out" FOR INPUT AS #1
-70 LINE INPUT #1,A$
-80 LINE INPUT #1,B$
-90 PRINT "Read from file:"
-100 PRINT ">";A$
-110 PRINT ">";B$
-120 CLOSE #1
diff --git a/bwbtest/B15A/opentest.run b/bwbtest/B15A/opentest.run
deleted file mode 100644
index 05008fe..0000000
--- a/bwbtest/B15A/opentest.run
+++ /dev/null
@@ -1,4 +0,0 @@
-OPENTEST.BAS -- Test OPEN, PRINT#, LINE INPUT#, and CLOSE
-Read from file:
->This is line 1.
->This is line 2.
diff --git a/bwbtest/B15A/option.bas b/bwbtest/B15A/option.bas
deleted file mode 100644
index 4bae33f..0000000
--- a/bwbtest/B15A/option.bas
+++ /dev/null
@@ -1,8 +0,0 @@
-1 PRINT "OPTION.BAS -- Test OPTION BASE Statement"
-5 OPTION BASE 1
-10 DIM n(5)
-20 FOR i = 1 to 5
-30 LET n(i) = i + 2
-40 PRINT "The value at position ";i;" is ";n(i)
-50 NEXT i
-60 END
diff --git a/bwbtest/B15A/option.run b/bwbtest/B15A/option.run
deleted file mode 100644
index 5d64184..0000000
--- a/bwbtest/B15A/option.run
+++ /dev/null
@@ -1,6 +0,0 @@
-OPTION.BAS -- Test OPTION BASE Statement
-The value at position 1 is 3
-The value at position 2 is 4
-The value at position 3 is 5
-The value at position 4 is 6
-The value at position 5 is 7
diff --git a/bwbtest/B15A/pascaltr.bas b/bwbtest/B15A/pascaltr.bas
deleted file mode 100644
index 09e7555..0000000
--- a/bwbtest/B15A/pascaltr.bas
+++ /dev/null
@@ -1,16 +0,0 @@
-100 dim pascal(14,14)
-110 pascal(1,1) = 1
-120 for i = 2 to 14
-130 pascal(i,1) = 1
-140 for j = 2 to i
-150 pascal(i,j) = pascal(i-1,j)+pascal(i-1,j-1)
-160 next j
-170 next i
-180 for i = 1 to 14
-190 print i-1; ": ";
-200 for j = 1 to i
-210 print pascal(i,j);
-220 next j
-230 print
-240 next i
-250 end
diff --git a/bwbtest/B15A/pascaltr.run b/bwbtest/B15A/pascaltr.run
deleted file mode 100644
index 3e69331..0000000
--- a/bwbtest/B15A/pascaltr.run
+++ /dev/null
@@ -1,14 +0,0 @@
- 0 : 1
- 1 : 1 1
- 2 : 1 2 1
- 3 : 1 3 3 1
- 4 : 1 4 6 4 1
- 5 : 1 5 10 10 5 1
- 6 : 1 6 15 20 15 6 1
- 7 : 1 7 21 35 35 21 7 1
- 8 : 1 8 28 56 70 56 28 8 1
- 9 : 1 9 36 84 126 126 84 36 9 1
- 10 : 1 10 45 120 210 252 210 120 45 10 1
- 11 : 1 11 55 165 330 462 462 330 165 55 11 1
- 12 : 1 12 66 220 495 792 924 792 495 220 66 12 1
- 13 : 1 13 78 286 715 1287 1716 1716 1287 715 286 78 13 1
diff --git a/bwbtest/B15A/putget.INP b/bwbtest/B15A/putget.INP
deleted file mode 100644
index 2f51905..0000000
--- a/bwbtest/B15A/putget.INP
+++ /dev/null
@@ -1,6 +0,0 @@
-abc
-123 main
-111-222-3333
-xyz
-987 any street
-999-888-7777
diff --git a/bwbtest/B15A/putget.bas b/bwbtest/B15A/putget.bas
deleted file mode 100644
index 9185ba1..0000000
--- a/bwbtest/B15A/putget.bas
+++ /dev/null
@@ -1,22 +0,0 @@
-rem PUTGET.BAS -- Test PUT and GET statements
-open "r", 1, "test.dat", 48
-field 1, 20 as r1$, 20 as r2$, 8 as r3$
-for l = 1 to 2
-line input "name: "; n$
-line input "address: "; m$
-line input "phone: "; p$
-lset r1$ = n$
-lset r2$ = m$
-lset r3$ = p$
-put #1, l
-next l
-close #1
-open "r", 1, "test.dat", 48
-field 1, 20 as r1$, 20 as r2$, 8 as r3$
-for l = 1 to 2
-get #1, l
-print r1$, r2$, r3$
-next l
-close #1
-kill "test.dat"
-end
diff --git a/bwbtest/B15A/putget.run b/bwbtest/B15A/putget.run
deleted file mode 100644
index 8c8335a..0000000
--- a/bwbtest/B15A/putget.run
+++ /dev/null
@@ -1,8 +0,0 @@
-name: abc
-address: 123 main
-phone: 111-222-3333
-name: xyz
-address: 987 any street
-phone: 999-888-7777
-abc 123 main 111-222-
-xyz 987 any street 999-888-
diff --git a/bwbtest/B15A/random.bas b/bwbtest/B15A/random.bas
deleted file mode 100644
index 09107e8..0000000
--- a/bwbtest/B15A/random.bas
+++ /dev/null
@@ -1,13 +0,0 @@
-100 rem RANDOM.BAS -- Test RANDOMIZE and RND
-110 print "This is a first sequence of three RND numbers:"
-120 randomize timer
-130 print rnd
-140 print rnd
-150 print rnd
-160 print "This is a second sequence of three RND numbers:"
-170 randomize timer + 18
-180 print rnd
-190 print rnd
-200 print rnd
-210 print "The second sequence should have been differrent"
-220 print "from the first."
diff --git a/bwbtest/B15A/random.run b/bwbtest/B15A/random.run
deleted file mode 100644
index 40a1a81..0000000
--- a/bwbtest/B15A/random.run
+++ /dev/null
@@ -1,10 +0,0 @@
-This is a first sequence of three RND numbers:
- .10793
- .109362
- .531097
-This is a second sequence of three RND numbers:
- .782371
- .79199
- .823117
-The second sequence should have been differrent
-from the first.
diff --git a/bwbtest/B15A/selcase.bas b/bwbtest/B15A/selcase.bas
deleted file mode 100644
index 8fca268..0000000
--- a/bwbtest/B15A/selcase.bas
+++ /dev/null
@@ -1,31 +0,0 @@
-rem SelCase.bas -- test SELECT CASE
-
-Sub Main
- Print "SelCase.bas -- test SELECT CASE statement"
- Input "Enter a number"; d
-
- Select Case d
-
- Case 3 to 5
- Print "The number is between 3 and 5."
-
- Case 6
- Print "The number you entered is 6."
-
- Case 7 to 9
- Print "The number is between 7 and 9."
-
- Case If > 10
- Print "The number is greater than 10"
-
- Case If < 0
- Print "The number is less than 0"
-
- Case Else
- Print "The number is 1, 2 or 10."
-
- End Select
-
-End Sub
-
-
diff --git a/bwbtest/B15A/selcase.run b/bwbtest/B15A/selcase.run
deleted file mode 100644
index e69de29..0000000
diff --git a/bwbtest/B15A/snglfunc.bas b/bwbtest/B15A/snglfunc.bas
deleted file mode 100644
index b707b5b..0000000
--- a/bwbtest/B15A/snglfunc.bas
+++ /dev/null
@@ -1,15 +0,0 @@
-
-rem ----------------------------------------------------
-rem SnglFunc.BAS
-rem ----------------------------------------------------
-
-Print "SnglFunc.BAS -- Test Single-Line User-defined Function Statement"
-Print
-
-Def Sum( x, y ) = x + y
-
-Print
-Print "The sum of 6 and 4 is "; Sum( 6, 4 )
-
-Print "Did it work properly?"
-End
diff --git a/bwbtest/B15A/snglfunc.run b/bwbtest/B15A/snglfunc.run
deleted file mode 100644
index 4e2f96c..0000000
--- a/bwbtest/B15A/snglfunc.run
+++ /dev/null
@@ -1,5 +0,0 @@
-SnglFunc.BAS -- Test Single-Line User-defined Function Statement
-
-
-The sum of 6 and 4 is 10
-Did it work properly?
diff --git a/bwbtest/B15A/stop.bas b/bwbtest/B15A/stop.bas
deleted file mode 100644
index 3454e75..0000000
--- a/bwbtest/B15A/stop.bas
+++ /dev/null
@@ -1,6 +0,0 @@
-10 REM STOP.BAS -- Test STOP Statement
-20 PRINT "STOP.BAS -- Test STOP Statement"
-30 PRINT "If the program is interrupted after this line, STOP worked OK"
-40 STOP
-50 PRINT "But if this line printed, then it did not work."
-60 END
diff --git a/bwbtest/B15A/stop.run b/bwbtest/B15A/stop.run
deleted file mode 100644
index 838ba4c..0000000
--- a/bwbtest/B15A/stop.run
+++ /dev/null
@@ -1,4 +0,0 @@
-STOP.BAS -- Test STOP Statement
-If the program is interrupted after this line, STOP worked OK
-
-Program interrupted at line 40
diff --git a/bwbtest/B15A/term.INP b/bwbtest/B15A/term.INP
deleted file mode 100644
index 8baef1b..0000000
--- a/bwbtest/B15A/term.INP
+++ /dev/null
@@ -1 +0,0 @@
-abc
diff --git a/bwbtest/B15A/term.bas b/bwbtest/B15A/term.bas
deleted file mode 100644
index af6b3e9..0000000
--- a/bwbtest/B15A/term.bas
+++ /dev/null
@@ -1,10 +0,0 @@
-10 REM BWBASIC Program to Demonstrate Terminal-Specific Use
-20 REM The following definitions are for an ANSI Terminal.
-30 REM You may have to define different variables for your
-40 REM particular terminal
-50 REM
-60 LET CL$ = chr$(&h1b)+"[2J"
-70 PRINT CL$;
-80 PRINT " Bywater BASIC"
-90 INPUT c$
-100 END
diff --git a/bwbtest/B15A/term.run b/bwbtest/B15A/term.run
deleted file mode 100644
index e49fe2d..0000000
--- a/bwbtest/B15A/term.run
+++ /dev/null
@@ -1,2 +0,0 @@
- [2J Bywater BASIC
-? abc
diff --git a/bwbtest/B15A/test.out b/bwbtest/B15A/test.out
deleted file mode 100644
index f9d10fb..0000000
--- a/bwbtest/B15A/test.out
+++ /dev/null
@@ -1,2 +0,0 @@
-This is line 1.
-This is line 2.
diff --git a/bwbtest/B15A/whilwend.bas b/bwbtest/B15A/whilwend.bas
deleted file mode 100644
index d469622..0000000
--- a/bwbtest/B15A/whilwend.bas
+++ /dev/null
@@ -1,13 +0,0 @@
-10 REM WHILWEND.BAS -- Test WHILE-WEND Loops
-20 PRINT "START"
-30 LET X = 0
-40 WHILE X < 25
-50 PRINT "x is ";X
-60 LET X = X + 1
-70 LET Y = 0
-80 WHILE Y < 2
-90 PRINT "y is "; Y
-100 LET Y = Y + 1
-110 WEND
-120 WEND
-130 PRINT "END"
diff --git a/bwbtest/B15A/whilwend.run b/bwbtest/B15A/whilwend.run
deleted file mode 100644
index 90353ba..0000000
--- a/bwbtest/B15A/whilwend.run
+++ /dev/null
@@ -1,77 +0,0 @@
-START
-x is 0
-y is 0
-y is 1
-x is 1
-y is 0
-y is 1
-x is 2
-y is 0
-y is 1
-x is 3
-y is 0
-y is 1
-x is 4
-y is 0
-y is 1
-x is 5
-y is 0
-y is 1
-x is 6
-y is 0
-y is 1
-x is 7
-y is 0
-y is 1
-x is 8
-y is 0
-y is 1
-x is 9
-y is 0
-y is 1
-x is 10
-y is 0
-y is 1
-x is 11
-y is 0
-y is 1
-x is 12
-y is 0
-y is 1
-x is 13
-y is 0
-y is 1
-x is 14
-y is 0
-y is 1
-x is 15
-y is 0
-y is 1
-x is 16
-y is 0
-y is 1
-x is 17
-y is 0
-y is 1
-x is 18
-y is 0
-y is 1
-x is 19
-y is 0
-y is 1
-x is 20
-y is 0
-y is 1
-x is 21
-y is 0
-y is 1
-x is 22
-y is 0
-y is 1
-x is 23
-y is 0
-y is 1
-x is 24
-y is 0
-y is 1
-END
diff --git a/bwbtest/B15A/width.bas b/bwbtest/B15A/width.bas
deleted file mode 100644
index 291f257..0000000
--- a/bwbtest/B15A/width.bas
+++ /dev/null
@@ -1,5 +0,0 @@
-10 open "o", #1, "data.tmp"
-20 width #1, 35
-30 print #1, "123456789012345678901234567890123456789012345678901234567890"
-40 close #1
-50 print "Check file to see if the printing wrapped at col 35"
diff --git a/bwbtest/B15A/width.run b/bwbtest/B15A/width.run
deleted file mode 100644
index 4476b6e..0000000
--- a/bwbtest/B15A/width.run
+++ /dev/null
@@ -1 +0,0 @@
-Check file to see if the printing wrapped at col 35
diff --git a/bwbtest/B15A/writeinp.bas b/bwbtest/B15A/writeinp.bas
deleted file mode 100644
index c172500..0000000
--- a/bwbtest/B15A/writeinp.bas
+++ /dev/null
@@ -1,20 +0,0 @@
-10 rem WRITEINP.BAS -- Test WRITE # and INPUT # Statements
-20 print "WRITEINP.BAS -- Test WRITE # and INPUT # Statements"
-30 s1$ = "String 1"
-40 s2$ = "String 2"
-50 s3$ = "String 3"
-60 x1 = 1.1234567
-70 x2 = 2.2345678
-80 x3 = 3.3456789
-90 open "o", #1, "data.tmp"
-100 write #1, s1$, x1, s2$, x2, s3$, x3
-110 close #1
-120 print "This is what was written:"
-130 write s1$, x1, s2$, x2, s3$, x3
-140 open "i", #2, "data.tmp"
-150 input #2, b1$, n1, b2$, n2, b3$, n3
-160 close #2
-170 print "This is what was read:"
-180 write b1$, n1, b2$, n2, b3$, n3
-190 print "End of WRITEINP.BAS"
-200 end
diff --git a/bwbtest/B15A/writeinp.run b/bwbtest/B15A/writeinp.run
deleted file mode 100644
index 5e42a4f..0000000
--- a/bwbtest/B15A/writeinp.run
+++ /dev/null
@@ -1,6 +0,0 @@
-WRITEINP.BAS -- Test WRITE # and INPUT # Statements
-This is what was written:
-"String 1",1.12346,"String 2",2.23457,"String 3",3.34568
-This is what was read:
-"String 1",1.12346,"String 2",2.23457,"String 3",3.34568
-End of WRITEINP.BAS
diff --git a/bwbtest/B15B/00readme.txt b/bwbtest/B15B/00readme.txt
deleted file mode 100644
index 739f685..0000000
--- a/bwbtest/B15B/00readme.txt
+++ /dev/null
@@ -1,246 +0,0 @@
-These programs appear to work, and are part of regression testing.
-
-Changes made:
-a) add missing semicolon/comma in PRINT statements
-b) change array names so they were not identical to scalar variable names
-c) add spaces around reserved words
-d) CASSETTE is not supported, use DISKETTE instead
-e) add missing THEN after IF
-f) change PRINT #1,X,Y to WRITE #1,X,Y
-g) add exit for autmated testing
-
-These programs were downloaded from:
-http://www.skyandtelescope.com/astronomy-resources/basic-programs-from-sky-telescope/
-
-
-BASIC Programs from Sky & Telescope
-By: The Editors of Sky Telescope | July 22, 2006
-
-Sky & Telescope magazine is pleased to make available in machine-readable form the programs that have been published in its monthly Astronomical Computing department, which first appeared in April 1984, and later in the Computers in Astronomy department. These are offered as-is and without support.
-The table on the following three pages lists the programs in reverse chronological order. Each name is a hyperlink; if you select the name and your Web browser supports simple ASCII file transfers, you'll automatically download the BASIC program.
-
-Whenever possible the programs are written in simple generic BASIC, but there are unavoidable variations from one interpreter to another. In case of difficulties, check your BASIC manual. A few programs require specific graphics adapters or printers. To run these programs, you will need a BASIC interpreter for your computer. If you do not know if your computer has one, see Stuart Goldman's article, "BASICally Speaking," adapted from the April 1996 issue of S&T.
-
-At the end of each program is a block indicating the issue of the magazine in which the program appeared together with supporting text and instructions. If you have any questions, please consult the original articles.
-
-BASIC Programs from Sky & Telescope
-Magazine
-File Name Issue Brief Description
-ROCKET.BAS Feb 02,
-p. 66 Travel time for a space trip at relativistic speed
-DAYSOLD.BAS Nov 01,
-p. 63 Determine date after input number of days after
-birthday
-LOOKBAK2.BAS Aug 01,
-p. 62 Cosmological quantities of an accelerating universe
-PILLAR.BAS May 99,
-p. 71 Simulate the appearance of a Sun pillar
-MSACHART.BAS Oct 98,
-p. 63 Millennium Star Atlas chart number
-SUPERNUM.BAS Sep 98,
-p. 70 Emergence angles of supernumerary rainbows
-VISLIMIT.BAS May 98,
-p. 57 Visual limiting magnitude from any site
-CCDLIMI2.BAS May 98,
-p. 117 Limiting magnitude of a CCD camera
-LOOKBACK.BAS Sep 97,
-p. 59 Age and distance of a galaxy of known redshift
-SOLAROSC.BAS Jun 97,
-p. 92 Visualize global solar oscillation modes
-SUNDOG.BAS Jan 97,
-p. 103 Simulate the appearance of sundogs
-CRATER.BAS Nov 96,
-p. 90 Find the dimensions of an impact crater
-BLKHOLE1.BAS May 96,
-p. 92 Determine the mass of a black hole
-BLKHOLE2.BAS May 96,
-p. 92 Calculate black-hole tidal forces
-BLKHOLE3.BAS May 96,
-p. 92 Generate a black-hole "accelergram"
-FACECIRC.BAS Mar 96,
-p. 84 Print setting-circle disks on a LaserJet
-SCALES.BAS Mar 96,
-p. 84 Print setting-circle strips on a LaserJet
-AGEUNIV.BAS Jan 96,
-p. 92 Age of the universe since the Big Bang
-PULSAR.BAS Oct 95,
-p. 86 Relativistic precession in binary orbits
-CHANCE.BAS Jun 95,
-p. 86 Odds of witnessing certain astronomical events
-SATRINGS.BAS May 95,
-p. 92 Saturn ring-plane crossings
-JACK.BAS Sep 94,
-p. 78 Demo of perturbed planetary motion
-SUNUP.BAS Aug 94,
-p. 84 Times of sunrise/set at any place on Earth
-MOONFX.BAS Apr 94,
-p. 86 Moon phase and distance on any given date
-CAPTURE.BAS Feb 94,
-p. 85 Best film/camera combos for capturing meteors
-SUNTAN.BAS Jul 93,
-p. 83 Effects of ozone, haze, on suntanning time
-ASTEROID.BAS Jun 93,
-p. 83 The size of an asteroid from its brightness
-CCDLIMIT.BAS Feb 93,
-p. 84 Compute the signal-to-noise ratio of a CCD
-OCCVIS.BAS Jan 93,
-p. 89 Compute the visibility of a star near the Moon
-ROTATE.BAS Sep 92,
-p. 318 Field rotation in a misaligned telescope
-GFLASH.BAS Feb 92,
-p. 200 Simulate the appearance of the "green flash"
-PRECESS.BAS Oct 91,
-p. 408 Rigorous precession of a star's coordinates
-LIST.BAS Aug 91,
-p. 182 Make index lists of objects on star atlases
-SOLARECL.BAS Jul 91,
-p. 71 Predictions of July 11, 1991, solar eclipse
-FIREBALL.BAS Jun 91,
-p. 640 Calculate descent of a fireball
-
-BASIC Programs from Sky & Telescope
-Magazine
-File Name Issue Brief Description
-RONCHI.BAS Apr 91,
-p. 416 Ronchi test simulation
-RAINBOW.BAS Feb 91,
-p. 199 Graphic simulation of a rainbow
-SPIRAL.BAS Dec 90,
-p. 654 Modeling spiral galaxies
-MARS.BAS Sep 90,
-p. 296 Physical ephemeris of Mars
-MARCHE.BAS Jul 90,
-p. 71 Astrometric positions of a comet or asteroid
-MALLAM.BAS May 90,
-p. 543 Precession of a satellite's orbit
-ORIGAM.BAS Apr 90,
-p. 424 Make a paper model of a comet orbit
-MIRROR.BAS Feb 90,
-p. 195 Foucault mirror test analysis
-HARTLEY.BAS Jan 90,
-p. 86 Globe- and grid-drawing program (Macintosh)
-JMERID.BAS Dec 89,
-p. 640 Jupiter's central meridian for any date/time
-LIMMAG.BAS Nov 89,
-p. 522 Limiting magnitude of a telescope
-GOSS.BAS Oct 89,
-p. 410 Light curves of eclipsing binaries
-SHOWER.BAS Aug 89,
-p. 195 Dates of meteor showers
-SINE.BAS Aug 89,
-p. 139 Demonstration of chaotic behavior
-MOONUP.BAS Jul 89,
-p. 78 Compute moonrise-moonset times for any place
-GALISA.BAS Jun 89,
-p. 650 Plot Galilean moons of Jupiter (Apple II)
-SPACE.BAS May 89,
-p. 531 Space motion of a star
-CHART.BAS Apr 89,
-p. 420 Find atlas charts for any celestial coordinates
-REFR1.BAS Mar 89,
-p. 311 Compute atmospheric refraction
-TAKI.BAS Feb 89,
-p. 194 How to aim an alt-az (Dobsonian) telescope
-FRACTS.BAS Jan 89,
-p. 80 Represent a decimal as a continued fraction
-PERIOD.BAS Sep 88,
-p. 288 Period search by Fourier transform
-LUNAR.BAS Jun 88,
-p. 640 Compute dates of lunar eclipses
-SHADOW.BAS Apr 88,
-p. 417 Modeling mountain shadows
-CIRCLE.BAS Mar 88,
-p. 304 Make setting circles and scales on a printer
-DIAL.BAS Dec 87,
-p. 646 Design a vertical sundial
-PERIAP.BAS Nov 87,
-p. 527 Compute lunar apogee and perigee
-STEREO.BAS Oct 87,
-p. 407 Plot stars in stereographic projection
-DIFPAT.BAS Sep 87,
-p. 294 Compute and display diffraction patterns
-BINARY.BAS Jul 87,
-p. 71 Orbital ephemeris of a binary star
-CLOCK.BAS May 87,
-p. 535 Add Moon to a real-time clock (Apple II)
-ORBITS.BAS May 87,
-p. 535 Positions in near-parabolic orbits
-EXTINC.BAS Apr 87,
-p. 426 Compute extinction of starlight
-PATH.BAS Feb 87,
-p. 196 Interpolate comet positions
-
-BASIC Programs from Sky & Telescope
-Magazine
-File Name Issue Brief Description
-METEOR.BAS Jan 87,
-p. 83 Compute flight of meteors
-OBSCUR.BAS Nov 86,
-p. 515 Obscuration at a solar eclipse
-SURF.BAS Oct 86,
-p. 392 Surface brightness of an extended object
-SPHE.BAS Sep 86,
-p. 278 Measure radius of curvature with a spherometer
-REACT.BAS Aug 86,
-p. 174 Test your personal reaction time
-ALTAZ2.BAS Jul 86,
-p. 70 How to correct altitudes for refraction
-MODEL.BAS Apr 86,
-p. 398 Create model of star cluster
-EASTER.BAS Mar 86,
-p. 294 Compute date of Easter
-TRACK.BAS Feb 86,
-p. 190 Astrophoto tracking tolerances
-COMET.BAS Dec 85,
-p. 590 Compute the ephemeris of a comet
-XYZ.BAS Nov 85,
-p. 470 X,Y,Z coordinates of the Sun
-SAROS.BAS Oct 85,
-p. 366 Saros numbers for solar eclipses
-HELIAC.BAS Sep 85,
-p. 261 Heliacal rise and set times
-KEPLER.BAS Aug 85,
-p. 158 Solve Kepler's equation (celestial mechanics)
-CALENDAR.BAS Jul 85,
-p. 62 Perpetual calendar (Gregorian)
-SHUTTR.BAS Jun 85,
-p. 158 Shutter speeds for astrophotography
-WAVEL.BAS Jun 85,
-p. 544 Positions of absorption lines in a spectrum
-STEPPR.BAS Apr 85,
-p. 350 Controlling a stepper motor
-MOONS.BAS Mar 85,
-p. 254 Dates and times of new and full Moon
-PHOTOM.BAS Feb 85,
-p. 158 Reducing photometric observations
-LHEIGHT.BAS Jan 85,
-p. 62 Compute heights of lunar features
-GLOB1.BAS Dec 84,
-p. 555 Distribution of globular clusters (Apple II)
-GLOB2.BAS Dec 84,
-p. 555 Distribution of globular clusters (Apple II)
-LENS.BAS Nov 84,
-p. 450 Calculate curves for an aplanatic lens
-GWMONTH.BAS Oct 84,
-p. 347 Convert month number to name
-SUNSHINE.BAS Sep 84,
-p. 254 Hours of sunshine for a specific latitude
-ANGSEP.BAS Aug 84,
-p. 159 Angular separation of two celestial objects
-STAY.BAS Jul 84,
-p. 62 Comet's time spent inside Earth's orbit
-ALTAZ.BAS Jun 84,
-p. 558 Star altitude and azimuth at a given time
-GMST.BAS Jun 84,
-p. 558 Sidereal time for Greenwich meridian
-CALJD.BAS May 84,
-p. 454 Convert calendar date to Julian day
-JDCAL.BAS May 84,
-p. 454 Convert Julian day to calendar date
-ADDMAG.BAS Apr 84,
-p. 359 Combined magnitude of two or more stars
-INTERP.BAS Apr 84,
-p. 359 Lagrange interpolation (multiple data points)
-
-
-EOF
diff --git a/bwbtest/B15B/00test.sh b/bwbtest/B15B/00test.sh
deleted file mode 100644
index d63e4cc..0000000
--- a/bwbtest/B15B/00test.sh
+++ /dev/null
@@ -1,124 +0,0 @@
-# Puropose: Verify existing BWBASIC behavior
-# Author: Howard Wulf
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/SKYTEL
-# ash ./00test.sh
-#
-
-rm *.80
-rm *.OUT
-rm *.LPT
-rm *.dif
-
-# ----------------------------------------------
-# Regression Tests
-# ----------------------------------------------
-testcase()
-{
- TESTCASE=${1}
- echo "TESTCASE=${TESTCASE}"
- ~/bwbasic --tape ${TESTCASE}.INP --profile B15.PRO --profile ${TESTCASE}.PRO ${TESTCASE}.BAS 1> ${TESTCASE}.OUT 2> ${TESTCASE}.LPT
-
-
- echo "500 DATA ${TESTCASE}.OUT, ${TESTCASE}.80" > PAD80.INP
- ~/bwbasic --profile PAD80.PRO PAD80.BAS
-
-
- diff ${TESTCASE}.run ${TESTCASE}.80 > ${TESTCASE}.dif
- if test -s ${TESTCASE}.dif
- then
- echo less ${TESTCASE}.dif
- fi
-}
-
-# ---------------------------------------------
-#
-# various dialects of BASIC
-#
-
-
-testcase addmag
-testcase altaz
-testcase altaz2
-testcase angsep
-testcase asteroid
-testcase binary
-testcase blkhole1
-testcase blkhole2
-testcase blkhole3
-testcase calendar
-testcase caljd
-testcase capture
-testcase ccdlimi2
-testcase ccdlimit
-testcase chance
-testcase chart
-testcase circle
-testcase comet
-testcase crater
-testcase daysold
-testcase dial
-testcase difpat
-testcase easter
-testcase extinc
-testcase facecirc
-testcase fireball
-testcase fracts
-testcase gflash
-testcase glob1
-testcase gmst
-testcase gwmonth
-testcase interp
-testcase jdcal
-testcase jmerid
-testcase kepler
-testcase lens
-testcase lheight
-testcase limmag
-testcase lookback
-testcase lookbak2
-testcase lunar
-testcase mallam
-testcase mars
-testcase meteor
-testcase moonfx
-testcase moons
-testcase moonup
-testcase msachart
-testcase obscur
-testcase occvis
-testcase orbits
-testcase path
-testcase period
-testcase photom
-testcase precess
-testcase refr1
-testcase rocket
-testcase rotate
-testcase saros
-testcase satrings
-testcase scales
-testcase shadow
-testcase shower
-testcase shuttr
-testcase solarecl
-testcase space
-testcase sphe
-testcase stay
-testcase steppr
-testcase stereo
-testcase sunshine
-testcase suntan
-testcase sunup
-testcase supernum
-testcase surf
-testcase taki
-testcase track
-testcase vislimit
-testcase wavel
-testcase xyz
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/B15B/01test.sh b/bwbtest/B15B/01test.sh
deleted file mode 100644
index 64c51bc..0000000
--- a/bwbtest/B15B/01test.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-# Filename: 01test.sh
-# Purpose: automted regression review
-# Author: Howard Wulf, AF5NE
-# Date: 2015-01-29
-# Uasage: implementation defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic/NBS2
-# ash ./01test.sh
-#
-#
-
-# review ERRORS
-cat *.dif > dif.OUT
-if test -s dif.OUT
-then
- pwd > dif.OUT
- cat *.dif >> dif.OUT
- less dif.OUT
-fi
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/B15B/02ok.sh b/bwbtest/B15B/02ok.sh
deleted file mode 100644
index 118fddc..0000000
--- a/bwbtest/B15B/02ok.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Puropose: Promote current results to regression
-# Author: Howard Wulf
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/bwskytel
-# ash ./01ok.sh
-#
-
-for f in *.80; do mv "$f" "${f/.80/.run}"; done
-# EOF
diff --git a/bwbtest/B15B/99test.sh b/bwbtest/B15B/99test.sh
deleted file mode 100644
index 5532865..0000000
--- a/bwbtest/B15B/99test.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-# Puropose: Cleanup after tests have passed
-# Author: Howard Wulf, AF5NE
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/BP100
-# ash ./99test.sh
-#
-
-rm *.80
-rm *.OUT
-rm *.LPT
-rm *.dif
-
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/B15B/B15.PRO b/bwbtest/B15B/B15.PRO
deleted file mode 100644
index 5fe6743..0000000
--- a/bwbtest/B15B/B15.PRO
+++ /dev/null
@@ -1 +0,0 @@
-OPTION VERSION "BYWATER"
diff --git a/bwbtest/B15B/BOW.DAT b/bwbtest/B15B/BOW.DAT
deleted file mode 100644
index a759f6e..0000000
--- a/bwbtest/B15B/BOW.DAT
+++ /dev/null
@@ -1,101 +0,0 @@
- 38.313 0.001
- 38.380 0.083
- 38.413 0.270
- 38.479 0.510
- 38.511 0.746
- 38.576 0.921
- 38.640 0.998
- 38.672 0.963
- 38.736 0.828
- 38.767 0.624
- 38.830 0.398
- 38.861 0.194
- 38.922 0.054
- 38.953 0.000
- 39.013 0.041
- 39.043 0.164
- 39.103 0.346
- 39.162 0.551
- 39.191 0.746
- 39.249 0.897
- 39.278 0.984
- 39.335 0.995
- 39.364 0.931
- 39.420 0.806
- 39.476 0.639
- 39.503 0.454
- 39.558 0.279
- 39.585 0.135
- 39.639 0.039
- 39.692 0.001
- 39.719 0.022
- 39.771 0.098
- 39.797 0.218
- 39.848 0.367
- 39.899 0.527
- 39.925 0.682
- 39.974 0.816
- 39.999 0.919
- 40.048 0.981
- 40.097 1.000
- 40.121 0.975
- 40.169 0.911
- 40.216 0.815
- 40.239 0.697
- 40.285 0.565
- 40.331 0.432
- 40.353 0.305
- 40.398 0.194
- 40.442 0.104
- 40.464 0.041
- 40.507 0.007
- 40.550 0.001
- 40.571 0.024
- 40.613 0.072
- 40.654 0.141
- 40.675 0.226
- 40.715 0.323
- 40.755 0.426
- 40.775 0.530
- 40.814 0.630
- 40.852 0.723
- 40.890 0.806
- 40.909 0.876
- 40.946 0.930
- 40.983 0.970
- 41.019 0.993
- 41.037 1.000
- 41.072 0.993
- 41.106 0.971
- 41.140 0.938
- 41.157 0.895
- 41.190 0.842
- 41.223 0.784
- 41.255 0.720
- 41.271 0.654
- 41.303 0.586
- 41.333 0.518
- 41.364 0.452
- 41.393 0.389
- 41.408 0.329
- 41.437 0.273
- 41.465 0.222
- 41.493 0.176
- 41.521 0.136
- 41.534 0.101
- 41.561 0.072
- 41.587 0.048
- 41.612 0.029
- 41.637 0.015
- 41.661 0.006
- 41.685 0.001
- 41.697 0.000
- 41.720 0.003
- 41.743 0.008
- 41.765 0.017
- 41.787 0.028
- 41.808 0.041
- 41.828 0.055
- 41.849 0.072
- 41.868 0.089
- 41.887 0.107
diff --git a/bwbtest/B15B/OUTPUT.TXT b/bwbtest/B15B/OUTPUT.TXT
deleted file mode 100644
index 640b93e..0000000
--- a/bwbtest/B15B/OUTPUT.TXT
+++ /dev/null
@@ -1,170 +0,0 @@
--0.013 -0.008 0.000 0.000
--0.156 -0.033 -0.155 -0.033
--0.007 -0.001 0.000 0.000
- 0.056 -0.034 0.044 -0.027
--0.125 0.012 -0.123 0.012
- 0.002 0.045 0.000 0.000
--0.052 0.042 -0.042 0.033
- 0.011 -0.052 0.006 -0.027
--0.029 0.011 0.000 0.000
--0.107 0.104 -0.106 0.103
- 0.121 -0.014 0.119 -0.014
--0.041 -0.036 -0.023 -0.020
--0.027 0.027 0.000 0.000
--0.027 0.005 0.000 0.000
--0.011 -0.104 -0.011 -0.101
- 0.019 0.117 0.019 0.115
--0.013 0.044 -0.001 0.004
- 0.061 -0.014 0.045 -0.010
--0.042 -0.146 -0.042 -0.145
--0.023 -0.018 0.000 0.000
--0.040 -0.026 -0.008 -0.006
--0.053 0.083 -0.051 0.080
- 0.039 0.045 0.027 0.030
- 0.051 -0.133 0.051 -0.131
--0.084 0.088 -0.082 0.087
- 0.008 0.028 0.000 0.000
--0.151 -0.046 -0.150 -0.046
- 0.024 0.063 0.019 0.051
- 0.065 0.027 0.054 0.022
- 0.016 -0.076 0.015 -0.068
- 0.002 0.126 0.002 0.124
- 0.012 -0.006 0.000 0.000
--0.042 0.153 -0.042 0.152
--0.066 0.031 -0.057 0.026
--0.011 -0.099 -0.011 -0.095
- 0.001 0.001 0.000 0.000
- 0.062 -0.013 0.047 -0.010
- 0.116 -0.056 0.115 -0.055
--0.108 -0.105 -0.107 -0.104
- 0.081 -0.115 0.080 -0.114
--0.062 0.025 -0.050 0.020
- 0.024 -0.023 0.000 0.000
- 0.010 -0.002 0.000 0.000
- 0.027 -0.094 0.025 -0.090
--0.031 0.029 0.000 0.000
--0.071 0.135 -0.071 0.134
--0.080 -0.094 -0.079 -0.093
- 0.002 -0.013 0.000 0.000
--0.075 -0.026 -0.067 -0.024
- 0.013 -0.076 0.011 -0.067
--0.131 0.082 -0.130 0.081
- 0.012 -0.026 0.000 0.000
--0.080 0.011 -0.072 0.010
--0.065 -0.114 -0.064 -0.112
--0.086 0.120 -0.085 0.119
--0.017 0.010 0.000 0.000
- 0.017 0.058 0.012 0.041
- 0.126 0.032 0.125 0.032
--0.073 -0.016 -0.064 -0.014
- 0.075 0.002 0.065 0.002
--0.068 -0.036 -0.061 -0.032
- 0.112 -0.016 0.109 -0.015
--0.017 -0.029 0.000 0.000
--0.019 -0.023 0.000 0.000
--0.023 -0.153 -0.022 -0.152
- 0.029 -0.054 0.020 -0.038
- 0.011 0.123 0.011 0.121
- 0.034 0.058 0.028 0.047
--0.004 -0.003 0.000 0.000
- 0.034 0.092 0.033 0.088
- 0.118 0.040 0.116 0.040
- 0.041 0.069 0.037 0.062
--0.001 0.027 0.000 0.000
--0.062 0.100 -0.061 0.098
- 0.027 0.145 0.027 0.144
- 0.042 0.003 0.000 0.000
- 0.124 -0.069 0.123 -0.068
- 0.018 0.150 0.018 0.149
--0.069 -0.009 -0.058 -0.007
- 0.010 -0.006 0.000 0.000
--0.068 -0.071 -0.065 -0.068
--0.081 0.080 -0.079 0.078
- 0.051 0.003 0.020 0.001
--0.015 0.015 0.000 0.000
- 0.046 0.130 0.045 0.129
--0.012 -0.015 0.000 0.000
- 0.015 -0.056 0.010 -0.037
- 0.133 -0.045 0.132 -0.045
--0.104 0.111 -0.103 0.110
--0.032 0.079 -0.029 0.073
- 0.108 -0.115 0.107 -0.114
- 0.051 0.046 0.042 0.037
--0.157 0.015 -0.156 0.015
- 0.084 -0.043 0.080 -0.041
- 0.042 -0.114 0.042 -0.112
--0.030 0.010 0.000 0.000
- 0.003 0.146 0.003 0.144
--0.071 0.003 -0.060 0.003
- 0.002 0.007 0.000 0.000
--0.045 0.074 -0.042 0.069
- 0.013 -0.063 0.010 -0.048
- 0.013 0.009 0.000 0.000
- 0.099 0.096 0.098 0.095
--0.062 -0.091 -0.060 -0.088
- 0.024 0.039 0.002 0.003
--0.032 -0.076 -0.029 -0.069
--0.080 -0.129 -0.080 -0.128
- 0.113 0.029 0.111 0.028
--0.070 0.087 -0.068 0.085
--0.096 0.015 -0.091 0.014
--0.041 -0.126 -0.041 -0.124
--0.003 0.064 -0.003 0.048
- 0.149 0.014 0.148 0.014
--0.013 -0.110 -0.013 -0.107
- 0.073 0.096 0.071 0.094
--0.044 0.073 -0.040 0.067
- 0.089 0.084 0.087 0.082
- 0.014 -0.007 0.000 0.000
- 0.079 0.036 0.073 0.033
--0.040 0.107 -0.039 0.104
--0.106 0.069 -0.104 0.068
--0.011 0.001 0.000 0.000
- 0.134 0.032 0.132 0.031
--0.117 0.053 -0.116 0.052
--0.079 -0.005 -0.071 -0.005
- 0.063 0.019 0.049 0.015
--0.103 0.045 -0.100 0.044
- 0.004 -0.002 0.000 0.000
- 0.103 -0.051 0.101 -0.050
--0.103 -0.028 -0.100 -0.027
- 0.007 0.020 0.000 0.000
--0.040 0.008 0.000 0.000
- 0.004 0.071 0.003 0.059
- 0.005 0.006 0.000 0.000
--0.085 -0.045 -0.081 -0.043
- 0.050 0.127 0.049 0.126
- 0.016 -0.062 0.012 -0.048
--0.019 0.015 0.000 0.000
- 0.144 -0.043 0.142 -0.043
--0.027 0.043 -0.011 0.018
--0.025 -0.081 -0.023 -0.075
- 0.053 0.101 0.052 0.099
--0.006 0.093 -0.006 0.088
--0.019 0.108 -0.019 0.105
- 0.029 -0.046 0.016 -0.025
- 0.025 -0.003 0.000 0.000
--0.037 0.065 -0.032 0.056
--0.100 -0.087 -0.098 -0.086
--0.140 0.065 -0.139 0.064
--0.015 -0.038 0.000 0.000
- 0.077 -0.015 0.069 -0.014
--0.133 0.013 -0.131 0.013
- 0.060 -0.061 0.055 -0.056
--0.030 0.014 0.000 0.000
- 0.019 -0.002 0.000 0.000
- 0.047 0.089 0.045 0.086
- 0.102 0.082 0.101 0.081
--0.064 -0.134 -0.063 -0.133
--0.136 0.047 -0.135 0.046
--0.047 -0.031 -0.029 -0.018
--0.077 -0.133 -0.076 -0.132
- 0.136 0.032 0.134 0.031
- 0.006 0.002 0.000 0.000
--0.002 -0.014 0.000 0.000
--0.040 -0.073 -0.037 -0.067
--0.022 0.045 -0.008 0.016
--0.014 0.129 -0.014 0.127
- 0.031 0.042 0.015 0.020
- 0.045 -0.023 0.016 -0.008
--0.022 -0.014 0.000 0.000
diff --git a/bwbtest/B15B/PAD80.BAS b/bwbtest/B15B/PAD80.BAS
deleted file mode 100644
index 2a293c3..0000000
--- a/bwbtest/B15B/PAD80.BAS
+++ /dev/null
@@ -1,44 +0,0 @@
-010 REM OPTION VERSION BYWATER
-020 REM
-100 REM PAD80.BAS
-101 REM Pad the test output to 80 characters.
-102 REM bwbasic P001.BAS > P001.OUT
-103 REM echo "500 DATA P001.OUT, P001.80" > PAD80.INP
-104 REM bwbasic PAD80.BAS
-105 REM diff P001.run P001.80
-109 REM ----------------------------------------------------------
-120 REM GET FILE NAME INTO A$
-122 DELETE 500
-124 MERGE "PAD80.INP"
-126 REM LIST
-128 RESTORE 500
-130 READ A$
-135 REM PRINT "SOURCE:"; A$
-140 READ B$
-145 REM PRINT "TARGET:"; B$
-300 REM ----------------------------------------------------------
-301 REM PROCESS FILENAME IN A$
-302 REM ----------------------------------------------------------
-310 OPEN A$ FOR INPUT AS #2
-315 OPEN B$ FOR OUTPUT AS #3
-320 REM PRINT "PROCESS TEXT LINE"
-330 IF EOF( 2 ) THEN 390
-335 REM PRINT "NOT EOF"
-340 LINE INPUT #2, C$
-345 REM PRINT "C$=";C$
-350 C$ = LEFT$( C$ + SPACE$( 80 ), 80 )
-355 REM PRINT "yyy"
-360 REM WRITE OUTPUT LINE
-370 PRINT #3, C$
-375 REM PRINT "zzz"
-380 GOTO 320
-390 REM CLOSE FILES
-400 CLOSE #3
-410 CLOSE #2
-499 REM ----------------------------------------------------------
-500 REM REPLACED BY CONTENTS OF "PAD80.INP"
-501 REM ----------------------------------------------------------
-900 REM ----------------------------------------------------------
-910 REM THE END
-920 REM ----------------------------------------------------------
-999 END
diff --git a/bwbtest/B15B/PAD80.INP b/bwbtest/B15B/PAD80.INP
deleted file mode 100644
index 3fdeacc..0000000
--- a/bwbtest/B15B/PAD80.INP
+++ /dev/null
@@ -1 +0,0 @@
-500 DATA xyz.OUT, xyz.80
diff --git a/bwbtest/B15B/PAD80.PRO b/bwbtest/B15B/PAD80.PRO
deleted file mode 100644
index 4c31bf5..0000000
--- a/bwbtest/B15B/PAD80.PRO
+++ /dev/null
@@ -1,2 +0,0 @@
-OPTION VERSION "BYWATER"
-OPTION LABELS OFF
diff --git a/bwbtest/B15B/addmag.INP b/bwbtest/B15B/addmag.INP
deleted file mode 100644
index 7083f64..0000000
--- a/bwbtest/B15B/addmag.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-2
-3
-X
diff --git a/bwbtest/B15B/addmag.bas b/bwbtest/B15B/addmag.bas
deleted file mode 100644
index 4c5ddec..0000000
--- a/bwbtest/B15B/addmag.bas
+++ /dev/null
@@ -1,20 +0,0 @@
-10 REM ADDING MAGNITUDES
-15 REM
-20 B=100^.2: N=2: C=LOG(10)
-25 INPUT "1ST STAR MAG";M1
-30 INPUT "2ND STAR MAG";M2
-35 M = B^(-M1) + B^(-M2)
-40 M = -2.5*LOG(M)/C
-45 PRINT "TOTAL MAG: ";M
-50 M1=M: N=N+1: PRINT
-55 INPUT "ANOTHER STAR";M$
-60 IF M$="X" THEN 75
-70 M2=VAL(M$): GOTO 35
-75 PRINT "STAR COUNT: ";N-1
-80 END
-81 REM ------------------------
-82 REM APPEARED IN ASTRONOMICAL
-83 REM COMPUTING, SKY & TELE-
-84 REM SCOPE, APRIL, 1984
-85 REM ------------------------
-
diff --git a/bwbtest/B15B/addmag.run b/bwbtest/B15B/addmag.run
deleted file mode 100644
index 104c383..0000000
--- a/bwbtest/B15B/addmag.run
+++ /dev/null
@@ -1,6 +0,0 @@
-1ST STAR MAG? 2
-2ND STAR MAG? 3
-TOTAL MAG: 1.63615
-
-ANOTHER STAR? X
-STAR COUNT: 2
diff --git a/bwbtest/B15B/altaz.INP b/bwbtest/B15B/altaz.INP
deleted file mode 100644
index 1a20282..0000000
--- a/bwbtest/B15B/altaz.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-5,45,32
-180,55,22
-120,45
-8,21,32
diff --git a/bwbtest/B15B/altaz.bas b/bwbtest/B15B/altaz.bas
deleted file mode 100644
index 31306f1..0000000
--- a/bwbtest/B15B/altaz.bas
+++ /dev/null
@@ -1,43 +0,0 @@
-10 REM ALTITUDE AND AZIMUTH
-12 REM
-14 P=3.14159265: R1=P/180
-16 INPUT "R A (H,M,S) ";A$,A2,A3
-18 GOSUB 72: R=A*15*R1
-20 INPUT "DEC (D,M,S) ";A$,A2,A3
-22 GOSUB 72: D=A*R1
-24 INPUT "LAT, LONG ";B,L
-26 B=B*R1: L=L*R1
-28 INPUT "GST (H,M,S) ";A$,A2,A3
-30 GOSUB 72: T=A*15*R1
-32 T5=T-R+L: REM LHA
-34 S1=SIN(B)*SIN(D)
-36 S1=S1+COS(B)*COS(D)*COS(T5)
-38 C1=1-S1*S1
-40 IF C1>0 THEN C1=SQR(C1)
-42 IF C1<=0 THEN 46
-44 H=ATN(S1/C1): GOTO 48
-46 H=SGN(S1)*P/2
-48 C2=COS(B)*SIN(D)
-50 C2=C2-SIN(B)*COS(D)*COS(T5)
-52 S2=-COS(D)*SIN(T5)
-54 IF C2=0 THEN A=SGN(S2)*P/2
-56 IF C2=0 THEN 62
-58 A=ATN(S2/C2)
-60 IF C2<0 THEN A=A+P
-62 IF A<0 THEN A=A+2*P
-64 PRINT
-66 PRINT "ALTITUDE: ";H/R1
-68 PRINT "AZIMUTH: ";A/R1
-70 END
-72 REM SEXAGESIMAL TO DECIMAL
-74 REM
-76 S=1: A1=ABS(VAL(A$))
-78 IF LEFT$(A$,1)="-" THEN S=-1
-80 A=S*(A1+A2/60+A3/3600)
-82 RETURN
-84 REM ------------------------
-86 REM APPEARED IN ASTRONOMICAL
-88 REM COMPUTING, SKY & TELE-
-90 REM SCOPE, JUNE, 1984
-92 REM ------------------------
-
diff --git a/bwbtest/B15B/altaz.run b/bwbtest/B15B/altaz.run
deleted file mode 100644
index 061eb64..0000000
--- a/bwbtest/B15B/altaz.run
+++ /dev/null
@@ -1,7 +0,0 @@
-R A (H,M,S) ? 5,45,32
-DEC (D,M,S) ? 180,55,22
-LAT, LONG ? 120,45
-GST (H,M,S) ? 8,21,32
-
-ALTITUDE: 2.19555
-AZIMUTH: 84.3393
diff --git a/bwbtest/B15B/altaz2.INP b/bwbtest/B15B/altaz2.INP
deleted file mode 100644
index 1a20282..0000000
--- a/bwbtest/B15B/altaz2.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-5,45,32
-180,55,22
-120,45
-8,21,32
diff --git a/bwbtest/B15B/altaz2.bas b/bwbtest/B15B/altaz2.bas
deleted file mode 100644
index 060a9b4..0000000
--- a/bwbtest/B15B/altaz2.bas
+++ /dev/null
@@ -1,55 +0,0 @@
-10 REM ALTITUDE AND AZIMUTH
-12 REM
-14 P=3.14159265: R1=P/180
-16 INPUT "R A (H,M,S) ";A$,A2,A3
-18 GOSUB 72: R=A*15*R1
-20 INPUT "DEC (D,M,S) ";A$,A2,A3
-22 GOSUB 72: D=A*R1
-24 INPUT "LAT, LONG ";B,L
-26 B=B*R1: L=L*R1
-28 INPUT "GST (H,M,S) ";A$,A2,A3
-30 GOSUB 72: T=A*15*R1
-32 T5=T-R+L: REM LHA
-34 S1=SIN(B)*SIN(D)
-36 S1=S1+COS(B)*COS(D)*COS(T5)
-38 C1=1-S1*S1
-40 IF C1>0 THEN C1=SQR(C1)
-42 IF C1<=0 THEN 46
-44 H=ATN(S1/C1): GOTO 48
-46 H=SGN(S1)*P/2
-48 C2=COS(B)*SIN(D)
-50 C2=C2-SIN(B)*COS(D)*COS(T5)
-52 S2=-COS(D)*SIN(T5)
-54 IF C2=0 THEN A=SGN(S2)*P/2
-56 IF C2=0 THEN 62
-58 A=ATN(S2/C2)
-60 IF C2<0 THEN A=A+P
-62 IF A<0 THEN A=A+2*P
-64 PRINT
-65 GOSUB 200
-66 PRINT "ALTITUDE: ";H/R1
-68 PRINT "AZIMUTH: ";A/R1
-70 END
-72 REM SEXAGESIMAL TO DECIMAL
-74 REM
-76 S=1: A1=ABS(VAL(A$))
-78 IF LEFT$(A$,1)="-" THEN S=-1
-80 A=S*(A1+A2/60+A3/3600)
-82 RETURN
-200 REM TRUE ALT TO APP ALT
-210 REM
-220 H5=H/R1
-230 V5=(H5+10.3/(H5+5.11))*R1
-240 R5=1.02*COS(V5)/SIN(V5)
-250 H=H+R5*R1/60
-260 RETURN
-284 REM ------------------------
-286 REM APPEARED IN ASTRONOMICAL
-288 REM COMPUTING, SKY & TELE-
-290 REM SCOPE, JUNE, 1984,
-292 REM AND MODIFIED IN THE JULY,
-294 REM 1986, ISSUE TO CONVERT
-296 REM FROM TRUE TO APPARENT
-298 REM ALTITUDE
-300 REM ------------------------
-
diff --git a/bwbtest/B15B/altaz2.run b/bwbtest/B15B/altaz2.run
deleted file mode 100644
index 66bb2a5..0000000
--- a/bwbtest/B15B/altaz2.run
+++ /dev/null
@@ -1,7 +0,0 @@
-R A (H,M,S) ? 5,45,32
-DEC (D,M,S) ? 180,55,22
-LAT, LONG ? 120,45
-GST (H,M,S) ? 8,21,32
-
-ALTITUDE: 2.46535
-AZIMUTH: 84.3393
diff --git a/bwbtest/B15B/angsep.INP b/bwbtest/B15B/angsep.INP
deleted file mode 100644
index d69ce58..0000000
--- a/bwbtest/B15B/angsep.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-5,45,32
-180,55,44
-7,21,34
-45,23,45
diff --git a/bwbtest/B15B/angsep.bas b/bwbtest/B15B/angsep.bas
deleted file mode 100644
index 495c351..0000000
--- a/bwbtest/B15B/angsep.bas
+++ /dev/null
@@ -1,37 +0,0 @@
-10 REM ANGULAR SEPARATION
-12 REM
-14 P=3.14159265: C=P/180
-16 PRINT "FIRST STAR --"
-18 INPUT "R A (H,M,S) ";A$,A2,A3
-20 GOSUB 60 : R1=A*15*C
-22 INPUT "DEC (D,M,S) ";A$,A2,A3
-24 GOSUB 60 : D1=A*C
-26 PRINT
-28 PRINT "SECOND STAR --"
-30 INPUT "R A (H,M,S) ";A$,A2,A3
-32 GOSUB 60 : R2=A*15*C
-34 INPUT "DEC (D,M,S) ";A$,A2,A3
-36 GOSUB 60 : D2=A*C
-38 REM
-40 D=SIN((D1-D2)/2): H1=D*D
-42 A=SIN((R1-R2)/2): H2=A*A
-44 H3=H1+COS(D1)*COS(D2)*H2
-46 S1=SQR(H3): C1=SQR(1-S1*S1)
-48 S=2*ATN(S1/C1)/C
-50 PRINT
-52 PRINT "SEPARATION --"
-54 PRINT "IN DEGREES: ";S
-56 PRINT "IN ARC SEC: ";S*3600
-58 END
-60 REM SEXAGESIMAL TO DECIMAL
-62 REM
-64 F=1: A1=ABS(VAL(A$))
-66 IF LEFT$(A$,1)="-" THEN F=-1
-68 A=F*(A1+A2/60+A3/3600)
-70 RETURN
-80 REM ------------------------
-85 REM APPEARED IN ASTRONOMICAL
-90 REM COMPUTING, SKY & TELE-
-95 REM SCOPE, AUGUST, 1984
-99 REM ------------------------
-
diff --git a/bwbtest/B15B/angsep.run b/bwbtest/B15B/angsep.run
deleted file mode 100644
index e13445f..0000000
--- a/bwbtest/B15B/angsep.run
+++ /dev/null
@@ -1,11 +0,0 @@
-FIRST STAR --
-R A (H,M,S) ? 5,45,32
-DEC (D,M,S) ? 180,55,44
-
-SECOND STAR --
-R A (H,M,S) ? 7,21,34
-DEC (D,M,S) ? 45,23,45
-
-SEPARATION --
-IN DEGREES: 130.762
-IN ARC SEC: 470742.
diff --git a/bwbtest/B15B/asteroid.INP b/bwbtest/B15B/asteroid.INP
deleted file mode 100644
index f3ccbcd..0000000
--- a/bwbtest/B15B/asteroid.INP
+++ /dev/null
@@ -1,6 +0,0 @@
-1.1
-2.2
-3.3
-1.23
-C
-0.14
diff --git a/bwbtest/B15B/asteroid.bas b/bwbtest/B15B/asteroid.bas
deleted file mode 100644
index 04f0cdf..0000000
--- a/bwbtest/B15B/asteroid.bas
+++ /dev/null
@@ -1,37 +0,0 @@
-10 ' The Size of an Asteroid
-20 '
-30 RD=180/3.14159: ' Radians to degrees
-40 INPUT "Apparent visual magnitude, V";V
-50 INPUT "Distance from Sun (au) ";R0
-60 INPUT "Distance from Earth (au) ";D0
-70 INPUT "Earth-Sun distance (au) ";R
-80 PRINT "Asteroid type --"
-90 INPUT " C, S, or O(ther)";T$
-100 IF T$="c" OR T$="C" THEN P=.037
-110 IF T$="s" OR T$="S" THEN P=.14
-120 IF T$="o" OR T$="O" THEN INPUT "What is the albedo";P
-130 IF P>1 OR P<=0 THEN 120
-140 PRINT "Now enter the photometric slope"
-142 PRINT "parameter (G), or if unknown"
-143 INPUT "enter 0.15. Value of G ";G
-150 PRINT
-160 CI=(R0^2+D0^2-R^2)/(2*R0*D0)
-170 F=ATN(SQR(1-CI*CI)/CI)
-180 IF CI<0 THEN F=F+3.14159
-190 ' F = solar phase angle in radians
-200 PRINT USING "Solar phase angle, phi: ###.#";F*RD
-210 P1=EXP(-3.33*(TAN(F/2))^.63)
-220 P2=EXP(-1.87*(TAN(F/2))^1.22)
-230 H=V-5*LOG(D0*R0)/LOG(10)+2.5*LOG((1-G)*P1+G*P2)/LOG(10)
-240 PRINT USING "Absolute mag (H): ###.#";H
-250 LD=3.12-.2*H-.5*LOG(P)/LOG(10)
-260 D=10^LD
-270 PRINT USING "Diameter (km): ####.#";D
-280 END
-290 '
-300 ' Basil Rowe's program calculates the size of an asteroid from
-310 ' its apparent brightness and an assumption about its reflectivity
-320 ' (albedo). The calculation is explained on page 83 of the
-330 ' June 1993 issue of Sky & Telescope. Carbonaceous asteroids
-340 ' have albedos of about 0.04, while S-type (stony) asteroids
-350 ' reflect about 0.14 of the light.
diff --git a/bwbtest/B15B/asteroid.run b/bwbtest/B15B/asteroid.run
deleted file mode 100644
index 5a8788d..0000000
--- a/bwbtest/B15B/asteroid.run
+++ /dev/null
@@ -1,13 +0,0 @@
-Apparent visual magnitude, V? 1.1
-Distance from Sun (au) ? 2.2
-Distance from Earth (au) ? 3.3
-Earth-Sun distance (au) ? 1.23
-Asteroid type --
- C, S, or O(ther)? C
-Now enter the photometric slope
-parameter (G), or if unknown
-enter 0.15. Value of G ? 0.14
-
-Solar phase angle, phi: 11.7
-Absolute mag (H): -3.9
-Diameter (km): 41837.6
diff --git a/bwbtest/B15B/binary.INP b/bwbtest/B15B/binary.INP
deleted file mode 100644
index 1eb46a6..0000000
--- a/bwbtest/B15B/binary.INP
+++ /dev/null
@@ -1,9 +0,0 @@
-7
-0.9
-5
-10
-1.2
-3.4
-5.6
-2000
-N
diff --git a/bwbtest/B15B/binary.bas b/bwbtest/B15B/binary.bas
deleted file mode 100644
index 95acb29..0000000
--- a/bwbtest/B15B/binary.bas
+++ /dev/null
@@ -1,47 +0,0 @@
-10 REM BINARY STAR ORBIT
-12 REM
-14 P1=4*ATN(1): R1=180/P1
-16 C=2*P1: A1=0.0000005
-18 REM
-20 INPUT "SEMIMAJOR AXIS";A
-22 INPUT "ECCENTRICITY ";E0
-24 IF INT(E0)=0 THEN 30
-26 PRINT "NOT VALID; REENTER"
-28 GOTO 22
-30 INPUT "EPOCH OF PERIASTRON";T
-32 INPUT "PERIOD IN YEARS ";P
-34 INPUT "INCLINATION ";I
-36 INPUT "ARG OF PERIASTRON ";W
-38 INPUT "P.A. OF ASC NODE ";L
-40 I=I/R1: W=W/R1: L=L/R1
-42 REM
-44 INPUT "DATE OF OBS (YR) ";D
-46 T1=D-T: M=C*T1/P
-48 E=M+E0*SIN(M)+E0*E0*SIN(2*M)/2
-50 N=E-E0*SIN(E): G=M-N
-52 F=G/(1-E0*COS(E)): E=E+F
-54 IF ABS(G)>A1 THEN 50
-56 U=(1+E0)/(1-E0): H=COS(E/2)
-58 IF H=0 THEN V=P1: GOTO 62
-60 V=2*ATN(SQR(U)*SIN(E/2)/H)
-62 K=V+W: Y=SIN(K)*COS(I)
-64 X=COS(K): Q=ATN(Y/X)
-66 IF X<0 THEN Q=Q+P1
-68 IF X<0 THEN 72
-70 IF Y<0 THEN Q=Q+C
-72 P2=Q+L: IF P2>C THEN P2=P2-C
-74 R=A-A*E0*COS(E)
-76 S=R*X/COS(Q)
-78 P3=INT(P2*R1*10+0.5)/10
-80 S3=INT(S*100+0.5)/100
-82 PRINT "P.A. ";P3;" DEG"
-84 PRINT "SEP. ";S3;" ARC SEC"
-86 PRINT
-88 INPUT "ANOTHER (Y OR N)";Q$
-90 IF Q$<>"N" THEN 44
-92 REM ========================
-94 REM FROM "ASTRONOMICAL
-96 REM COMPUTING," SKY & TELE-
-98 REM SCOPE, JULY, 1987
-100 REM ========================
-102 END
diff --git a/bwbtest/B15B/binary.run b/bwbtest/B15B/binary.run
deleted file mode 100644
index ddebd31..0000000
--- a/bwbtest/B15B/binary.run
+++ /dev/null
@@ -1,12 +0,0 @@
-SEMIMAJOR AXIS? 7
-ECCENTRICITY ? 0.9
-EPOCH OF PERIASTRON? 5
-PERIOD IN YEARS ? 10
-INCLINATION ? 1.2
-ARG OF PERIASTRON ? 3.4
-P.A. OF ASC NODE ? 5.6
-DATE OF OBS (YR) ? 2000
-P.A. 189 DEG
-SEP. 13.3 ARC SEC
-
-ANOTHER (Y OR N)? N
diff --git a/bwbtest/B15B/blkhole1.INP b/bwbtest/B15B/blkhole1.INP
deleted file mode 100644
index e69de29..0000000
diff --git a/bwbtest/B15B/blkhole1.bas b/bwbtest/B15B/blkhole1.bas
deleted file mode 100644
index d6587b5..0000000
--- a/bwbtest/B15B/blkhole1.bas
+++ /dev/null
@@ -1,22 +0,0 @@
-10 REM Compute Mass of Black Hole
-20 REM Print Data for M vs C vs P Plot
-30 REM C0 = orbital circumference, km
-40 REM P0 = orbital period, seconds
-50 REM G = gravitational constant
-60 G=1.327E11
-70 P=3.14159
-80 OPEN "OUTPUT.TXT" FOR OUTPUT AS #1
-90 FOR C0=1E5 TO 1E7 STEP 2E5
-100 PRINT#1, "C0 is: "; C0
-110 FOR P0=10 TO 1000 STEP 10
-120 M=C0*C0*C0/(2*P*G*P0*P0)
-130 PRINT#1, P0, M
-140 NEXT P0
-150 NEXT C0
-160 CLOSE#1
-170 REM ========================
-180 REM FROM "ASTRONOMICAL
-190 REM COMPUTING," SKY & TELE-
-200 REM SCOPE, MAY 1996
-210 REM ========================
-220 END
diff --git a/bwbtest/B15B/blkhole1.run b/bwbtest/B15B/blkhole1.run
deleted file mode 100644
index e69de29..0000000
diff --git a/bwbtest/B15B/blkhole2.INP b/bwbtest/B15B/blkhole2.INP
deleted file mode 100644
index e69de29..0000000
diff --git a/bwbtest/B15B/blkhole2.bas b/bwbtest/B15B/blkhole2.bas
deleted file mode 100644
index eea8729..0000000
--- a/bwbtest/B15B/blkhole2.bas
+++ /dev/null
@@ -1,22 +0,0 @@
-10 REM Compute Black-Hole Tidal Force Upon Body
-20 REM G = Grav. constant
-30 REM M = Mass, solar masses
-40 REM L = separation, km
-50 REM C = circumference, km
-60 REM A = difference in acceleration, km/sec**2
-70 C=100000
-80 G=1.327E11
-90 P=3.14159
-100 M=303
-110 FOR L=.002 TO .004 STEP .001
-120 A=16*P*P*P*G*M*L/(C*C*C)
-130 REM Convert to meters and g units
-140 L1=L*1000: A=(A*1000)/9.81
-150 PRINT USING "Length: ###.# meters, Tidal Force: ###.# g";L1;A
-160 NEXT L
-170 REM ========================
-180 REM FROM "ASTRONOMICAL
-190 REM COMPUTING," SKY & TELE-
-200 REM SCOPE, MAY 1996
-210 REM ========================
-220 END
diff --git a/bwbtest/B15B/blkhole2.run b/bwbtest/B15B/blkhole2.run
deleted file mode 100644
index b4560d2..0000000
--- a/bwbtest/B15B/blkhole2.run
+++ /dev/null
@@ -1,3 +0,0 @@
-Length: 2.0 meters, Tidal Force: 4.1 g
-Length: 3.0 meters, Tidal Force: 6.1 g
-Length: 4.0 meters, Tidal Force: 8.1 g
diff --git a/bwbtest/B15B/blkhole3.INP b/bwbtest/B15B/blkhole3.INP
deleted file mode 100644
index e69de29..0000000
diff --git a/bwbtest/B15B/blkhole3.bas b/bwbtest/B15B/blkhole3.bas
deleted file mode 100644
index b4e9327..0000000
--- a/bwbtest/B15B/blkhole3.bas
+++ /dev/null
@@ -1,27 +0,0 @@
-10 REM Compute Black-Hole Accelergram
-20 P = 3.14159
-30 A$="##.### ##.### ##.### ##.###"
-40 OPEN "OUTPUT.TXT" FOR OUTPUT AS #1
-50 FOR I=0 TO 1000
-60 REM Generate random circumference
-70 C=2!*P*RND
-80 REM Generate random angle
-90 T=2!*P*RND: R=C/(2!*P)
-100 X1=R*COS(T): Y1=R*SIN(T)
-110 REM Determine vector length
-120 R=R-.001/(C*C*C)
-130 IF R<0 THEN R=0
-140 X2=R*COS(T): Y2=R*SIN(T)
-150 D=SQR((X2-X1)*(X2-X1)+(Y2-Y1)*(Y2-Y1))
-160 REM Don't plot vectors too small to see
-170 REM Print end-points for plot package
-180 IF D<.001 THEN GOTO 200
-190 PRINT#1, USING A$;X1;Y1;X2;Y2
-200 NEXT I
-210 CLOSE#1
-220 REM ========================
-230 REM FROM "ASTRONOMICAL
-240 REM COMPUTING," SKY & TELE-
-250 REM SCOPE, MAY 1996
-260 REM ========================
-270 END
diff --git a/bwbtest/B15B/blkhole3.run b/bwbtest/B15B/blkhole3.run
deleted file mode 100644
index e69de29..0000000
diff --git a/bwbtest/B15B/broken/00readme.txt b/bwbtest/B15B/broken/00readme.txt
deleted file mode 100644
index 8a33069..0000000
--- a/bwbtest/B15B/broken/00readme.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-These programs:
-1) use commands that are not supported by bwBASIC at this time, and/or
-2) are not easy to test using the current automated method, and/or
-3) there are no plans to support graphics at this time.
-
-EOF
diff --git a/bwbtest/B15B/broken/ageuniv.bas b/bwbtest/B15B/broken/ageuniv.bas
deleted file mode 100644
index e4d18b6..0000000
--- a/bwbtest/B15B/broken/ageuniv.bas
+++ /dev/null
@@ -1,64 +0,0 @@
-10 ' AGE OF THE UNIVERSE
-20 '
-30 DEFDBL A-H,J-Z: DEFINT I: SCREEN 9: KEY OFF
-40 LOCATE 15,1: PRINT "Hubble constant [ 25 to 150 (km/s)/Mpc ] ";
-50 INPUT H0: IF H0<25# OR H0>150# THEN CLS: GOTO 40
-60 HT=(3.085678D+19)/(H0*31557600#)
-70 LOCATE 17,1: PRINT "Omega zero [ 0 to 5 ]";
-80 PRINT SPC(40);: LOCATE 17,23
-90 INPUT OZ: PRINT: IF OZ<0# OR OZ>5# THEN GOTO 70
-100 IF OZ=0# THEN OS=1#: GOTO 180
-110 IF OZ=1# THEN OS=1.5#*SQR(3#): GOTO 180
-120 IF OZ<=.5# THEN GM=(1#-OZ+SQR(1#-2#*OZ))/OZ
-130 IF OZ<=.5# THEN X=.5#*(GM^(1#/3#)+GM^(-1#/3#))
-140 IF OZ>.5# THEN AL=ATN(SQR(2#*OZ-1#)/(1#-OZ))
-150 IF AL<0# THEN AL=AL+4#*ATN(1#)
-160 IF OZ>.5# THEN X=COS(AL/3#)
-170 OS=4#*OZ*X*X*X
-180 PRINT USING "Omega lambda < #.########## gives Big Bang"; OS
-190 PRINT USING "Omega lambda > #.########## gives no Big Bang"; OS
-200 LOCATE 22,1: PRINT "Omega lambda [ -10 to 10 ]";
-210 PRINT SPC(40);: LOCATE 22,28: INPUT OL
-220 IF OL<-10# OR OL>10# THEN GOTO 200
-230 CLS: LOCATE 22,17
-240 PRINT " Hubble constant Omega zero Omega lambda"
-250 LOCATE 23,17: PRINT USING " ### (km/s)/Mpc ";H0;
-260 PRINT USING " ##.#### ###.##########";OZ;OL;
-270 LINE (0,5)-(639,260),7,B: TL=-5#: TR=5#
-280 LOCATE 1,29: COLOR 15: PRINT " Scale Factor vs. Time "
-290 FOR I=1 TO 4: TN=0#: RN=1#: DN=1#
-300 COLOR 12: IF I=4 THEN COLOR 9
-310 HN=.0025#: IF I=1 OR I=3 THEN HN=-HN
-320 T=TN: R=RN: D=DN: DP=DN: TP=TN
-330 F=OL*R-OZ/(2#*R*R): K1=HN*F: L1=HN*D
-340 T=TN+HN/2#: R=RN+L1/2#: D=DN+K1/2#
-350 F=OL*R-OZ/(2#*R*R): K2=HN*F: L2=HN*D
-360 T=TN+HN/2#: R=RN+L2/2#: D=DN+K2/2#
-370 F=OL*R-OZ/(2#*R*R): K3=HN*F: L3=HN*D
-380 T=TN+HN: R=RN+L3: D=DN+K3
-390 F=OL*R-OZ/(2#*R*R): K4=HN*F: L4=HN*D
-400 TN=TN+HN: RP=RN: DP=DN
-410 RN=RN+(L1+2#*L2+2#*L3+L4)/6#
-420 DN=DN+(K1+2#*K2+2#*K3+K4)/6#
-430 IF RN<0# OR RN>3# OR TNTR THEN GOTO 460
-440 IF I>2 THEN PSET (640*(TN-TL)/(TR-TL),260-RN*85)
-450 GOTO 320
-460 IF I=1 THEN TL=TN
-470 IF I=2 THEN TR=TN*1.1#
-480 IF I=2 THEN XP=640/(1-TR/TL): CIRCLE (XP,175),3,14
-490 IF I=2 THEN LINE (XP,260)-(XP,250),15
-500 IF I=3 THEN LOCATE 19,XP/16: COLOR 12: PRINT "PAST";
-510 IF I=3 AND RN<0# THEN LOCATE 20,1: COLOR 7: PRINT "0";
-520 A=XP/8-2: IF ABS(A-32)>30 THEN A=32+30*SGN(A-32)
-530 T=TN-HN-RP/DP: IF OZ>0# THEN T=T+RP/(3#*DP)
-540 LOCATE 20,A: COLOR 14: AG=ABS(T*HT/10 ^ 9)
-550 IF I=3 AND RN<0# THEN PRINT USING "###.# billion years"; AG;
-560 IF I=4 THEN LOCATE 19,37+XP/16: COLOR 9: PRINT "FUTURE";
-570 NEXT I
-580 LOCATE 22,1: END
-900 REM *********************************************
-910 REM THIS PROGRAM COMPUTES THE AGE OF THE UNIVERSE
-920 REM FOR DIFFERENT VALUES OF THE HUBBLE PARAMETER,
-930 REM DENSITY PARAMETER, AND COSMOLOGICAL CONSTANT.
-940 REM FROM SKY & TELESCOPE, JANUARY 1996, PAGE 92.
-950 REM *********************************************
diff --git a/bwbtest/B15B/broken/clock.bas b/bwbtest/B15B/broken/clock.bas
deleted file mode 100644
index ab3bc27..0000000
--- a/bwbtest/B15B/broken/clock.bas
+++ /dev/null
@@ -1,20 +0,0 @@
-200 REM BEFORE RUNNING THESE LINES, READ THE CLOCK AND OBTAIN THE
-210 REM UT DATE AND TIME IN THE FORM Y,M,D,H1,M1,S1
-220 REM
-230 D=D+H1/24+M1/1440+S1/86400
-250 G=1: GOSUB 820: V=(J+F)/29.53058868: C=V-INT(V)
-260 IF C<0.02 THEN 340
-270 IF C<0.11 THEN PRINT "LAST QUARTER MOON": GOTO 350
-280 IF C<0.27 THEN PRINT "MOON IS A MORNING CRESCENT": GOTO 350
-290 IF C<0.35 THEN PRINT "NEW MOON": GOTO 350
-300 IF C<0.51 THEN PRINT "MOON IS AN EVENING CRESCENT": GOTO 350
-310 IF C<0.61 THEN PRINT "FIRST QUARTER MOON": GOTO 350
-320 IF C<0.77 THEN PRINT "MOON IS WAXING GIBBOUS": GOTO 350
-330 IF C<0.85 THEN PRINT "FULL MOON": GOTO 350
-340 PRINT "MOON IS WANING GIBBOUS"
-350 END
-867 RETURN
-900 REM *************************************************************
-901 REM FROM SKY & TELESCOPE, MAY, 1987, PAGE 536-537. FOR APPLE
-902 REM COMPUTERS ONLY. MERGE WITH CALJD.BAS (MAY, 1984, PAGE 455).
-903 REM *************************************************************
diff --git a/bwbtest/B15B/broken/galisa.bas b/bwbtest/B15B/broken/galisa.bas
deleted file mode 100644
index d564306..0000000
--- a/bwbtest/B15B/broken/galisa.bas
+++ /dev/null
@@ -1,98 +0,0 @@
-10 REM GALISAT
-15 REM
-20 TEXT: HOME: PRINT
-25 PRINT "WHICH IS TOWARD LEFT:"
-30 INPUT "EAST OR WEST? ";A$
-35 IF LEFT$(A$,1)="W" THEN 50
-40 IF LEFT$(A$,1)="E" THEN 60
-45 GOTO 30
-50 L=1: L$="WEST": R$="EAST"
-55 GOTO 65
-60 L=-1: L$="EAST": R$="WEST"
-65 GOSUB 800
-70 N=J-2415020+F
-75 PI=3.14159265: P=PI/180
-80 VTAB 21: INVERSE: PRINT L$;
-85 HTAB 37: PRINT R$: NORMAL
-90 VTAB 21:HTAB 7:PRINT "YEAR ";Y;
-95 HTAB 19: PRINT "MONTH ";M;
-100 HTAB 30: PRINT "DAY "
-105 V=0: HGR : HCOLOR=3
-110 GOSUB 295
-115 DL=INT((N-INT(N))*20+0.5)/20
-120 IF DL=0.5 THEN GOSUB 335
-125 MT=(358.476+0.9856003*N)*P
-130 MJ=(225.328+0.0830853*N)*P
-135 JJ=221.647+0.9025179*N
-140 VT=1.92*SIN(MT)+0.02*SIN(2*MT)
-145 VJ=5.55*SIN(MJ)+0.17*SIN(2*MJ)
-150 K=(JJ+VT-VJ)*P
-155 DT=SQR(28.07-10.406*COS(K))
-160 Z=SIN(K)/DT
-165 I=ATN(Z/SQR(1-Z*Z))
-170 I=I/P
-175 F=(N-DT/173)
-180 F1=I-VJ
-185 U1=84.5506+203.405863*F+F1
-190 U2=41.5015+101.2916323*F+F1
-195 U3=109.9770+50.2345169*F+F1
-200 U4=176.3586+21.4879802*F+F1
-205 X1=5.906*SIN(U1*P+PI)
-210 X=X1: GOSUB 315
-215 X2=9.397*SIN(U2*P+PI)
-220 X=X2: GOSUB 315
-225 X3=14.989*SIN(U3*P+PI)
-230 X=X3: GOSUB 315
-235 X4=26.364*SIN(U4*P+PI)
-240 X=X4: GOSUB 315
-245 V=V+1: N=N+0.05
-250 IF V>=155 THEN 265
-255 IF D>=33 THEN 275
-260 GOTO 115
-265 INPUT "CONTINUE (Y OR N)?";A$
-270 IF A$<>"N" THEN 105
-275 INPUT "ANOTHER MONTH? ";A$
-280 IF A$<>"N" THEN 20
-285 TEXT: HOME
-290 END
-291 REM
-295 REM JUPITER DISPLAY
-300 HPLOT 136,0 TO 136,155
-305 HPLOT 142,0 TO 142,155
-310 RETURN
-315 REM SATELLITE DISPLAY
-320 X=139+L*INT(X*3.5+0.5)
-325 HPLOT X,V
-330 RETURN
-335 REM CHANGE OF DATE
-340 VTAB 21: HTAB 34: PRINT D
-345 HPLOT 5,V TO 25,V
-350 HPLOT 255,V TO 275,V
-355 D=D+1
-360 RETURN
-365 REM
-800 REM CALENDAR --> JD
-805 REM
-810 INPUT "Y,M,D? ";Y,M,D
-811 D=INT(D)
-815 G=1: IF Y<=1582 THEN G=0
-820 D1=INT(D): F=D-D1-0.5
-825 J=-INT(7*(INT((M+9)/12)+Y)/4)
-830 IF G=0 THEN 850
-835 S=SGN(M-9): A=ABS(M-9)
-840 J1=INT(Y+S*INT(A/7))
-845 J1=-INT((INT(J1/100)+1)*3/4)
-850 J=J+INT(275*M/9)+D1+G*J1
-855 J=J+1721027+2*G+367*Y
-860 IF F>=0 THEN 870
-865 F=F+1: J=J-1
-870 RETURN
-900 REM **********************
-910 REM THIS PROGRAM COMPUTES
-920 REM POSITIONS OF THE FOUR
-930 REM BRIGHT MOONS OF JUPITER
-940 REM ON APPLE II COMPUTERS.
-950 REM IT IS DESCRIBED IN SKY
-960 REM & TELESCOPE MAGAZINE,
-970 REM JUNE, 1989, PAGE 650.
-980 REM **********************
diff --git a/bwbtest/B15B/broken/glob2.bas b/bwbtest/B15B/broken/glob2.bas
deleted file mode 100644
index 99579fc..0000000
--- a/bwbtest/B15B/broken/glob2.bas
+++ /dev/null
@@ -1,53 +0,0 @@
-13 DIM X(30),Y(30),Z(30)
-15 J=0
-23 J=J+1
-45 X(J)=X
-51 Y(J)=Y
-57 Z(J)=Z
-64 GOTO 100
-100 PRINT: PRINT: PRINT
-110 FOR I=1 TO J
-120 IF S=1 THEN Y(I)=Z(I)
-130 IF S=3 THEN X(I)=-Y(I): Y(I)=Z(I)
-140 NEXT
-150 HGR: C=0.00105: X=100: Y=70
-160 IF S=3 THEN X=130
-170 GOSUB 370: DX=0: DY=0: GOTO 240
-180 DX=0: DY=0: GET C$
-190 IF C$="L" THEN DX=-1
-200 IF C$="U" THEN DY=-1
-210 IF C$="D" THEN DY=+1
-220 IF C$="R" THEN DX=+1
-230 IF DX=0 AND DY=0 THEN 180
-240 FOR I=1 TO J: GOSUB 290: NEXT: GOSUB 480
-250 X=X+DX: Y=Y+DY: HCOLOR=3: GOSUB 500: IF S=3 THEN 180
-260 D=SQR((XC-X)*(XC-X)+(YC-Y)*(YC-Y))/C: VTAB 22: HTAB 1
-270 PRINT "DISTANCE TO CENTER: ";INT(D);" L.Y. ": GOTO 180
-280 REM
-290 X0=X(I)*C+X: Y0=-Y(I)*C+Y
-300 IF X0<0 OR X0>279 OR Y0<0 OR Y0>160 THEN 320
-310 HCOLOR=0: HPLOT X0,Y0
-320 X0=X0+DX: YO=Y0+DY
-330 IF X0<0 OR X0>279 OR Y0<0 OR Y0>160 THEN 350
-340 HCOLOR=3: HPLOT X0,Y0
-350 RETURN
-360 REM
-370 HCOLOR=3: REM MILKY WAY
-380 RM=5*5: XC=140: YC=80: XR=50: YR=0.03*XR
-390 IF S=2 THEN YR=XR
-400 HPLOT XR+XC,YC
-410 FOR T=0 TO 6.3 STEP 0.1
-420 X1=XR*COS(T): Y1=YR*SIN(T)
-430 IF X1*X1+Y1*Y11 THEN 210
-205 X1=.6: X2=.6: E=.1
-210 IF Q<>2 THEN 220
-215 X1=.8: X2=.4: E=.05
-220 IF Q<>3 THEN 230
-225 X1=.8: X2=.4: E=.02
-230 IF Q<>4 THEN 240
-235 X1=.8: X2=.4: E=0
-240 IF X1=0 THEN 90
-250 GOSUB 1500
-260 PRINT "LIMB-DARKENING COEFFS:"
-265 PRINT " FOR LARGER STAR ";X1
-270 PRINT " FOR SECONDARY ";X2
-280 PRINT
-290 PRINT "OBLATENESS COEFF: ";E
-300 PRINT
-320 INPUT "CHANGES (Y OR N) ";A$
-330 IF A$<>"Y" THEN 460
-340 PRINT "ENTER NEW LIMB-DARKEN-"
-341 PRINT "ING COEFFICIENTS:"
-350 INPUT " FOR LARGER STAR ";X1
-360 INPUT " FOR SECONDARY ";X2
-410 PRINT: PRINT
-430 INPUT "OBLATENESS COEFF ";E
-450 REM
-460 REM GET CHARACTERISTICS
-480 GOSUB 1500
-490 INPUT "ORBITAL RADIUS ";R
-500 INPUT "INCLINATION ";I
-520 INPUT "PRIMARY'S RADIUS ";R1
-530 INPUT " LUMINOSITY ";L1
-540 INPUT "SECONDARY RADIUS ";R2
-560 INPUT " LUMINOSITY ";L2
-570 P=100
-580 REM : REM HGR: HCOLOR=3
-582 GOSUB 1500: LOCATE 21 : REM GOSUB 1500: VTAB 21
-590 REM
-600 REM PLOT AXES
-620 LINE (35,159)-(235,159) : REM HPLOT 35,159 TO 235,159
-630 FOR J=0 TO 10
-640 PSET (20*J+35,158) : REM HPLOT (20*J)+35,158
-650 NEXT J
-660 LINE (35,159)-(35,9) : REM HPLOT 35,159 TO 35,9
-670 FOR K=0 TO 10
-680 PSET (36,159-15*K) : REM HPLOT 36,159-(15*K)
-690 NEXT K
-700 PI=3.14159: RD=180/PI: DR=1/RD
-710 REM
-720 REM COMPUTE STAR POSITION
-740 FOR V=1.8 TO 360 STEP 1.8
-750 D=R*SIN(V*DR)
-760 IF V>=180 THEN D=ABS(D)
-770 REM
-780 REM COMPUTE LUMINOSITIES FOR
-781 REM TOTAL & ANNULAR ECLIPSES
-800 IF I<90 THEN GOSUB 1250
-810 GOSUB 1320
-820 IF D>=(R1-R2) THEN 850
-830 IF V>90 AND V<270 THEN B=L1-L2
-835 IF V>90 AND V<270 THEN 850
-840 K5=L1*(PI*R1^2-PI*R2^2)
-845 B=L2+C1*K5/(PI*R1^2)
-850 IF D>=(R1+R2) THEN B=L1+L2
-860 IF D<(R1+R2) THEN GOSUB 970
-870 PV=(V/1.8)+35
-880 GOSUB 1380: GOSUB 1430
-900 B0=139
-905 B=B0-((B*OL)-DL)*P
-910 B=INT(B+.5)
-920 IF V<>1.8 THEN 930
-925 PSET (PV,B): GOTO 940 : REM HPLOT PV,B: GOTO 940
-930 LINE -(PV,B) : REM HPLOT TO PV,B
-940 NEXT V
-950 GOTO 1530
-960 REM
-970 REM COMPUTE OBSCUR'N ANGLES
-980 K0=(R2^2)/(2*D*R1)
-990 C5=K0*((D/R2)^2+(R1/R2)^2-1)
-1000 D1=R1*C5: D2=D-D1
-1020 H=SQR(R1*R1-D1*D1): S5=H/R1
-1050 A1=ABS(ATN(S5/C5))*RD
-1060 C6=D2/R2: S6=H/R2
-1090 A2=ABS(ATN(S6/C6))*RD
-1100 REM
-1110 REM COMPUTE SECTOR AREAS &
-1120 REM PARTIAL ECLIPSES
-1130 T1=(H*D1)/2: T2=(H*D2)/2
-1150 S2=PI*R2^2*2*A2/360
-1160 S1=PI*R1^2*2*A1/360
-1170 OB=(S1-T1)+(S2-T2)
-1180 IF V>90 AND V<270 THEN 1205
-1190 K1=L1*C1*(PI*R1^2-OB)
-1195 B=L2+K1/(PI*R1^2)
-1200 GOTO 1230
-1205 K2=L2*C2*(PI*R2^2-OB)
-1210 B=L1+K2/(PI*R2^2)
-1220 IF V=360 THEN 1530
-1230 RETURN
-1240 REM
-1250 REM CORRECT FOR INCLINATION
-1260 K3=SIN((90-I)*DR)
-1270 OP=R*SIN((V-90)*DR)*K3
-1280 S=SQR(OP^2+D^2): D=S
-1300 RETURN
-1310 REM
-1320 REM CORRECT FOR L-DARKENING
-1340 C1=1-X1+X1*ABS(COS(V*DR))
-1350 C2=1-X2+X2*ABS(COS(V*DR))
-1360 RETURN
-1370 REM
-1380 REM CORRECT FOR OBLATENESS
-1390 K4=(SIN(I*DR))^2*(COS(V*DR))^2
-1400 OL=1-E*K4
-1410 RETURN
-1420 REM
-1430 REM CORRECT FOR REFLECTION
-1440 REM AND RERADIATION
-1450 SH=.4*L1*R2^2: SC=.4*L2*R1^2
-1460 SI=SIN(I*DR): CV=ABS(COS(V*DR))
-1470 DL=.5*(SC+SH)+(SC-SH)*SI*CV
-1471 DL=DL+.5*(SC+SH)*SI^2*CV^2
-1475 DL=DL/3
-1480 RETURN
-1490 REM
-1500 REM BLANK THE SCREEN
-1510 CLS: RETURN : REM HOME: RETURN
-1530 END
-1540 REM ************************************
-1550 REM APPEARED IN ASTRONOMICAL COMPUTING
-1560 REM SKY & TELESCOPE - OCTOBER 1989 ISSUE
-1570 REM ************************************
diff --git a/bwbtest/B15B/broken/hartley.bas b/bwbtest/B15B/broken/hartley.bas
deleted file mode 100644
index 3f7c826..0000000
--- a/bwbtest/B15B/broken/hartley.bas
+++ /dev/null
@@ -1,93 +0,0 @@
-10 REM GLOBE-DRAWING PROGRAM
-15 REM
-20 FF=1: REM FLATTENING FACTOR
-40 RM=80: REM RADIUS OF GLOBE
-50 INPUT "TILT ANGLE ";T
-60 DR=3.14159/180: TI=T*DR
-80 XC=250: YC=150: REM SCR CENTER
-90 CT=COS(TI): ST=SIN(TI)
-95 REM
-100 REM DRAW LATITUDE LINES
-110 FOR LA=-75 TO 75 STEP 15
-120 IF T>0 THEN 150
-130 IF 90+TLA THEN 270
-160 L=LA*DR:SL=SIN(L):R=RM*COS(L)
-170 GOSUB 570
-190 FOR P1=PS+5 TO -PS STEP 5
-200 P=P1*DR: X=R*SIN(P)+XC
-210 Y1=RM*SL: Z1=R*COS(P)
-220 Z=Z1*CT+Y1*ST
-225 Y=-Z1*ST+Y1*CT+YC
-230 IF Z<0 THEN 250
-240 LINE (XS,YS*FF)-(X,Y*FF)
-250 XS=X: YS=Y
-260 NEXT P1
-270 NEXT LA
-280 REM DRAW LONGITUDE LINES
-290 FOR L=-180 TO 165 STEP 15
-300 LO=L*DR
-310 IF TI<0 THEN 340
-320 TH=90*DR: DT=-5*DR: GOTO 350
-340 TH=-90*DR: DT=5*DR
-350 GOSUB 750
-360 Z=1: TH=TH+DT
-380 CH=COS(TH): X=RM*SIN(LO)*CH+XC
-390 Y1=RM*SIN(TH):Z1=RM*COS(LO)*CH
-400 Z=Y1*ST+Z1*CT:Y=Y1*CT-Z1*ST+YC
-410 IF Z<0 THEN 430
-420 LINE (XS,YS*FF)-(X,Y*FF)
-430 XS=X: YS=Y: TH=TH+DT
-440 IF Z>=0 THEN 380
-450 NEXT L
-460 REM DRAW LIMB OF GLOBE
-470 XS=RM+XC: YS=YC
-480 FOR I=0 TO 360 STEP 10
-490 IA=I*DR: X=RM*COS(IA)+XC
-500 Y=RM*SIN(IA)+YC
-510 LINE (XS,YS*FF)-(X,Y*FF)
-520 XS=X: YS=Y
-530 NEXT I
-540 INPUT A$
-550 END
-560 REM STARTING LATITUDE LINE
-570 CP=-ST*SIN(L)/(CT*COS(L))
-580 IF CP>=1 OR CP<=-1 THEN 640
-590 IF CP*CP>.001 THEN 620
-600 P=-90*DR: GOTO 650
-620 TP=SQR(1-CP*CP)/CP: P=ATN(TP)
-630 GOTO 650
-640 P=0
-650 IF P<=0 THEN 680
-660 P=-P: GOTO 690
-680 P=-180*DR-P
-690 X=R*SIN(P)+XC
-700 Y1=RM*SIN(L): Z1=R*COS(P)
-710 Y=-Z1*SIN(TI)+Y1*COS(TI)+YC
-720 XS=X: YS=Y: PS=P/DR
-730 RETURN
-740 REM STARTING LONGITUDE LINE
-750 X=RM*SIN(LO)*COS(TH)+XC
-760 Y1=RM*SIN(TH)
-770 Z1=RM*COS(LO)*COS(TH)
-780 Y=-Z1*ST+Y1*CT+YC: XS=X: YS=Y
-790 RETURN
-800 REM This program is used
-810 REM to draw an outline of a
-811 REM planet's disk with latitude
-812 REM and longitude lines as an
-813 REM aid to sketching in features
-814 REM at the telescope and identi-
-815 REM fying them on a published map.
-816 REM How it works is discussed by
-817 REM Charles Hartley in the Jan-
-818 REM uary, 1990, issue of Sky &
-819 REM Telescope magazine. Intended
-820 REM for Macintosh, but works on
-821 REM IBM PC's with very little
-822 REM modification. For example,
-823 REM add line 95 SCREEN 9 if you
-824 REM have VGA graphics, and try
-825 REM setting FF=0.7 in line 20 to
-826 REM get a disk that looks right.
diff --git a/bwbtest/B15B/broken/heliac.bas b/bwbtest/B15B/broken/heliac.bas
deleted file mode 100644
index 70038de..0000000
--- a/bwbtest/B15B/broken/heliac.bas
+++ /dev/null
@@ -1,82 +0,0 @@
-10 REM HELIACAL RISE AND SET
-11 P1=3.14159265 : R=P1/180
-12 P2=P1/2 : P3=1.5*P1 : P4=2*P1
-13 A8=LOG(10) : R1=.017202
-14 INPUT "EXTINCTION";K
-15 INPUT "LIMITING MAG";M0
-16 INPUT "STAR MAG.";M
-17 INPUT "STAR R.A. (HOURS)";A1
-18 INPUT " DEC. (DEG.) ";D1
-19 INPUT "OBS LATITUDE ";L
-20 A1=A1*15*R : D1=D1*R : L=L*R
-21 S1=SIN(D1) : C1=COS(D1)
-22 S7=SIN(L) : C7=COS(L)
-23 INPUT "RISE OR SET";R$
-24 R$=LEFT$(R$,1)
-25 IF R$="R" THEN F=1
-26 IF R$="S" THEN F=-1
-27 V1=-S7*S1/(C7*C1)
-28 IF V1=0 THEN H1=P1/2
-29 IF V1=0 THEN 32
-30 IF V1<-1 THEN V1=-1
-31 H1=ATN(SQR(1-V1*V1)/V1)
-32 IF V1<0 THEN H1=H1+P1
-33 H1=A1-F*H1
-34 X=-.2*(M0-7.93+K)
-35 B0=79.4*(10^X-1)^2-K*589
-36 D=80+A1*58.13-60*F
-37 D=D+F : G=D*R1-.062
-38 PRINT " TRIAL DAY: ";INT(D)
-39 L0=D*R1-1.406+.033*SIN(G)
-40 A0=ATN(.917*SIN(L0)/COS(L0))
-41 D0=.398*SIN(L0)
-42 D0=ATN(D0/SQR(1-D0*D0))
-43 IF L0P3 THEN 45
-44 A0=A0+P1
-45 IF L0>P3 THEN A0=A0+P4
-46 C0=-S7*SIN(D0)/(C7*COS(D0))
-47 H0=ATN(SQR(1-C0*C0)/C0)
-48 IF C0<0 THEN H0=H0+P1
-49 H0=A0-F*H0
-50 IF F*(H1-H0)>0 THEN 37
-51 N=-100 : T=H1-F/30
-52 T=T+F/30
-53 IF F*(T-H0)>0 THEN 37
-54 N0=N : REM LIMITING MAG.
-55 A9=S7*S1+C7*C1*COS(A1-T)
-56 IF A9<-1 THEN A9=-1
-57 IF A9=0 THEN Z1=P1/2
-58 IF A9=0 THEN 60
-59 Z1=ATN(SQR(1-A9*A9)/A9)
-60 A9=C7*COS(D0)*COS(T-A0)
-61 A9=A9+S7*SIN(D0)
-62 H5=ATN(A9/SQR(1-A9*A9))
-63 A9=C1*COS(D0)*COS(A0-A1)
-64 C2=A9+S1*SIN(D0)
-65 A9=C2-COS(Z1)*SIN(H5)
-66 A9=A9/(SIN(Z1)*COS(H5))
-67 IF A9<-1 THEN A9=-1
-68 T1=ATN(SQR(1-A9*A9)/A9)
-69 A5=.025*EXP(-11*COS(Z1))
-70 A5=1/(COS(Z1)+A5)
-71 L5=H5*(8.2*Z1+12)+2.86*Z1
-72 L5=4.75-T1*Z1/3+L5
-73 B=B0+(K/.2)*(10^L5)
-74 IF L5<2.07 THEN B=B0+K*589
-75 C5=4.466E-09 : K5=1.258E-06
-76 IF B<1649 THEN C5=1.58E-10
-77 IF B<1649 THEN K5=.0126
-78 N=C5*(1+SQR(K5*B))^2
-79 N=-16.57-K*A5-2.5*LOG(N)/A8
-80 IF N>N0 THEN 52
-81 IF N0=366 THEN D=D-365.25
-83 PRINT "DAY OF YEAR: ";INT(D)
-84 PRINT "STAR: ";INT(90.5-Z1/R)
-85 PRINT "SUN: ";INT(H5/R+.5)
-86 END
-87 REM ------------------------
-88 REM APPEARED IN ASTRONOMICAL
-89 REM COMPUTING, SKY & TELE-
-90 REM SCOPE, SEPTEMBER, 1985
-91 REM ------------------------
diff --git a/bwbtest/B15B/broken/jack.bas b/bwbtest/B15B/broken/jack.bas
deleted file mode 100644
index 4b92299..0000000
--- a/bwbtest/B15B/broken/jack.bas
+++ /dev/null
@@ -1,69 +0,0 @@
-10 ' Orbit of Jack
-11 '
-12 DEFDBL A-Z
-20 SR=5/7
-30 X0=320
-40 Y0=175
-50 CLS
-60 PI=3.14159
-70 INPUT "Days in A's year ";YA
-80 INPUT "Mass of A ";K
-90 INPUT "Jack's initial velocity ";VY
-100 CLS
-110 M=70
-120 W=2*PI/YA
-130 RA=200
-140 X=100
-150 Y=0
-160 T=0
-170 VX=0
-180 SCREEN 9
-190 LINE(1,Y0)-(630,Y0)
-200 LINE(X0-1,Y0+1)-(X0+1,Y0+1)
-201 LINE(X0-1,Y0-1)-(X0+1,Y0-1)
-210 AX=RA*COS(W*T)
-220 AY=RA*SIN(W*T)
-230 T=T+1
-240 R3=(X^2+Y^2)^1.5
-250 Z3=((X-AX)^2+(Y-AY)^2)^1.5
-260 VX=VX-M*X/R3+K*(AX-X)/Z3
-270 VY=VY-M*Y/R3+K*(AY-Y)/Z3
-280 X=X+VX
-290 Y=Y+VY
-300 PSET (X0+PX,Y0-PY*SR),0
-310 PSET (X0+QX,Y0-QY*SR),6
-320 PSET (X0+X,Y0-Y*SR)
-330 PSET (X0+AX,Y0-AY*SR)
-340 PX=AX
-350 PY=AY
-360 QX=X
-370 QY=Y
-380 IF Y<0 THEN SB=0
-390 IF Y>0 AND SB=0 THEN 410
-400 GOTO 210
-410 SB=1
-420 R$=INKEY$
-430 IF R$<>"" THEN 500
-450 PB=T-TA
-460 TA=T
-470 LOCATE 24,30
-480 PRINT "Jack's period is ";PB;" days";
-490 GOTO 210
-500 END
-510 '
-520 ' Written by Caxton Foster, this program displays the motion of
-530 ' two planets around a central star in a hypothetical solar system.
-540 ' The inner planet is called Jack; it is considered to have negligible
-550 ' mass, but you can specify its starting velocity (a number from 0 to
-560 ' 1.6 works best -- if the velocity is greater than 1.6, Jack escapes
-570 ' the solar system). The outer planet moves in a circular orbit, and
-580 ' you can specify its period (typically 300 to 2,000 "days") and mass
-590 ' (10 or less). No matter what period you select, its orbit is a
-600 ' circular one with a radius twice that of Jack's starting orbit.
-610 ' (Thus, Kepler's laws apply to Jack, but not to this arbitrary outer
-620 ' planet.) The program runs on IBM PCs or clones with VGA color
-630 ' graphics. By playing around with input values it is possible to
-640 ' make Jack's orbit have resonance, show apsidal motion, or put it on a
-650 ' near-collision course with planet A that ejects Jack from the solar
-660 ' system. The program is discussed on page 660 of the September 1994
-670 ' issue of Sky & Telescope.
diff --git a/bwbtest/B15B/broken/list.bas b/bwbtest/B15B/broken/list.bas
deleted file mode 100644
index 8c75757..0000000
--- a/bwbtest/B15B/broken/list.bas
+++ /dev/null
@@ -1,83 +0,0 @@
-10 REM INDEX-PRINTING PROGRAM
-20 OPEN "R",1,"NGC2000.DAT",24
-22 OPEN "R",2,"INDEX.DAT",2
-24 FIELD 1,5 AS N$,1 AS T$,2 AS H$,3 AS M$,3 AS D$,2 AS M1$,4 AS S$
-26 FIELD 2,2 AS I$
-30 WIDTH "LPT1:",132
-40 LPRINT CHR$(15);SPC(25);"OBJECT";SPC(4);"R.A.";SPC(12);"DEC";SPC(14);"ATLAS 2000";SPC(5);"URANOMETRIA"
-50 LPRINT
-60 FOR I=1 TO 50
-70 GET #2,I: J=CVI(I$): GET#1,J
-80 K$=LEFT$(M$,2)+"."+RIGHT$(M$,1)
-90 H=VAL(H$):M=VAL(K$):D=VAL(D$)
-100 H=H+M/60:M1=VAL(M1$):D=D+M1/60
-110 IF D$="-" THEN D=-D
-200 IF ABS(D)>18.5 THEN 280
-250 S=9+INT(H/3+1/1.2)
-260 IF S=9 THEN S=17
-270 GOTO 340
-280 IF ABS(D)>=52 THEN 320
-290 S=4+INT(H/4)
-300 IF D<0 THEN S=S+14
-310 GOTO 340
-320 S=1+INT(H/8)
-330 IF D<0 THEN S=S+23
-340 IF ABS(D)>=5.5 THEN 390
-350 U=215+INT(H*1.875+.5)
-360 IF U=260 THEN U=215
-370 V$="Vol I,II"
-380 GOTO 780
-390 IF D>0 THEN V$="Vol I"
-400 IF D<0 THEN V$="Vol II"
-410 IF ABS(D)>=50 THEN 610
-420 IF ABS(D)>=28 THEN 520
-430 IF ABS(D)>=17 THEN 480
-440 U=170+INT(H*1.875+.5)
-450 IF U=215 THEN U=170
-460 IF D<0 THEN U=U+90
-470 GOTO 780
-480 U=125+INT(H*1.875+.5)
-490 IF U=170 THEN U=125
-500 IF D<0 THEN U=U+180
-510 GOTO 780
-520 IF ABS(D)>=39 THEN 570
-530 U=89+INT(H*1.5+.5)
-540 IF U=125 THEN U=89
-550 IF D<0 THEN U=U+261
-560 GOTO 780
-570 U=59+INT(H/.8+.5)
-580 IF U=89 THEN U=59
-590 IF D<0 THEN U=U+327
-600 GOTO 780
-610 IF ABS(D)>=72.5 THEN 710
-620 IF ABS(D)>= 61 THEN 670
-630 U=35+INT(H+.5)
-640 IF U=59 THEN U=35
-650 IF D<0 THEN U=U+381
-660 GOTO 780
-670 U=15+INT(H/1.2+.5)
-680 IF U=35 THEN U=15
-690 IF D<0 THEN U=U+425
-700 GOTO 780
-710 IF ABS(D)>= 84.5 THEN 760
-720 U=3+INT(H/2+1/2.4)
-730 IF U=15 THEN U=3
-740 IF D<0 THEN U=U+457
-750 GOTO 780
-760 U=1+INT(H/12)
-770 IF D<0 THEN U=474-U
-780 LPRINT SPC(25);N$;SPC(4);H$;"hrs ";K$;"min. ";SPC(2);D$;"deg ";M1$;"min. ";SPC(3);"CHART";S;TAB(84);"CHART";U;V$
-790 K=K+1: IF K<25 THEN 850
-810 LPRINT
-820 LPRINT CHR$(15);SPC(25);"OBJECT";SPC(4);"R.A.";SPC(12);"DEC";SPC(14);"ATLAS 2000";SPC(5);"URANOMETRIA"
-830 K=0: LPRINT
-850 NEXT I
-860 WIDTH "LPT1:",80
-870 LPRINT CHR$(18): END
-900 '
-910 ' Written by Tim Hunter, MD, this program for IBM PC and compatible
-920 ' machines prints an index that tells which charts in Sky Atlas 2000.0
-930 ' and Uranometria 2000.0 show various NGC and IC objects. To work, it
-940 ' assumes you have the machine-readable version of NGC 2000.0 (available
-950 ' separately from Sky Publishing Corp.) in the same directory. For
-960 ' more about the program, see Sky & Telescope, August 1991, p. 182.
diff --git a/bwbtest/B15B/broken/marche.bas b/bwbtest/B15B/broken/marche.bas
deleted file mode 100644
index 675845f..0000000
--- a/bwbtest/B15B/broken/marche.bas
+++ /dev/null
@@ -1,124 +0,0 @@
-100 REM ASTROMETRIC REDUCTION
-105 REM
-110 DIM XZ(10),YZ(10),X1(10),Y1(10)
-115 DIM AA(10),DXZ(10),RR(10,9),RAA(10),RDXZ(10)
-120 DEFDBL A-H,K-Z
-125 ' PI=3.141592653589793:
-126 DR=PI/180
-130 INPUT "Camera focal length";L
-135 PRINT "R.A. of plate center (h,m,s)";
-140 GOSUB 630: A0=V*15*DR
-145 PRINT "Dec. of plate center (d,m,s)";
-150 GOSUB 630: D0=V*DR: SD=SIN(D0): CD=COS(D0)
-160 INPUT "Equinox, epoch";EQ,EP
-165 T=EP-EQ
-170 INPUT "How many stars (4-10)";N
-175 FOR J=1 TO N
-180 PRINT
-185 PRINT "R.A. of star ";J;"(h,m,s)";
-190 GOSUB 630
-195 INPUT "Proper motion (sec/yr)";M1
-200 AA(J)=(V+T*M1/3600)*15*DR
-205 PRINT "Dec. (d,m,s)";
-210 GOSUB 630
-215 INPUT "Proper motion (arcsec/yr)";M2
-220 DXZ(J)=(V+T*M2/3600)*DR: SJ=SIN(DXZ(J)): CJ=COS(DXZ(J))
-225 H=SJ*SD+CJ*CD*COS(AA(J)-A0)
-230 X1(J)=CJ*SIN(AA(J)-A0)/H
-235 Y1(J)=(SJ*CD-CJ*SD*COS(AA(J)-A0))/H
-240 INPUT "Measured X,Y";XZ(J),YZ(J)
-245 NEXT J
-250 PRINT
-255 INPUT "Measured X,Y of target";X,Y
-260 R1=0: R2=0: R3=0: R7=0: R8=0: R9=0: XS=0: YS=0
-265 FOR J=1 TO N
-270 XS=XS+XZ(J): YS=YS+YZ(J): RR(J,1)=XZ(J)*XZ(J)
-275 R1=R1+RR(J,1): RR(J,2)=YZ(J)*YZ(J): R2=R2+RR(J,2)
-280 RR(J,3)=XZ(J)*YZ(J): R3=R3+RR(J,3)
-285 RR(J,7)=Y1(J)-YZ(J)/L: R7=R7+RR(J,7)
-290 RR(J,8)=RR(J,7)*XZ(J): R8=R8+RR(J,8)
-295 RR(J,9)=RR(J,7)*YZ(J): R9=R9+RR(J,9)
-300 NEXT J
-305 REM Now solve for D, E, F, by Cramer's Rule
-310 DD=R1*(R2*N-YS*YS)-R3*(R3*N-XS*YS)+XS*(R3*YS-XS*R2)
-315 D=R8*(R2*N-YS*YS)-R3*(R9*N-R7*YS)+XS*(R9*YS-R7*R2)
-320 E=R1*(R9*N-R7*YS)-R8*(R3*N-XS*YS)+XS*(R3*R7-XS*R9)
-325 F=R1*(R2*R7-YS*R9)-R3*(R3*R7-XS*R9)+R8*(R3*YS-XS*R2)
-330 D=D/DD: E=E/DD: F=F/DD
-335 REM
-340 R4=0: R5=0: R6=0
-345 FOR J=1 TO N
-350 RR(J,4)=X1(J)-XZ(J)/L: R4=R4+RR(J,4)
-355 RR(J,5)=RR(J,4)*XZ(J): R5=R5+RR(J,5)
-360 RR(J,6)=RR(J,4)*YZ(J): R6=R6+RR(J,6)
-365 NEXT J
-370 REM Now solve for A ,B, C, by Cramer's Rule
-375 A=R5*(R2*N-YS*YS)-R3*(R6*N-R4*YS)+XS*(R6*YS-R4*R2)
-380 B=R1*(R6*N-R4*YS)-R5*(R3*N-XS*YS)+XS*(R3*R4-XS*R6)
-385 C=R1*(R2*R4-YS*R6)-R3*(R3*R4-XS*R6)+R5*(R3*YS-XS*R2)
-390 A=A/DD: B=B/DD: C=C/DD
-395 PRINT
-400 PRINT " Plate Constants "
-405 PRINT " R.A. Dec.
-410 PRINT USING "A = ##.##### D = ##.#####";A;D
-415 PRINT USING "B = ##.##### E = ##.#####";B;E
-420 PRINT USING "C = ##.##### F = ##.#####";C;F
-425 REM
-430 REM NOW FIND RESIDUALS
-435 AS=0: DS=0
-440 FOR J=1 TO N
-445 RAA(J)=XZ(J)-L*(X1(J)-(A*XZ(J)+B*YZ(J)+C))
-450 RDXZ(J)=YZ(J)-L*(Y1(J)-(D*XZ(J)+E*YZ(J)+F))
-455 AS=AS+((RAA(J)/L)*3600/(DR*15*COS(D0)))^2
-460 DS=DS+((RDXZ(J)/L)*3600/DR)^2
-465 NEXT J
-470 S1=SQR(AS/(N-3)): S2=SQR(DS/(N-3))
-475 PRINT
-480 PRINT "Residuals R.A. Dec."
-482 A$=" Star ## #.##### #.#####"
-485 FOR J=1 TO N
-490 PRINT USING A$;J;RAA(J);RDXZ(J)
-495 NEXT J
-500 PRINT
-505 REM Find standard coordinates of target
-510 XX=A*X+B*Y+C+X/L: YY=D*X+E*Y+F+Y/L
-515 B=CD-YY*SD: G=SQR(XX*XX+B*B)
-520 REM
-525 REM Find right ascension of target
-530 A5=ATN(XX/B): IF B<0 THEN A5=A5+PI
-535 A6=A5+A0: IF A6>2*PI THEN A6=A6-2*PI
-540 IF A6<0 THEN A6=A6+2*PI
-545 V=A6/(DR*15): GOSUB 660: A1=V1: A2=V2: A3=V3
-550 REM
-555 REM Find declination of target
-560 D6=ATN((SD+YY*CD)/G): V=D6/DR: GOSUB 660
-570 D1=V1: D2=V2: D3=V3
-575 REM
-580 PRINT "For target:"
-585 PRINT
-590 PRINT "Right ascension ";
-592 PRINT USING "## ## ##.###";A1;A2;A3
-595 PRINT USING " Std. dev. ##.###";S1
-600 PRINT
-605 PRINT "Declination ";S$;
-610 PRINT USING "## ## ##.##";D1;D2;D3
-615 PRINT USING " Std. dev. ##.##";S2
-620 END
-625 REM
-630 REM Input of sexagesimal values
-635 INPUT V$,V2,V3
-640 S=1: IF LEFT$(V$,1)="-" THEN S=-1
-645 V1=ABS(VAL(V$)): V=S*(V1+V2/60+V3/3600)
-655 RETURN
-660 REM Output of sexagesimal values
-665 S$="+": IF V<0 THEN S$="-"
-670 V=ABS(V): V1=INT(V): VM=60*(V-V1)
-675 V2=INT(VM): V3=60*(VM-V2)
-680 RETURN
-690 REM
-700 REM This program is used to analyze measurements
-710 REM of minor planet or comet positions on a
-720 REM photographic plate and deduce precise
-730 REM coordinates. Written by Jordan D. Marche
-740 REM and explained by him in Sky & Telescope
-750 REM for July, 1990, page 71.
diff --git a/bwbtest/B15B/broken/mirror.bas b/bwbtest/B15B/broken/mirror.bas
deleted file mode 100644
index d7871f6..0000000
--- a/bwbtest/B15B/broken/mirror.bas
+++ /dev/null
@@ -1,84 +0,0 @@
-10 REM FOUCAULT MIRROR TEST AT FOUR ZONES
-20 REM
-30 DIM A(4,9)
-40 INPUT "Mirror's diameter ";W
-50 INPUT "Radius of curvature";RR
-60 R=W/2
-70 Z1=.3: Z2=.6: Z3=.8: Z4=.95: REM ZONES
-80 X1=Z1*R: X2=Z2*R: X3=Z3*R: X4=Z4*R
-90 L=.000022: REM WAVELENGTH IN INCHES
-100 INPUT "Four zonal measurements";V1,V2,V3,V4
-110 F1=(X1/(2*RR*RR*L))*(X1*X1/RR-V1)
-120 F2=(X2/(2*RR*RR*L))*(X2*X2/RR-V2)
-130 F3=(X3/(2*RR*RR*L))*(X3*X3/RR-V3)
-140 F4=(X4/(2*RR*RR*L))*(X4*X4/RR-V4)
-150 A1=(X1)^7: B1=(X1)^5: C1=(X1)^3: D1=X1
-160 A2=(X2)^7: B2=(X2)^5: C2=(X2)^3: D2=X2
-170 A3=(X3)^7: B3=(X3)^5: C3=(X3)^3: D3=X3
-180 A4=(X4)^7: B4=(X4)^5: C4=(X4)^3: D4=X4
-190 M(1,1)=A1: M(1,2)=B1: M(1,3)=C1: M(1,4)=D1
-200 M(2,1)=A2: M(2,2)=B2: M(2,3)=C2: M(2,4)=D2
-210 M(3,1)=A3: M(3,2)=B3: M(3,3)=C3: M(3,4)=D3
-220 M(4,1)=A4: M(4,2)=B4: M(4,3)=C4: M(4,4)=D4
-230 M(1,5)=F1: M(2,5)=F2: M(3,5)=F3: M(4,5)=F4
-240 N=4: GOSUB 480: H=0: L=0
-250 A=M(1,5): B=M(2,5): C=M(3,5): D=M(4,5)
-260 D=-A*R^6/4-B*R^4/3-C*R^2/2
-270 GOSUB 570: LINE (H0,YC)-(H0+1,YC)
-280 FOR I=0 TO 1.001 STEP .05
-290 X=I*R: Y=A*X^8/8+B*X^6/6+C*X^4/4+D*X^2/2
-300 LINE -(H0+I*W1,YC-Y*W1)
-310 REM PRINT "Zone ";I;TAB(20);"Surface error ";Y
-320 IF Y>HI THEN HI=Y
-330 IF Y"y" AND Q$<>"Y" THEN 440
-420 INPUT "New value for D";D
-430 HI=0: LO=0: GOTO 270
-440 END
-450 REM Solve 4 linear equations for 4 unknowns
-460 REM (BYTE, August, 1983, page 396)
-470 DE=1
-480 Y=N+1: FOR X=1 TO N: Y=Y+1: M(X,Y)=1: NEXT X
-490 FOR G=1 TO N
-500 J=2*N+1: DV=M(G,G): DE=DE*DV
-510 FOR H=1 TO J: M(G,H)=M(G,H)/DV: NEXT H
-520 FOR S=1 TO N
-530 Q=M(S,G): IF S=G THEN 550
-540 FOR T=1 TO J: M(S,T)=M(S,T)-M(G,T)*Q: NEXT T
-550 NEXT S: NEXT G
-560 RETURN
-570 REM PREPARE CHART
-580 CLS: SCREEN 9 : Y1=85: Y2=95: YC=90
-590 W1=400: H0=100: H1=110: H3=H0+W1
-600 P1=H0+W1*Z1:P2=H0+W1*Z2:P3=H0+W1*Z3:P4=H0+W1*Z4
-610 LINE (H0,10)-(H0,170): LINE (H0,YC)-(H3,YC)
-620 LINE (H0,10)-(H1,10): LINE (H0,50)-(H1,50)
-630 LINE (H0,130)-(H1,130): LINE (H0,170)-(H1,170)
-640 LINE (P1,Y1)-(P1,Y2): LINE (P2,Y1)-(P2,Y2)
-650 LINE (P3,Y1)-(P3,Y2): LINE (P4,Y1)-(P4,Y2)
-660 LINE (H3,Y1)-(H3,Y2)
-670 LOCATE 1,1: PRINT "+0.2 wave"
-680 LOCATE 4,1: PRINT "+0.1 wave"
-690 LOCATE 7,1: PRINT " 0 wave"
-700 LOCATE 10,1: PRINT "-0.1 wave"
-710 LOCATE 13,1: PRINT "-0.2 wave"
-720 LOCATE 14,13: PRINT "Center"
-730 LOCATE 14,61: PRINT "Edge"
-740 RETURN
-800 REM
-810 REM For IBM PCs with VGA graphics, this
-820 REM program analyzes the results of a
-830 REM Foucault knife-edge test of a parab-
-840 REM oloidal telescope mirror, giving the
-850 REM surface and wavefront error in wave-
-860 REM lengths of light. Written by Roger
-870 REM Sinnott, it is discussed in Sky &
-880 REM Telescope magazine for February, 1990,
-890 REM page 195.
diff --git a/bwbtest/B15B/broken/model.bas b/bwbtest/B15B/broken/model.bas
deleted file mode 100644
index 66b65c7..0000000
--- a/bwbtest/B15B/broken/model.bas
+++ /dev/null
@@ -1,52 +0,0 @@
-10 REM MAKE A GLOBULAR
-12 REM
-14 R0=20: R2=R0*R0: R3=R2*R0
-16 P1=3.14159265#
-18 C0=P1*P1*R3/4
-20 R1=R0/SQR(2)
-22 XM=512: YM=512
-24 X2=XM/2: Y2=YM/2: S=5
-26 INPUT "HOW MANY STARS ";T
-27 RANDOMIZE TIMER
-28 CLS: REM CLEAR SCREEN
-30 FOR I=1 TO T
-32 C=C0*RND: R=R1
-34 REM
-36 REM NOW FIND R
-38 FOR K=1 TO 5
-40 GOSUB 100
-42 R=R+(C-C1)/D
-44 NEXT K
-46 REM 3-DIMENSIONAL PLACE
-48 X=RND-.5
-50 Y=RND-.5
-52 Z=RND-.5
-54 S1=SQR(X*X+Y*Y+Z*Z)
-56 IF S1>.5 THEN GOTO 48
-58 REM POINT IS NOW IN SPHERE
-60 R=R*S1: X=X*R: Y=Y*R: Z=Z*R
-62 GOSUB 200
-64 NEXT I
-66 END
-68 REM
-100 REM NEWTON-RAPHSON ITERATION
-105 A=R/R0
-110 C1=ATN(A)*.5*R3
-115 A=1+A*A
-120 C1=C1+R*.5*R2/A
-125 C1=P1*(C1-R*R2/(A*A))
-130 D=4*P1*R*R/(A*A*A)
-135 RETURN
-140 REM
-200 REM 2-DIMENSIONAL PLOT
-203 SCREEN 9
-205 X=X*S+X2: Y=Y*S+Y2
-210 IF X<0 OR Y<0 THEN 225
-215 IF X>=XM OR Y>=YM THEN 225
-220 PSET(X,Y)
-225 RETURN
-230 REM ------------------------
-240 REM APPEARED IN ASTRONOMICAL
-250 REM COMPUTING, SKY & TELE-
-260 REM SCOPE, APRIL, 1986
-270 REM ------------------------
diff --git a/bwbtest/B15B/broken/origam.bas b/bwbtest/B15B/broken/origam.bas
deleted file mode 100644
index e2f760b..0000000
--- a/bwbtest/B15B/broken/origam.bas
+++ /dev/null
@@ -1,103 +0,0 @@
-10 REM MODEL A COMET ORBIT
-11 F$="&HAAAA": REM FINE DOTS
-12 C$="&H1010": REM COARSE DOTS
-13 DR=3.14159265/180: K=.0172021
-14 FC=1.575: LB=10: SD=360/365.25
-15 SC=.82: REM ADJ FOR PRINTER
-16 INPUT "Eccentricity ";EC
-17 IF EC>.99 THEN EC=1
-18 INPUT "q ";QC: REM PERI DIST.
-19 INPUT "w ";W: REM ARG. PERI.
-20 INPUT "Node ";OM:
-21 INPUT "(D)irect or (R)etro";Q$
-22 IF Q$="R" THEN W=360-W
-23 L=W+180:IF L>360 THEN L=L-360
-24 INPUT "Day increment";ID
-25 INPUT "Scale (mm/a.u.)";MM
-26 AU=MM*FC: REM 1 A.U. IN MM
-27 AR=266*SD: OM=AR+OM:
-28 IF OM>360 THEN OM=OM-360:
-29 CLS: SCREEN 1: KEY OFF
-30 REM --- MODEL THE COMET ---
-31 IF EC<1 THEN FF=(1+EC)/(1-EC)
-32 W0=3*K/(QC*SQR(2*QC))
-33 Q=QC*AU: REM Q IN MM
-34 X1=LB+Q: Y1=100: REM SUN LOC
-35 CIRCLE (X1,Y1),2
-36 F=0: GOSUB 77: REM PERI LINE
-37 LINE (X1,Y1)-(X3,Y3)
-38 IF QC>.1 THEN CIRCLE (X3,Y3),2
-39 FOR F=1 TO 359
-40 IF EC=1 AND F=180 THEN 42
-41 GOSUB 77: PSET (X3,Y3)
-42 NEXT F
-43 F=-W: GOSUB 77
-44 LINE (X1,Y1)-(X3,Y3),,,VAL(C$)
-45 F=-L: GOSUB 77
-46 LINE (X1,Y1)-(X3,Y3),,,VAL(F$)
-47 FOR I=1 TO 5
-48 T=I*ID: IF EC=1 THEN GOSUB 92
-49 IF EC<1 THEN GOSUB 84
-50 GOSUB 77: CIRCLE (X3,Y3),2
-51 F=-F:GOSUB 77:CIRCLE (X3,Y3),2
-52 NEXT I
-53 PRINT "Comet": INPUT Q$
-54 REM --- MODEL THE EARTH ---
-55 DIM T(12):REM START OF MONTHS
-56 DATA 0,31,59,90,120,151
-57 DATA 181,212,243,273,304,334
-58 FOR I=1 TO 12 : READ T(I)
-59 NEXT I
-60 EC=0: Q=AU: X1=LB+Q: Y1=100
-61 CLS: CIRCLE (X1,Y1),2
-62 FOR I=1 TO 12
-63 F=T(I)*SD: GOSUB 77:
-64 LINE (X1,Y1)-(X3,Y3),,,VAL(F$)
-65 CIRCLE (X3,Y3),1
-66 F=(T(I)+10)*SD: GOSUB 77
-67 CIRCLE (X3,Y3),1
-68 F=(T(I)+20)*SD: GOSUB 77
-69 CIRCLE (X3,Y3),1
-70 NEXT I
-71 F=AR: GOSUB 77: REM ARIES
-72 LINE (X1,Y1)-(X3,Y3),,,VAL(C$)
-73 F=OM: GOSUB 77: REM ASC NODE
-74 LINE (X1,Y1)-(X3,Y3)
-75 PRINT "Earth": INPUT Q$
-76 END
-77 REM FIND POINT ALONG ORBIT
-78 R=Q*(1+EC)/(1+EC*COS(F*DR))
-79 X=R*COS(F*DR): Y=R*SIN(F*DR)
-80 X3=X1-X: Y3=Y1+SC*Y: N=32000
-81 IF SQR(X3*X3+Y3*Y3)1/10000 THEN 94
-97 F=2*ATN(S)/DR
-98 RETURN
-99 REM
-100 REM Written by R. B. Minton,
-110 REM this program for IBM PCs
-120 REM with CGA graphics prints
-130 REM paper outlines of the
-140 REM orbits of the Earth and
-150 REM a comet, which can then
-160 REM be cut out and folded to
-170 REM make a 3-dimensional
-180 REM model that helps you
-190 REM visualize the orbit in
-200 REM space. Fully explained5
-210 REM in Sky & Telescope for
-220 REM April, 1990, page 424.
diff --git a/bwbtest/B15B/broken/periap.bas b/bwbtest/B15B/broken/periap.bas
deleted file mode 100644
index 1e52fd1..0000000
--- a/bwbtest/B15B/broken/periap.bas
+++ /dev/null
@@ -1,78 +0,0 @@
-10 REM LUNAR PERIGEE AND APOGEE
-11 INPUT "STARTING JD";J0
-12 P0=2415024.89: M0=27.554551
-13 J0=P0+M0*INT((J0-P0)/M0)
-14 GOSUB 40 :REM GET CONSTANTS
-15 FOR I=1 TO 3: P1=0: P2=0
-16 T=(J0-2415020)/36525: T2=T*T
-17 M1=R*(296.105+R1*T+0.009192*T2)
-18 D=R*(350.737+R2*T-0.001436*T2)
-19 M=R*(358.476+R3*T-0.000150*T2)
-20 F=R*(11.251+R4*T-0.003211*T2)
-21 E=1-0.002495*T-0.00000752*T2
-22 FOR J=1 TO 30
-23 A(J)=A1(J)*E^C0(J)
-24 B(J)=C1(J)*M1+C2(J)*D+C3(J)*M
-25 B(J)=B(J)+C4(J)*F
-26 P1=P1+A(J)*SIN(B(J))*R(J)
-27 P2=P2+A(J)*COS(B(J))*R(J)*R(J)
-28 NEXT J
-29 J0=J0-(36525/R)*(P1/P2)
-30 NEXT I
-31 P=950724
-32 FOR J=1 TO 30:
-33 P=P+A(J)*COS(B(J))
-34 NEXT J
-35 K=6378.14/SIN(R*P*0.000001)
-36 K=INT(K+0.5): PA$="PERIGEE "
-37 IF P2<0 THEN PA$="APOGEE "
-38 PRINT PA$;K;" KM JD ";J0
-39 J0=J0+13.78: GOTO 15
-40 REM CONSTANTS
-41 DIM A(30),B(30),R(30),A1(30)
-42 DIM C0(30),C1(30),C2(30),C3(30)
-43 DIM C4(30): R=3.1415926536/180
-44 R1=477198.8491: R2=445267.1142
-45 R3=35999.0498: R4=483202.0251
-46 FOR J=1 TO 30
-47 READ A1(J),C0(J),C1(J)
-48 READ C2(J),C3(J),C4(J)
-49 R(J)=C1(J)*R1+C2(J)*R2
-50 R(J)=R(J)+C3(J)*R3+C4(J)*R4
-51 NEXT J
-52 RETURN
-53 DATA 51818,0,1,0,0,0
-54 DATA 9531,0,-1,2,0,0
-55 DATA 7843,0,0,2,0,0
-56 DATA 2824,0,2,0,0,0
-57 DATA 857,0,1,2,0,0
-58 DATA 533,1,0,2,-1,0
-59 DATA 401,1,-1,2,-1,0
-60 DATA 320,1,1,0,-1,0
-61 DATA -271,0,0,1,0,0
-62 DATA -264,1,1,0,1,0
-63 DATA -198,0,-1,0,0,2
-64 DATA 173,0,3,0,0,0
-65 DATA 167,0,-1,4,0,0
-66 DATA -111,1,0,0,1,0
-67 DATA 103,0,-2,4,0,0
-68 DATA -84,0,2,-2,0,0
-69 DATA -83,1,0,2,1,0
-70 DATA 79,0,2,2,0,0
-71 DATA 72,0,0,4,0,0
-72 DATA 64,1,1,2,-1,0
-73 DATA -63,1,-1,2,1,0
-74 DATA 41,1,0,1,1,0
-75 DATA 35,1,2,0,-1,0
-76 DATA -33,0,3,-2,0,0
-77 DATA -30,0,1,1,0,0
-78 DATA -29,0,0,-2,0,2
-79 DATA -29,1,2,0,1,0
-80 DATA 26,2,0,2,-2,0
-81 DATA -23,0,1,-2,0,2
-82 DATA 19,1,-1,4,-1,0
-83 REM *************************
-84 REM FROM ASTRONOMICAL COM-
-85 REM COMPUTING, SKY & TELE-
-86 REM SCOPE, NOV 87, PAGE 529
-87 REM *************************
diff --git a/bwbtest/B15B/broken/pillar.bas b/bwbtest/B15B/broken/pillar.bas
deleted file mode 100644
index d3ebbe2..0000000
--- a/bwbtest/B15B/broken/pillar.bas
+++ /dev/null
@@ -1,44 +0,0 @@
-10 REM PILLAR.BAS by Rodney Kubesh
-20 SCREEN 12
-30 REM Set Theta, the maximum angle of crystal tilt
-40 TH = 4
-50 REM Sun angle Alpha, varied from 6 deg.
-60 REM above horizon to 6 deg. below horizon
-70 FOR I = 0 TO 12
-80 A = 6 - I
-90 REM Calculate sky color
-100 B& = 63 * (1 - .06 * I) : REM Blue
-110 G& = 40 * (1 - .06 * I) : REM Green
-120 R& = 45 * (1 - .06 * I) : REM Red
-130 PALETTE 3, B& * 65536 + G& * 256 + R&
-140 PAINT (320, 320), 3
-150 IF A >= 0 THEN
-160 HI = 2 * TH - A
-170 LO = -(2 * TH + A)
-180 END IF
-190 IF A < 0 THEN
-200 HI = 2 * TH + ABS(A)
-210 LO = ABS(A) - 2 * TH
-220 END IF
-230 FOR AN = LO TO HI STEP .5
-240 REM Draw the Sun
-250 SU = 450 - (1000 * TAN(A * 3.14159 / 180))
-260 CIRCLE (320, SU), 10, 1
-270 PAINT (320, SU), 1, 1
-280 SP = 450 - (1000 * TAN(AN * 3.14159 / 180))
-290 PALETTE 1, 334143
-300 CIRCLE (320, SP), 3, 1
-310 PAINT (320, SP), 1, 1
-320 REM Draw the ground
-330 LINE (0, 450)-(639, 480), , BF
-340 NEXT AN
-350 REM Hold screen for one second, then clear it
-360 SLEEP 1
-370 IF I < 12 THEN CLS
-380 NEXT I
-390 END
-900 REM ---------------------------
-910 REM APPEARED IN ASTRONOMICAL
-920 REM COMPUTING, SKY & TELESCOPE,
-930 REM MAY 1999, PAGE 70
-940 REM ---------------------------
diff --git a/bwbtest/B15B/broken/pulsar.bas b/bwbtest/B15B/broken/pulsar.bas
deleted file mode 100644
index b475ccd..0000000
--- a/bwbtest/B15B/broken/pulsar.bas
+++ /dev/null
@@ -1,54 +0,0 @@
-10 ' RELATIVISTIC PRECESSION
-20 DEFDBL A-Z
-30 PI=4#*(ATN(1#)): XC=320: YC=165: SCREEN 9: KEY OFF
-40 LOCATE 15,1: PRINT "Eccentricity (0 to 0.9) ";
-50 INPUT EC: IF EC<0 OR EC>.9 THEN CLS : GOTO 40
-60 LOCATE 17,1: PRINT "Relativity strength (0 to 0.999)";
-70 PRINT SPC(40);: LOCATE 17,34
-80 INPUT SG: IF SG<0 OR SG>.999 THEN GOTO 60
-90 LOCATE 19,1: PRINT "Simulation speed (1 to 10)";
-100 PRINT SPC(40);: LOCATE 19,28: INPUT SS
-110 IF SS<1 OR SS>10 THEN GOTO 90
-120 SS=.0009#*(SS-.9#)*(1#-.9#*EXP(10#*EC-9#))
-130 CLS: LOCATE 19,1: PRINT "Eccentricity"
-140 PRINT USING " .######";EC;
-150 LOCATE 22,1: PRINT "Relativity": PRINT "strength"
-160 PRINT USING " .######";SG;: LOCATE 25,52
-170 COLOR 14: PRINT "(Press any key to interrupt)";
-180 SY=YC/(1+EC): SX=SY*1.33
-190 C0=(1#-SG*(3#+EC*EC)/(6#+2#*EC))/(1#-EC*EC)
-200 RH=SG*(1#-EC*EC)/(3#+EC): C2=1.5#*RH
-210 CIRCLE (XC,YC),SX*RH,8: PAINT (XC,YC),8
-220 LINE (0,YC)-(640,YC),7: LINE (XC,0)-(XC,350),7
-230 SN=0: QN=1#/(1#+EC): DN=0
-240 S=SN: Q=QN: D=DN: DP=DN: SP=SN: HN=SS*Q*Q
-250 F=C0-Q+C2*Q*Q: K1=HN*F: L1=HN*D
-260 S=SN+HN/2#: Q=QN+L1/2#: D=DN+K1/2#
-270 F=C0-Q+C2*Q*Q: K2=HN*F: L2=HN*D
-280 S=SN+HN/2#: Q=QN+L2/2#: D=DN+K2/2#
-290 F=C0-Q+C2*Q*Q: K3=HN*F: L3=HN*D
-300 S=SN+HN: Q=QN+L3: D=DN+K3
-310 F=C0-Q+C2*Q*Q: K4=HN*F: L4=HN*D
-320 QN=QN+(L1+2#*L2+2#*L3+L4)/6#
-330 DN=DN+(K1+2#*K2+2#*K3+K4)/6#
-340 SN=SN+HN
-350 PX=XC+SX*COS(SN)/QN: PY=YC-SY*SIN(SN)/QN
-360 COLOR 9: PSET (PX,PY)
-370 IF EC*DN>0 AND DP<0 THEN GOSUB 410
-380 IF INKEY$<>"" THEN END
-390 GOTO 240
-400 '
-410 ' DRAW LINE TO APASTRON & COUNT ORBITS
-420 COLOR 4: LINE (XC,YC)-(PX,PY)
-430 N=N+1: LOCATE 1,56: COLOR 15
-440 PRINT "Number of orbits ";N;
-450 IF N>1 THEN GOTO 500
-460 SA=(SP+(SN-SP)*DP/(DP-DN))*180/PI-360
-470 LOCATE 1,1: PRINT "Precession per orbit"
-480 IF SA<360 THEN PRINT USING "######.#### deg"; SA
-490 IF SA>=360 THEN PRINT USING "######.# deg"; SA
-500 RETURN
-610 ' This program by Jonathan Gallmeier, Mark Loewe, and
-620 ' Donald W. Olson appeared in the article "Precession
-630 ' and the Pulsar," Sky & Telescope, Oct. 1995, p. 86.
-
\ No newline at end of file
diff --git a/bwbtest/B15B/broken/rainbow.bas b/bwbtest/B15B/broken/rainbow.bas
deleted file mode 100644
index 9d40d88..0000000
--- a/bwbtest/B15B/broken/rainbow.bas
+++ /dev/null
@@ -1,57 +0,0 @@
-10 REM RAINBOW SIMULATION
-20 REM
-25 R0=180/3.14159
-30 REM RANDOM IMPACT PARAMETER
-35 X=-1+2*RND(1)
-40 Y=-1+2*RND(1)
-45 B=SQR(X*X+Y*Y)
-50 IF B>=1 THEN 30
-55 REM COLOR & INDEX OF REFR.
-60 C=1+INT(3*RND(1))
-65 N=1.33+.01*(C-1)
-70 REM COMPUTE ANGLES
-75 I=ATN(B/SQR(1-B*B))
-80 R=ATN(B/SQR(N*N-B*B))
-85 T1=(4*R-2*I)*R0
-90 T2=(6*R-2*I)*R0-180
-95 REM INTENSITY FACTORS
-100 RS=(SIN(I-R)/SIN(I+R))^2
-105 RP=(TAN(I-R)/TAN(I+R))^2
-110 RB=(1-RP)*(1-RP)
-115 RC=(1-RS)*(1-RS)
-120 I1=(RS*RC+RP*RB)/2
-125 I2=(RS*RS*RC+RP*RP*RB)/2
-130 IF I1<.04*RND(1) THEN 140
-135 TH=T1: GOSUB 180
-140 IF I2<.02*RND(1) THEN 150
-145 TH=T2: GOSUB 180
-150 GOTO 30
-155 REM COLORS & SCREEN
-160 SCREEN 9: CLS: KEY OFF: NP=0
-165 PALETTE 1,4: PALETTE 2,2
-170 PALETTE 3,9
-175 RETURN
-180 REM PLOT ON SCREEN
-185 TH=ABS(TH)
-190 IF TH>60 THEN RETURN
-195 XP=320+320*(TH/60)*(X/B)
-200 YP=325-300*(TH/60)*ABS(Y/B)
-205 PSET(XP,YP),C: NP=NP+1
-210 LOCATE 1,1: PRINT NP: RETURN
-215 REM VTAB23: PRINT NP: RETURN
-220 REM FOR APPLE II COMPUTERS
-225 REM COLORS & SCREEN
-230 REM HGR: HOME: NP=0
-235 REM CC(1)=5: CC(2)=1: CC(3)=6
-240 REM RETURN
-245 REM PLOT ON SCREEN
-250 REM TH=ABS(TH)
-255 REM IF TH>60 THEN RETURN
-260 REM XP=139+139*(TH/60)*(X/B)
-265 REM YP=159-159*(TH/60)*ABS(Y/B)
-270 REM HCOLOR=CC(C): NP=NP+1
-275 REM HPLOT XP,YP TO XP+1,YP
-280 REM **************************************
-285 REM APPEARED IN ASTRONOMICAL COMPUTING
-290 REM SKY & TELESCOPE, FEBRUARY 1991 ISSUE
-300 REM **************************************
diff --git a/bwbtest/B15B/broken/react.bas b/bwbtest/B15B/broken/react.bas
deleted file mode 100644
index 07be29f..0000000
--- a/bwbtest/B15B/broken/react.bas
+++ /dev/null
@@ -1,68 +0,0 @@
-100 REM REACTION TIME
-110 REM
-120 CLS: DIM R(2,101)
-130 J=0: K=0: C=60.9: REM TIME CONSTANT
-140 INPUT "FLASH AT RANDOM OR FIXED POSITIONS (R/F)";A1$
-150 IF A1$<>"R" AND A1$<>"F" THEN GOTO 140
-160 CLS: F=1: I=0: S=0: S2=0: S3=0: S4=0: M1=200: M2=2500: H=0: L=10
-170 T=M2*RND(1)+M1
-180 FOR D=0 TO T: NEXT: REM TIME DELAY BEFORE NEXT EVENT
-190 IF F<>1 THEN GOTO 230
-200 IF A1$="F" THEN PSET(64,24)
-210 IF A1$="R" THEN PSET(127*RND,48*RND)
-220 GOTO 240
-230 CLS
-240 P$=INKEY$: IF P$<>"" THEN GOTO 260
-250 I=I+1: GOTO 240
-260 IF P$="X" THEN GOTO 340
-270 IF I=0 THEN GOTO 340
-280 IF J>100 OR K>100 THEN GOTO 340
-290 IF F=2 THEN GOTO 310
-300 J=J+1: R(F,J)=I/C: GOTO 320
-310 K=K+1: R(F,K)=I/C
-320 I=0: F=F+1: IF F>2 THEN F=1
-330 GOTO 170
-340 CLS
-350 IF I=0 THEN PRINT "*** OUT OF SYNCH ***"
-360 IF J>100 OR K>100 THEN PRINT "*** OUT OF SPACE ***"
-370 INPUT "LIST DISAPPEARANCES OR REAPPEARANCES (D/R)";A2$
-380 IF A2$<>"D" AND A2$<>"R" THEN GOTO 370
-390 IF A2$="D" THEN GOTO 410
-400 F=1: U=J-1: GOTO 420
-410 F=2: U=K-1
-420 FOR P=1 TO U
-430 PRINT R(F,P);: S=S+R(F,P)
-440 IF HR(F,P) THEN L=R(F,P)
-460 NEXT
-470 IF U<3 THEN GOTO 640
-480 PRINT: PRINT
-490 PRINT "NUMBER OF DATA POINTS = ";U
-500 PRINT "MAX = ";H
-510 PRINT "MIN = ";L
-520 PRINT "MEAN = ";S/U
-530 FOR Q=1 TO U
-540 S2=S2+(R(F,Q)-S/U)^2
-550 S3=S3+(R(F,Q)-S/U)^3
-560 S4=S4+(R(F,Q)-S/U)^4
-570 NEXT
-580 S2=SQR(S2/U)
-590 S3=S3/(U*S2^3)
-600 S4=S4/(U*S2^4)
-610 PRINT "STANDARD DEVIATION = ";S2
-620 PRINT "SKEWNESS = ";S3
-630 PRINT "KURTOSIS = ";S4
-640 PRINT
-650 INPUT "ANOTHER LIST (Y/N)";A3$
-660 IF A3$<>"Y" THEN GOTO 680
-670 S=0: S2=0: S3=0: S4=0: H=0: L=10: CLS: GOTO 370
-680 IF A3$<>"N" THEN GOTO 650
-690 INPUT "CONTINUE TO ADD DATA (Y/N)";A4$
-700 IF A4$="N" THEN GOTO 730
-710 IF A4$="Y" THEN GOTO 160
-720 GOTO 650
-730 REM ==========================================
-740 REM FROM ASTRONOMICAL COMPUTING DEPARTMENT OF
-750 REM SKY & TELESCOPE, AUGUST, 1986, PAGE 174
-760 REM ==========================================
-770 END
diff --git a/bwbtest/B15B/broken/ronchi.bas b/bwbtest/B15B/broken/ronchi.bas
deleted file mode 100644
index 61e8844..0000000
--- a/bwbtest/B15B/broken/ronchi.bas
+++ /dev/null
@@ -1,51 +0,0 @@
-10 REM RONCHI.BAS
-20 REM
-30 INPUT "Mirror diameter ";D
-40 INPUT "Radius of curvature";R
-50 INPUT "Grating frequency ";F
-60 PRINT "Grating distance Delta"
-70 PRINT " from the mirror's
-80 PRINT " center of curvature"
-90 INPUT " (+ is outside) ";DL
-100 W=1/(2*F): REM Line width
-120 CLS
-130 SCREEN 2
-140 X0=300: Y0=100: C=300
-150 K=.42
-160 CIRCLE (X0,Y0),C/2
-170 FOR I=1 TO 10000
-180 X=D*(RND(1)-.5)
-190 Y=D*(RND(1)-.5)
-200 REM X and Y are the ray's
-210 REM coordinates on the face
-220 REM of the mirror
-230 S2=X*X+Y*Y
-240 IF SQR(S2)>D/2 THEN 390
-250 Z=R+S2/R
-260 L=R+DL-Z
-270 U=L*X/Z
-280 REM Now, test to see if the
-290 REM ray is blocked (FL=0)
-300 REM or transmitted (FL=1)
-310 REM by the grating
-320 FL=0: REM Reset flag
-330 T=INT(ABS(U/W)+.5)
-340 IF T/2=INT(T/2) THEN FL=1
-350 IF FL=0 THEN 390
-360 XP=X0+X*C/D
-370 YP=Y0+Y*K*C/D
-380 PSET(XP,YP): REM Plot point
-390 NEXT I
-400 LOCATE 1,1
-410 PRINT "Diameter = ";D
-420 LOCATE 2,1
-430 PRINT "R of C = ";R
-440 LOCATE 3,1
-450 PRINT "Ronchi freq =";F
-460 LOCATE 4,1
-470 PRINT "Delta = ";DL
-480 END
-490 REM ************************************
-500 REM APPEARED IN ASTRONOMICAL COMPUTING
-510 REM SKY & TELESCOPE - APRIL 1991 ISSUE
-520 REM ************************************
diff --git a/bwbtest/B15B/broken/sine.bas b/bwbtest/B15B/broken/sine.bas
deleted file mode 100644
index 465d00e..0000000
--- a/bwbtest/B15B/broken/sine.bas
+++ /dev/null
@@ -1,73 +0,0 @@
- 10 ' ----- set up dimensions (in pixels) of display -----
- 11 DX = 310
- 12 DY = 199
- 13 CLS
- 14 SCREEN 2
- 15 KEY OFF
- 17 PRINT "This program generates the Julia sets of the function"
- 18 PRINT "lambda*sin(X + iY), where lambda = P + iQ and i * i = -1,"
- 19 PRINT "in a portion of the complex plane with origin (in upper"
- 20 PRINT "left corner) ACORNER,BCORNER and size SIDEX,SIDEY."
- 21 PRINT "To get acquainted with this function set:"
- 22 PRINT "lambda = 1, 0 corner = -7, -7 size = 14, 14"
- 23 PRINT "To reproduce the images on page 137 of the August S&T set,"
- 24 PRINT "Right image: lambda = 1, 0.1 corner = -3, -3 size 6, 6"
- 25 PRINT "Left image: lambda = 1, 0.8 corner = -3, -3 size 6, 6"
- 26 PRINT "More details are in Chapter 3 of 'The Science of Fractal"
- 27 PRINT "Images,' Heinz-Otto Peitgen and Dietmas Saupe editors,"
- 28 PRINT "Springer -Verlag, 1988."
- 29 PRINT "Good luck,"
- 30 PRINT "David H. Smith July, 1989"
- 31 PRINT ""
- 32 PRINT ""
- 33 PRINT "P.S. This program takes about an hour to run on a 6 MHz 286"
- 34 PRINT "machine equipped with a 287 coprocessor running Quick Basic."
- 35 PRINT "If you are running GW Basic expect it to take 10-times longer."
- 36 PRINT "A color graphics card is essential."
- 85 INPUT "enter value of lambda"; P, Q
- 90 INPUT "enter corner of region to be displayed"; ACORNER, BCORNER
- 100 INPUT "enter size of region"; SIDEX, SIDEY
- 105 CLS
- 106 SCREEN 1
- 107 COLOR 0, 2
- 110 GAPX = SIDEX / DX
- 115 GAPY = SIDEY / DY
- 210 '----- start main loops -----
- 220 FOR X = 1 TO DX
- 230 FOR Y = 1 TO DY
- 260 AZ = (X * GAPX) + ACORNER
- 270 BZ = (Y * GAPY) + BCORNER
- 300 COUNT = 0
- 302 EPBZ = EXP(BZ)
- 303 EMBZ = 1 / EPBZ
- 304 COSH = (EPBZ + EMBZ) / 2!
- 305 SINH = (EPBZ - EMBZ) / 2!
- 310 REAL = SIN(AZ) * COSH
- 315 IMAG = COS(AZ) * SINH
- 320 REALZ = P * REAL - Q * IMAG
- 325 IMAGZ = Q * REAL + P * IMAG
- 326 IMAGZ2 = IMAGZ * IMAGZ
- 330 ABSZ = SQR(IMAGZ2)
- 340 COUNT = COUNT + 1
- 350 '
- 360 '---- check for divergence or count = 30 -----
- 370 IF ((ABSZ > 30) OR (COUNT = 30)) THEN 430
- 380 AZ = REALZ
- 390 BZ = IMAGZ
- 400 GOTO 302
- 410 '
- 420 '----- set pixel color according to count -----
- 430 COLOUR = 1 + COUNT MOD 3
- 550 IF (COUNT = 30) THEN COLOUR = 0
- 560 '
- 600 '----- turn pixel on -----
- 610 PSET (X, Y), COLOUR
- 620 '
- 630 NEXT Y
- 640 NEXT X
- 700 END
- 800 REM ************************************************
- 810 REM FOR MORE INFORMATION ON THIS PROGRAM, SEE THE
- 820 REM ARTICLE "COMPUTER CHAOS AT HOME" IN THE AUGUST,
- 830 REM 1989, ISSUE OF SKY & TELESCOPE, PAGE 139.
- 840 REM ************************************************
diff --git a/bwbtest/B15B/broken/solarosc.bas b/bwbtest/B15B/broken/solarosc.bas
deleted file mode 100644
index e792219..0000000
--- a/bwbtest/B15B/broken/solarosc.bas
+++ /dev/null
@@ -1,46 +0,0 @@
-10 REM Solar Surface Oscillations
-20 REM SOLAROSC.BAS by John Kennewell
-30 DIM P(200)
-40 SCREEN 12: PH=1.570795: MX=0
-50 RD=1: GN=256: BL=65536!
-60 PRINT "Solar Oscillation Modes"
-70 INPUT "Degree L [0 to 28]";L
-80 INPUT "Order M [0 to L ]";M
-90 REM Generate Legendre function
-100 FOR XI=0 TO 200
-110 X=(XI-100)/100: D=SQR(1-X*X)
-120 P1=D^L: P2=0
-130 FOR LI=1 TO (2*L-1) STEP 2
-140 P1=P1*LI: NEXT LI
-150 IF M>=L OR P1=0 THEN 200
-160 FOR MI=L-1 TO M STEP -1
-170 PM=2*(MI+1)*X*P1/D-P2
-180 PM=PM/(L-MI)/(L+MI+1)
-190 P2=P1: P1=PM: NEXT MI
-200 P(XI)=P1: MT=ABS(P1)
-210 IF MT>MX THEN MX=MT
-220 NEXT XI
-230 CLS : COLOR 1: LOCATE 2,3
-240 PRINT "Solar Global Oscillations"
-250 LOCATE 28,3
-260 PRINT "MODE : L ="; L;" M =";M
-270 REM Show color palette
-280 FOR I=1 TO 15
-290 LINE (600,-15+30*I)-(620,15+30*I),I,BF
-300 RC=RD*INT((15-I)*4.5)
-310 BC=BL*INT((I-1)*4.5)
-320 GC=GN*INT((7-ABS(8-I))*4.5)
-330 PALETTE I,RC+BC+GC: NEXT I
-340 REM Plotting
-350 FOR CT=-1 TO 1 STEP .005
-360 ST=SQR(1-CT*CT)
-370 PM=P(CT*100+100)/MX
-380 FOR SF=-1 TO 1 STEP .005
-390 CF=SQR(1-SF*SF)
-400 FI=PH*SGN(SF)
-410 IF CF<>0 THEN FI=ATN(SF/CF)
-420 S=PM*COS(M*FI)*ST*CF
-430 X%=300+200*SF*ST
-440 Y%=240-200*CT
-450 PSET (X%,Y%),8-7*S
-460 NEXT SF: NEXT CT: END
diff --git a/bwbtest/B15B/broken/spiral.bas b/bwbtest/B15B/broken/spiral.bas
deleted file mode 100644
index 0873a31..0000000
--- a/bwbtest/B15B/broken/spiral.bas
+++ /dev/null
@@ -1,39 +0,0 @@
-100 REM SPIRAL.BAS -- A PROGRAM
-110 REM TO CREATE SPIRAL GAL-
-120 REM AXIES OF MANY TYPES
-130 REM
-140 REM PH = angle phi
-150 REM W = orientation angle
-160 REM I = inclination angle
-170 REM
-180 PI=3.14159: DR=PI/180
-190 REM DR = radians per degree
-200 PRINT "Input values:"
-210 INPUT " Alpha, beta";A1,B1
-220 INPUT " Inclination (deg)";I
-230 INPUT " Orientation (deg)";W
-240 XC=300: YC=150: MX=40: MY=28
-250 I=I*DR: W=W*DR
-260 CLS
-270 SCREEN 9
-280 CIRCLE (XC,YC),10
-290 F=0: GOSUB 320: REM 1st arm
-300 F=PI: GOSUB 320: REM 2nd arm
-310 END
-320 REM DRAW AN ARM
-330 PSET(XC,YC)
-340 FOR J=1 TO 100
-350 R=J/20
-360 IF R<1 THEN PH=(A1-B1)*R
-370 IF R<1 THEN 390
-380 PH=A1-B1*R+A1*LOG(R)
-390 X=MX*R*COS(PH+W+F)+XC
-400 Y=MY*R*SIN(PH+W+F)*COS(I)+YC
-410 REM PRINT X;Y
-420 LINE -(X,Y)
-430 NEXT J
-440 RETURN
-450 REM ***************************************
-460 REM APPEARED IN ASTRONOMICAL COMPUTING
-470 REM SKY & TELESCOPE - DECEMBER 1990 ISSUE
-480 REM ***************************************
diff --git a/bwbtest/B15B/broken/sundog.bas b/bwbtest/B15B/broken/sundog.bas
deleted file mode 100644
index 452b733..0000000
--- a/bwbtest/B15B/broken/sundog.bas
+++ /dev/null
@@ -1,72 +0,0 @@
-10 REM SUNDOG.BAS by Rodney Kubesh
-20 REM
-30 SCREEN 9
-40 WINDOW (-125,80)-(125,-10)
-50 PI=3.14159
-60 REM Choose solar elevation angle
-70 INPUT "Solar elevation in degrees";SA
-80 LN=COS(SA*PI/180)
-90 LM=COS((90-SA)*PI/180)
-95 REM Choose rays from various locations across solar disk
-100 FOR J=1 TO 6
-110 EL=SA-(J-1)*.1
-115 REM Choose angle between ray and crystal face
-120 FOR I=0 TO 90 STEP 2
-130 N0=COS(EL*PI/180)
-140 M0=COS((90-EL)*PI/180)
-150 IF ABS(1!-M0*M0-N0*N0)<.000001 THEN L0=0!
-160 GOTO 180
-170 L0=(1!-M0*M0-N0*N0)^.5
-180 REM First crystal face, introduce tilt
-190 N=1!
-200 NP=1.31
-210 AN=I*PI/180!
-220 GOSUB 460
-230 REM Tilt it back
-240 AN=-AN
-250 GOSUB 580
-260 REM Next crystal face, 60 deg. tilt
-270 N=NP: NP=1!
-280 AN=-(60-I)*PI/180!
-290 GOSUB 460
-300 REM tilt it back
-310 AN=-AN
-320 GOSUB 580
-330 IF IR%<>0 THEN GOTO 390
-340 REM Plot point on image plane
-350 XS=-200!*L0/N0
-360 YS=200!*MS/N0
-370 PSET (XS,YS)
-380 PSET (-XS,YS)
-390 NEXT I
-400 NEXT J
-405 REM Plot the Sun
-410 SX=0: SY=200*LM/LN
-420 CIRCLE (SX,SY),2
-430 PAINT (SX,SY)
-440 LINE (-125,0)-(125,0)
-450 END
-460 REM Tilt subroutine
-470 IR%=0
-480 MU=N/NP
-490 LI=L0: NI=N0
-500 PH=SIN(AN): HP=COS(AN)
-510 L0=LI*HP+NI*PH
-520 N0=NI*HP-LI*PH
-530 LS=MU*L0 : MS=MU*M0
-540 IN=MU*MU*(N0*N0-1!)+1!
-550 IF IN>=0 THEN NS=IN^.5
-560 IF IN<0 THEN IR%=1
-570 RETURN
-580 REM Tiltback subroutine
-590 LI=LS: NI=NS
-600 PH=SIN(AN): HP=COS(AN)
-610 L0=LI*HP+NI*PH
-620 N0=NI*HP-LI*PH
-630 M0=MS
-640 RETURN
-650 REM ========================
-660 REM FROM "ASTRONOMICAL
-670 REM COMPUTING," SKY & TELE-
-680 REM SCOPE, JANUARY 1997
-690 REM ========================
diff --git a/bwbtest/B15B/calendar.INP b/bwbtest/B15B/calendar.INP
deleted file mode 100644
index 73ddaf4..0000000
--- a/bwbtest/B15B/calendar.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-03,2015
-N
diff --git a/bwbtest/B15B/calendar.bas b/bwbtest/B15B/calendar.bas
deleted file mode 100644
index 2ea8f93..0000000
--- a/bwbtest/B15B/calendar.bas
+++ /dev/null
@@ -1,30 +0,0 @@
-10 REM PERPETUAL GREGORIAN CALENDAR
-12 REM
-14 DIM C$(42), D$(31), E(12)
-16 FOR I=1 TO 31: READ D$(I): NEXT I
-18 FOR I=1 TO 12: READ E(I): NEXT I
-20 DATA " 1"," 2"," 3"," 4"," 5"," 6"," 7"," 8"," 9"," 10"
-22 DATA " 11"," 12"," 13"," 14"," 15"," 16"," 17"," 18"," 19"," 20"
-24 DATA " 21"," 22"," 23"," 24"," 25"," 26"," 27"," 28"," 29"," 30"," 31"
-26 DATA 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
-28 PRINT: INPUT "MONTH, YEAR";M,Y: IF Y<100 THEN Y=Y+1900
-30 PRINT: PRINT " SU MO TU WE TH FR SA": PRINT
-32 J=367*Y-INT(7*(Y+INT((M+9)/12))/4)+INT(275*M/9)+1721031
-34 K=0: IF M<=2 THEN K=-1
-36 J=J-INT(3*(INT((Y+K)/100)+1)/4)
-38 K=E(M): IF M<>2 THEN 48
-40 W=INT(Y-100*INT(Y/100)): X=INT(Y-4*INT(Y/4)): Z=INT(Y-400*INT(Y/400))
-42 IF X<>0 THEN 48
-44 IF W=0 AND Z<>0 THEN 48
-46 K=29
-48 X=J-7*INT(J/7)
-50 FOR I=1 TO 42: C$(I)=" ": NEXT I
-52 FOR I=1 TO K: C$(I+X)=D$(I): NEXT I
-54 FOR I=1 TO 6: J=7*I
-56 PRINT C$(J-6);C$(J-5);C$(J-4);C$(J-3);C$(J-2);C$(J-1);C$(J)
-58 NEXT I
-60 PRINT: INPUT "ANOTHER";A$: IF A$="Y" THEN 28
-62 END
-63 REM ---------------------------------------------------------------
-64 REM APPEARED IN ASTRONOMICAL COMPUTING, SKY & TELESCOPE, JULY, 1985
-65 REM ---------------------------------------------------------------
diff --git a/bwbtest/B15B/calendar.run b/bwbtest/B15B/calendar.run
deleted file mode 100644
index 2cb7819..0000000
--- a/bwbtest/B15B/calendar.run
+++ /dev/null
@@ -1,13 +0,0 @@
-
-MONTH, YEAR? 03,2015
-
- SU MO TU WE TH FR SA
-
- 1 2 3 4 5 6 7
- 8 9 10 11 12 13 14
- 15 16 17 18 19 20 21
- 22 23 24 25 26 27 28
- 29 30 31
-
-
-ANOTHER? N
diff --git a/bwbtest/B15B/caljd.INP b/bwbtest/B15B/caljd.INP
deleted file mode 100644
index 4cbc196..0000000
--- a/bwbtest/B15B/caljd.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-2015,03,01
-0
diff --git a/bwbtest/B15B/caljd.bas b/bwbtest/B15B/caljd.bas
deleted file mode 100644
index 98d34aa..0000000
--- a/bwbtest/B15B/caljd.bas
+++ /dev/null
@@ -1,21 +0,0 @@
-800 REM CALENDAR --> JD
-805 REM
-810 INPUT "Y,M,D ";Y,M,D
-815 INPUT "JC (0) OR GC (1) ";G
-820 D1=INT(D): F=D-D1-0.5
-825 J=-INT(7*(INT((M+9)/12)+Y)/4)
-830 IF G=0 THEN 850
-835 S=SGN(M-9): A=ABS(M-9)
-840 J1=INT(Y+S*INT(A/7))
-845 J1=-INT((INT(J1/100)+1)*3/4)
-850 J=J+INT(275*M/9)+D1+G*J1
-855 J=J+1721027+2*G+367*Y
-860 IF F>=0 THEN 870
-865 F=F+1: J=J-1
-870 PRINT "J.D.: ";J;F
-875 END
-880 REM ------------------------
-885 REM APPEARED IN ASTRONOMICAL
-890 REM COMPUTING, SKY & TELE-
-895 REM SCOPE, MAY, 1984
-900 REM ------------------------
diff --git a/bwbtest/B15B/caljd.run b/bwbtest/B15B/caljd.run
deleted file mode 100644
index 0d6b919..0000000
--- a/bwbtest/B15B/caljd.run
+++ /dev/null
@@ -1,3 +0,0 @@
-Y,M,D ? 2015,03,01
-JC (0) OR GC (1) ? 0
-J.D.: 2.4571E+6 .5
diff --git a/bwbtest/B15B/capture.INP b/bwbtest/B15B/capture.INP
deleted file mode 100644
index 90731b7..0000000
--- a/bwbtest/B15B/capture.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-2.34
-30
-1
-n
diff --git a/bwbtest/B15B/capture.bas b/bwbtest/B15B/capture.bas
deleted file mode 100644
index 8b900ca..0000000
--- a/bwbtest/B15B/capture.bas
+++ /dev/null
@@ -1,50 +0,0 @@
-10 ' A Camera's Efficiency for Meteors
-20 '
-30 RD=180/3.14159
-35 C=4*RD^2
-40 L=0: W=0: Q=0
-50 K=0.003667: ' Constant
-60 N=1: ' Exponent for focal length
-70 X=0: ' Closed/open ratio
-80 INPUT "F/ratio ";FR
-90 INPUT "Focal length (mm)"; FL
-100 AP=FL/FR: ' Aperture in mm
-110 PRINT "Select film/image format:"
-120 PRINT " (1) 35-mm"
-130 PRINT " (2) 120 square"
-140 PRINT " (3) 4 x 5"
-150 PRINT " (4) 8 x 10"
-160 PRINT " (5) Special area"
-170 PRINT " (6) Fisheye (180 deg)"
-180 INPUT "Selection";Q
-190 IF Q<1 OR Q>6 THEN GOTO 180
-200 ON Q GOTO 210,220,230,240,250,260
-210 L=36: W=24: GOTO 270
-220 L=55: W=55: GOTO 270
-230 L=119: W=94: GOTO 270
-240 L=240: W=190: GOTO 270
-250 INPUT "Sky area (sq deg)";S
-255 GOTO 310
-260 S=20626: GOTO 290
-265 '
-266 ' Compute sky area covered
-267 ' by a rectangular film frame
-270 S=C*ATN(0.5*L/FL)*ATN(0.5*W/FL)
-280 IF S>50 THEN S=INT(S+0.5)
-290 PRINT "Sky area (sq deg): ";S
-300 '
-310 ' Now, evaluate McKinley formula
-320 E=K*AP^2*S/((1+X)*FL^N)
-330 PRINT USING "Efficiency ####.#";E
-340 PRINT
-350 INPUT "Another (y or n)";Q$
-360 IF Q$<>"n" THEN GOTO 40
-370 END
-380 '
-390 ' Written by Roger W. Sinnott, this program calculates the relative
-400 ' efficiency of any given camera lens and film format for capturing
-410 ' meteors. The efficiency is expressed as a number that ranges from
-420 ' less than 10 for poor combinations (such as a 35-mm camera with a
-430 ' long telephoto lens) to more than 1,000 for highly specialized systems
-440 ' such as the Baker Super-Schmidt. The program was described in
-450 ' Sky & Telescope for February 1994, page 85.
diff --git a/bwbtest/B15B/capture.run b/bwbtest/B15B/capture.run
deleted file mode 100644
index 1f63017..0000000
--- a/bwbtest/B15B/capture.run
+++ /dev/null
@@ -1,14 +0,0 @@
-F/ratio ? 2.34
-Focal length (mm)? 30
-Select film/image format:
- (1) 35-mm
- (2) 120 square
- (3) 4 x 5
- (4) 8 x 10
- (5) Special area
- (6) Fisheye (180 deg)
-Selection? 1
-Sky area (sq deg): 2700
-Efficiency 54.2
-
-Another (y or n)? n
diff --git a/bwbtest/B15B/ccdlimi2.INP b/bwbtest/B15B/ccdlimi2.INP
deleted file mode 100644
index 472db0d..0000000
--- a/bwbtest/B15B/ccdlimi2.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-30
-7
-360
diff --git a/bwbtest/B15B/ccdlimi2.bas b/bwbtest/B15B/ccdlimi2.bas
deleted file mode 100644
index 44e5740..0000000
--- a/bwbtest/B15B/ccdlimi2.bas
+++ /dev/null
@@ -1,176 +0,0 @@
-10 REM CCDLIMIT.BAS CCD Limits
-20 REM by Bradley E. Schaefer
-30 FOR I=1 TO 5 : READ WA(I) : NEXT I
-40 DATA 0.365, 0.44, 0.55, 0.7, 0.9
-50 FOR I=1 TO 5 : READ Q(I) : NEXT I
-60 DATA 15.0, 25.0, 40.0, 56.0, 26.0
-70 FOR I=1 TO 5 : READ MO(I) : NEXT I
-80 DATA -10.93, -10.45, -11.05, -11.90, -12.70
-90 REM Input for position
-100 RD=3.14159/180.0
-110 INPUT "Zenith distance (deg.) : ";Z
-120 AM=180.0 : REM Moon phase (deg.; 0=FM, 90=FQ/LQ, 180=NM)
-130 ZM=180.0 : REM Zenith distance of Moon (deg.)
-140 RM=180.0 : REM Angular distance to Moon (deg.)
-150 ZS=180.0 : REM Zenith distance of Sun (deg.)
-160 RS=180.0 : REM Angular distance to Sun (deg.)
-170 REM Input for the Site and Date
-180 TS=1.0 : REM FWHM of seeing in V at zenith
-190 RH=40.0 : REM relative humidity (%)
-200 TE=15.0 : REM Air temperature (deg. C)
-210 LA=30.0 : REM Latitude (deg.)
-220 AL=1000.0 : REM Altitude above sea level (m)
-230 M=2.0 : REM Month (1=Jan, 12=Dec)
-240 Y=1998.0 : REM Year
-250 REM Input for the telescope and detector
-260 D=20.32 : REM Telescope aperture (cm)
-270 TP=.91 : REM Pixel size (")
-280 DS=4.0 : REM Diameter of secondary (cm)
-290 NM=2 : REM Number of mirrors (-)
-300 NL=2 : REM Number of lens/glass in path (-)
-310 RN=15.0 : REM Read noise of CCD (electrons)
-320 INPUT "Enter V-band magnitude of star: ";MV
-330 CI=.7 : REM Color index [B-V] for star (mag)
-340 INPUT "Exposure time (seconds): ";E
-350 NR=1 : REM Number of CCD readouts (-)
-360 TA=1.0 : REM Radius of photometry aperture (") [best : TA=~TS]
-370 GOSUB 1000 : REM Extinction subroutine
-380 GOSUB 2000 : REM Sky subroutine
-390 REM Calculate counts from star and sky
-400 MA(1)=MV+2.35*CI-.6 : REM U
-410 MA(2)=MV+CI : REM B
-420 MA(3)=MV : REM V
-430 MA(4)=MV-.75*CI : REM R
-440 MA(5)=MV-1.6*CI : REM I
-450 GOSUB 3000 : REM CT subroutine
-460 REM Calculate SNR (see PASP article for exact formula)
-470 P=3.14159*(TA/TP)^2
-480 IF P<1.0 THEN P=1.0
-490 FOR I=1 TO 5
-500 VA=NS(I)+P*NB(I)+P*NR*RN*RN
-510 SN(I)=NS(I)/SQR(VA)
-520 SI(I)=1.086/SN(I)
-530 NEXT I
-540 PRINT : PRINT "For star with U, B, V, R, I ";
-550 PRINT USING " #####.##"; MA(1), MA(2), MA(3), MA(4), MA(5)
-560 PRINT " their respective SNR are ";
-570 PRINT USING " #####.##"; SN(1), SN(2), SN(3), SN(4), SN(5)
-580 PRINT " with 1-sigma errors (mag.) of ";
-590 PRINT USING " #####.##"; SI(1), SI(2), SI(3), SI(4), SI(5)
-600 END
-1000 REM Extinction Subroutine
-1010 FOR I=1 TO 5: READ OZ(I): NEXT I
-1020 DATA 0.000, 0.000, 0.031, 0.008, 0.000
-1030 FOR I=1 TO 5: READ WT(I): NEXT I
-1040 DATA 0.074, 0.045, 0.031, 0.020, 0.015
-1050 LT=LA*RD
-1060 RA=(M-3)*30.0*RD
-1070 SL=LA/ABS(LA)
-1080 REM Airmass for each component
-1090 ZZ=Z*RD
-1100 XG=1/(COS(ZZ)+.0286*EXP(-10.5*COS(ZZ)))
-1110 XA=1/(COS(ZZ)+.0123*EXP(-24.5*COS(ZZ)))
-1120 XO=1/SQR(1.0-(SIN(ZZ)/(1.0+(20.0/6378.0)))^2)
-1130 REM UBVRI extinction for each component
-1140 FOR I=1 TO 5
-1150 KR=.1066*EXP(-1*AL/8200)*((WA(I)/.55)^(-4))
-1160 KA=.1*((WA(I)/.55)^(-1.3))*EXP(-1*AL/1500)
-1170 KA=KA*((1-.32/LOG(RH/100.0))^1.33)*(1+SL*SIN(RA))
-1180 KO=OZ(I)*(3.0+.4*(LT*COS(RA)-COS(3*LT)))/3.0
-1190 KW=WT(I)*.94*(RH/100.0)*EXP(TE/15)*EXP(-1*AL/8200)
-1200 K(I)=KR+KA+KO+KW
-1210 DM(I)=KR*XG+KA*XA+KO*XO+KW*XG
-1220 NEXT I
-1230 REM Write results and return
-1240 PRINT : PRINT "Airmass (gas, aerosol, ozone): ";
-1250 PRINT USING "####.## "; XG, XA, XO
-1260 PRINT "Extinction Coefficients (UBVRI): ";
-1270 PRINT USING "####.## "; K(1), K(2), K(3), K(4), K(5)
-1280 PRINT "Total Extinction (UBVRI): ";
-1290 PRINT USING "####.## "; DM(1), DM(2), DM(3), DM(4), DM(5)
-1300 RETURN
-2000 REM SKY Subroutine
-2010 FOR I=1 TO 5: READ BO(I): NEXT I
-2020 DATA 8.0E-14, 7.0E-14, 1.0E-13, 1.0E-13, 3.0E-13
-2030 FOR I=1 TO 5: READ CM(I): NEXT I
-2040 DATA 1.36, 0.91, 0.00, -0.76, -1.17
-2050 FOR I=1 TO 5: READ MS(I): NEXT I
-2060 DATA -25.96, -26.09, -26.74, -27.26, -27.55
-2070 X=1/(COS(ZZ)+.025*EXP(-11*COS(ZZ))) : REM air mass
-2080 XM=1/(COS(ZM*RD)+.025*EXP(-11*COS(ZM*RD))) : REM air mass Moon
-2090 IF ZM>90.0 THEN XM=40.0
-2100 XS=1/(COS(ZS*RD)+.025*EXP(-11*COS(ZS*RD))) : REM air mass Sun
-2110 IF ZS>90.0 THEN XS=40.0
-2120 FOR I=1 TO 5
-2130 REM Dark night sky brightness
-2140 BN=BO(I)*(1+.3*COS(6.283*(Y-1992)/11))
-2150 BN=BN*(.4+.6/SQR(1.0-.96*((SIN(ZZ))^2)))
-2160 BN=BN*(10^(-.4*K(I)*X))
-2170 REM Moonlight brightness
-2180 MM=-12.73+.026*ABS(AM)+4E-09*(AM^4) : REM moon mag in V
-2190 MM=MM+CM(I) : REM Moon mag
-2200 C3=10.0^(-.4*K(I)*XM)
-2210 FM=6.2E+07*(RM^(-2))+(10^(6.15-RM/40))
-2220 FM=FM+(10^5.36)*(1.06+((COS(RM*RD))^2))
-2230 BM=10^(-.4*(MM-MO(I)+43.27))
-2240 BM=BM*(1-10^(-.4*K(I)*X))
-2250 BM=BM*(FM*C3+440000.0*(1-C3))
-2260 REM Twilight brightness
-2270 HS=90.0-ZS : REM Height of Sun
-2280 BT=10^(-.4*(MS(I)-MO(I)+32.5-HS-(Z/(360*K(I)))))
-2290 BT=BT*(100/RS)*(1.0-10.0^(-.4*K(I)))
-2300 REM Daylight brightness
-2310 C4=10.0^(-.4*K(I)*XS)
-2320 FS=6.2E+07*(RS^(-2))+(10^(6.15-RS/40))
-2330 FS=FS+(10^5.36)*(1.06+((COS(RS*RD))^2))
-2340 BD=10^(-.4*(MS(I)-MO(I)+43.27))
-2350 BD=BD*(1-10^(-.4*K(I)*X))
-2360 BD=BD*(FS*C4+440000.0*(1-C4))
-2370 REM Total sky brightness
-2380 IF BD>BT THEN GOTO 2410
-2390 B(I)=BN+BD
-2400 GOTO 2420
-2410 B(I)=BN+BT
-2420 IF ZM<90.0 THEN B(I)=B(I)+BM
-2430 NEXT I
-2440 PRINT "Sky brightness (UBVRI):";
-2450 PRINT USING " ##.#^^^^"; B(1), B(2), B(3), B(4), B(5)
-2460 RETURN
-3000 REM Subroutine CT
-3010 FOR I=1 TO 5 : READ DL(I) : NEXT I
-3020 DATA 0.068, 0.098, 0.089, 0.22, 0.24
-3030 FOR I=1 TO 5 : READ RE(I) : NEXT I
-3040 DATA 0.83, 0.86, 0.88, 0.87, 0.90
-3050 FOR I=1 TO 5 : READ TR(I) : NEXT I
-3060 DATA 0.970, 0.983, 0.987, 0.983, 0.980
-3070 FOR I=1 TO 5 : READ TF(I) : NEXT I
-3080 DATA 0.70, 0.70, 0.70, 0.70, 0.70
-3090 REM Seeing
-3100 FOR I=1 TO 5
-3110 X=1.0/(COS(Z/57.28))
-3120 T1=(TS^2)*(X^1.2)*((WA(I)/.55)^(-.4))
-3130 T2=5.54*((3600.0*57.28*(WA(I)/10000.0)/D)^2)
-3140 TT(I)=SQR(T1+T2) : REM TOTAL SEEING FWHM (")
-3150 NEXT I
-3160 REM Efficiencies
-3170 FOR I=1 TO 5
-3180 EF(I)=(Q(I)/100.0)*TF(I)*(RE(I)^NM)*(TR(I)^(2.0*NL))
-3190 F(I)=1-EXP(-2.77*((TA/TT(I))^2)) : REM Fraction in photometry aperture
-3200 NEXT I
-3210 A=(3.14159/4.0)*(D^2-DS^2) : REM Light-collecting area
-3220 REM Source and sky counts
-3230 FOR I=1 TO 5
-3240 IN=10^(-.4*(MA(I)-MO(I)+DM(I)))
-3250 PE=(WA(I)/10000.0)/(6.62E-27*2.997E+10)
-3260 NS(I)=IN*F(I)*A*EF(I)*E*DL(I)*PE
-3270 NB(I)=B(I)*A*EF(I)*E*DL(I)*PE*(TP^2)
-3280 NEXT I
-3290 PRINT : PRINT "Star counts in photometry aperture (UBVRI):";
-3300 PRINT USING " #####."; NS(1), NS(2), NS(3), NS(4), NS(5)
-3310 PRINT "Sky counts per pixel (UBVRI): ";
-3320 PRINT USING " #####."; NB(1), NB(2), NB(3), NB(4), NB(5)
-3330 RETURN
-9991 REM ==============================
-9992 REM FROM "ASTRONOMICAL COMPUTING,"
-9993 REM SKY & TELESCOPE, MAY 1998
-9994 REM ==============================
diff --git a/bwbtest/B15B/ccdlimi2.run b/bwbtest/B15B/ccdlimi2.run
deleted file mode 100644
index c15d35b..0000000
--- a/bwbtest/B15B/ccdlimi2.run
+++ /dev/null
@@ -1,17 +0,0 @@
-Zenith distance (deg.) : ? 30
-Enter V-band magnitude of star: ? 7
-Exposure time (seconds): ? 360
-
-Airmass (gas, aerosol, ozone): 1.15 1.15 1.15
-Extinction Coefficients (UBVRI): 0.62 0.32 0.19 0.09 0.05
-Total Extinction (UBVRI): 0.71 0.37 0.22 0.10 0.05
-Sky brightness (UBVRI): 3.21121e-14 3.85106e-14 6.30832e-14 7.03885e-14
-2.21187e-13
-
-Star counts in photometry aperture (UBVRI): 864817 7865884 17142814 50004318
-22816746
-Sky counts per pixel (UBVRI): 2 9 30 141 304
-
-For star with U, B, V, R, I 8.04 7.70 7.00 6.47 5.88
- their respective SNR are 929.49 2804.46 4140.27 7071.28 4776.48
- with 1-sigma errors (mag.) of 0.00 0.00 0.00 0.00 0.00
diff --git a/bwbtest/B15B/ccdlimit.INP b/bwbtest/B15B/ccdlimit.INP
deleted file mode 100644
index 056d5a4..0000000
--- a/bwbtest/B15B/ccdlimit.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-/
-
-Q
diff --git a/bwbtest/B15B/ccdlimit.bas b/bwbtest/B15B/ccdlimit.bas
deleted file mode 100644
index f3f1500..0000000
--- a/bwbtest/B15B/ccdlimit.bas
+++ /dev/null
@@ -1,80 +0,0 @@
-10 ' Program to compute the signal-to-noise ratio
-20 ' for a stellar image in a CCD camera.
-30 ' Written by Anthony Mallama, September 1992.
-40 '
-50 DIM SN(5) :' PI=3.14159
-60 S0=2000000: ' Star-signal constant (the number of
-70 ' electrons per second for a 0-magnitude
-80 ' star and a 1-inch scope)
-90 SB=18: ' Sky brightness in mag per sq arc second
-100 PS=1.5: ' Pixel size in arc seconds of sky
-110 DD=3: ' Detection diameter in arc seconds
-120 RN=100: ' Readout noise in electrons per pixel
-130 TH=70: ' Thermal electrons/pixel/sec
-140 AP=8: ' Aperture of telescope in inches
-150 ET=100: ' Time before a readout in seconds
-160 PRINT
-170 PRINT "Signal-to-noise ratios for stellar CCD images,"
-180 PRINT "based on:"
-190 PRINT USING " A) #####.# inch aperture scope";AP
-200 PRINT USING " B) #####.# mag per sq arcsec of sky";SB
-210 PRINT USING " C) ####### arcsec detection circle";DD
-220 PRINT USING " D) ####### sec longest single exp.";ET
-230 PRINT USING " E) #####.# arcsec-per-pixel scale";PS
-240 PRINT USING " F) ####### elec/pixel readout noise";RN
-250 PRINT USING " G) ####### thermal elec/pixel/sec";TH
-260 PRINT USING " H) ####### star-signal constant";S0
-270 PRINT " Q) Quit"
-280 PRINT
-290 INPUT "Choose a letter or type '/' to continue";P$
-300 IF P$="A" OR P$="a" THEN INPUT AP
-310 IF P$="B" OR P$="b" THEN INPUT SB
-320 IF P$="C" OR P$="c" THEN INPUT DD
-330 IF P$="D" OR P$="d" THEN INPUT ET
-340 IF P$="E" OR P$="e" THEN INPUT PS
-350 IF P$="F" OR P$="f" THEN INPUT RN
-360 IF P$="G" OR P$="g" THEN INPUT TH
-370 IF P$="H" OR P$="h" THEN INPUT S0
-380 IF P$="Q" OR P$="q" THEN 720
-390 IF P$="/" THEN GOTO 410
-400 GOTO 160
-410 PRINT
-420 AR=PI*(DD/2)^2: 'Detection area in square arcsec
-430 PX=AR/PS^2: 'Detection area in pixels
-440 IF PX>1 GOTO 500
-450 PRINT "Warning: Detection area is less"
-460 PRINT "than 1 pixel. Increase size."
-470 PRINT
-480 INPUT "Press to continue";X$
-490 GOTO 160
-500 EN=DD/10 ' Fraction of star's total image encircled
-510 ' by the detection or measurement area
-520 IF EN>1 THEN EN=1
-530 PRINT " Mag. 1 sec 10s 100s ";
-540 PRINT "1000s 10000s"
-550 FOR M=10 TO 20
-560 L=1/(10^(M/2.5)): ' Luminosity
-570 PRINT USING " ##.#"; M;
-580 FOR I=1 TO 5
-590 S=10^(I-1): ' Exposure time in seconds
-600 SG=L*S*S0*EN*AP^2: ' Signal total
-610 SK=S*S0*AR*AP^2/10^(SB/2.5): ' Sky total
-620 TT=TH*PX*S: ' Thermal total
-630 N=S/ET: ' Total number of frames
-640 IF N<>INT(N) THEN N=INT(N)+1
-650 SN(I)=SG/SQR(SG+TT+SK+N*PX*RN^2)
-660 NEXT I
-670 PRINT USING "######";SN(1);SN(2);SN(3);SN(4);SN(5)
-680 NEXT M
-690 PRINT
-700 INPUT "Press to continue";X$
-710 GOTO 160
-720 END
-730 '
-740 ' This program computes the signal-to-noise (SNR) ratio expected
-750 ' when a CCD camera is used under specific conditions and
-760 ' with a given telescope. Since an SNR of at least 3 is needed
-770 ' for reliable visiblity of a star image, the program can be
-780 ' used to estimate the magnitude limit reached. It was written
-790 ' by Anthony Mallama and appeared in Sky & Telescope for
-800 ' February 1993, page 84.
diff --git a/bwbtest/B15B/ccdlimit.run b/bwbtest/B15B/ccdlimit.run
deleted file mode 100644
index 93c057b..0000000
--- a/bwbtest/B15B/ccdlimit.run
+++ /dev/null
@@ -1,43 +0,0 @@
-
-Signal-to-noise ratios for stellar CCD images,
-based on:
- A) 8.0 inch aperture scope
- B) 18.0 mag per sq arcsec of sky
- C) 3 arcsec detection circle
- D) 100 sec longest single exp.
- E) 1.5 arcsec-per-pixel scale
- F) 100 elec/pixel readout noise
- G) 70 thermal elec/pixel/sec
- H) 2000000 star-signal constant
- Q) Quit
-
-Choose a letter or type '/' to continue? /
-
- Mag. 1 sec 10s 100s 1000s 10000s
- 10.0 20 143 577 1824 5769
- 11.0 8 69 332 1050 3320
- 12.0 3 30 176 556 1757
- 13.0 1 13 84 265 839
- 14.0 1 5 37 116 368
- 15.0 0 2 15 48 153
- 16.0 0 1 6 20 62
- 17.0 0 0 2 8 25
- 18.0 0 0 1 3 10
- 19.0 0 0 0 1 4
- 20.0 0 0 0 0 2
-
-Press to continue?
-
-Signal-to-noise ratios for stellar CCD images,
-based on:
- A) 8.0 inch aperture scope
- B) 18.0 mag per sq arcsec of sky
- C) 3 arcsec detection circle
- D) 100 sec longest single exp.
- E) 1.5 arcsec-per-pixel scale
- F) 100 elec/pixel readout noise
- G) 70 thermal elec/pixel/sec
- H) 2000000 star-signal constant
- Q) Quit
-
-Choose a letter or type '/' to continue? Q
diff --git a/bwbtest/B15B/chance.INP b/bwbtest/B15B/chance.INP
deleted file mode 100644
index 96db77c..0000000
--- a/bwbtest/B15B/chance.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-1.1
-2.2
diff --git a/bwbtest/B15B/chance.bas b/bwbtest/B15B/chance.bas
deleted file mode 100644
index d200392..0000000
--- a/bwbtest/B15B/chance.bas
+++ /dev/null
@@ -1,80 +0,0 @@
-10 ' Poisson Distribution
-20 ' by Mark Gingrich
-30 MP=.1
-40 A1$="Probability (and odds) of..."
-50 A2$="# events fewer than"
-60 A3$="exactly greater than"
-70 A4$=" (n) n events "
-80 A5$="n events n events "
-90 A6$ = "-------------------------"
-100 A7$=" "
-110 '
-120 ' Get input and print header
-130 PRINT:PRINT
-140 INPUT "Event rate (lambda)";L
-150 INPUT "Interval (t)";T
-160 IF EXP(-L*T)>0 THEN 190
-170 PRINT "Sorry, out of range"
-180 GOTO 420
-190 PRINT:PRINT SPC(29); A1$
-200 PRINT:PRINT A2$;A7$;A3$
-210 PRINT A4$;A7$;A5$
-220 PRINT A6$;A6$;A6$
-230 '
-240 ' Initialize loop variables
-250 N=0
-260 MU=L*T
-270 PF=0: ' Prob of fewer than n
-280 PE=100*EXP(-MU): ' Prob of exactly n
-290 '
-300 ' Compute Probabilities (and odds)
-310 '
-320 PG=100-PF-PE: ' Prob of greater than n
-330 IF PG>99.999 THEN 380
-340 PRINT USING " ##"; N;
-350 P=PF: C=13: GOSUB 440
-360 P=PE: C=34: GOSUB 440
-370 P=PG: C=55: GOSUB 440: PRINT
-380 N=N+1
-390 PF=PF+PE
-400 PE=PE*MU/N
-410 IF PG>=MP THEN 320
-420 END
-430 '
-440 ' Print probability (and odds)
-450 PRINT TAB(C);
-460 IF P>.001 AND P<99.999 THEN 480
-470 PRINT " - - -";: GOTO 560
-480 PRINT USING "###.#% (";P;
-490 IF P>50 THEN 530
-500 PRINT " 1 :";
-510 V=((100-P)/P)
-520 GOSUB 580: GOTO 550
-530 V=(P/(100-P))
-540 GOSUB 580: PRINT ": 1 ";
-550 PRINT ")";
-560 RETURN
-570 '
-580 ' Format odds
-590 IF V>=9.5 THEN 620
-600 PRINT USING " #.# ";V;
-610 GOTO 630
-620 PRINT INT(V+.5);
-630 RETURN
-640 '
-650 ' Poisson statistics are used to
-660 ' predict how likely it is for bunches or
-670 ' gaps to occur in a stream of random
-680 ' events, such as appearances of bright
-690 ' comets, novae, cosmic rays, meteors, or
-700 ' even the way stars are sprinkled across
-710 ' a section of sky. By comparing this
-720 ' program's output to actual
-730 ' observations, it is often possible to
-740 ' decide whether the events of a given
-750 ' class do, in fact, have a random
-760 ' distribution in time or space. Mark
-770 ' Gingrich explores this subject in his
-780 ' article, "Great Comets, Novae, and Lady
-790 ' Luck," in Sky & Telescope for June
-800 ' 1995, pages 86-89.
diff --git a/bwbtest/B15B/chance.run b/bwbtest/B15B/chance.run
deleted file mode 100644
index 0dcb230..0000000
--- a/bwbtest/B15B/chance.run
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-Event rate (lambda)? 1.1
-Interval (t)? 2.2
-
- Probability (and odds) of...
-
-# events fewer than exactly greater than
- (n) n events n events n events
----------------------------------------------------------------------------
- 0 - - - 8.9% ( 1 : 10 ) 91.1% ( 10 : 1 )
- 1 8.9% ( 1 : 10 ) 21.5% ( 1 : 3.6 ) 69.6% ( 2.3 : 1 )
- 2 30.4% ( 1 : 2.3 ) 26.0% ( 1 : 2.8 ) 43.6% ( 1 : 1.3 )
- 3 56.4% ( 1.3 : 1 ) 21.0% ( 1 : 3.8 ) 22.5% ( 1 : 3.4 )
- 4 77.5% ( 3.4 : 1 ) 12.7% ( 1 : 6.9 ) 9.8% ( 1 : 9.2 )
- 5 90.2% ( 9.2 : 1 ) 6.2% ( 1 : 15 ) 3.7% ( 1 : 26 )
- 6 96.3% ( 26 : 1 ) 2.5% ( 1 : 39 ) 1.2% ( 1 : 82 )
- 7 98.8% ( 82 : 1 ) 0.9% ( 1 : 116 ) 0.4% ( 1 : 284 )
- 8 99.6% ( 284 : 1 ) 0.3% ( 1 : 384 ) 0.1% ( 1 : 1095 )
diff --git a/bwbtest/B15B/chart.INP b/bwbtest/B15B/chart.INP
deleted file mode 100644
index b36c1c4..0000000
--- a/bwbtest/B15B/chart.INP
+++ /dev/null
@@ -1,5 +0,0 @@
-8
-45
-+
-30
-45
diff --git a/bwbtest/B15B/chart.bas b/bwbtest/B15B/chart.bas
deleted file mode 100644
index f550739..0000000
--- a/bwbtest/B15B/chart.bas
+++ /dev/null
@@ -1,93 +0,0 @@
-100 REM CHART NUMBER PROGRAM
-110 REM
-120 PRINT
-130 PRINT "Enter 2000.0 position"
-140 PRINT
-150 INPUT "R.A. hrs.";H
-160 IF H<0 OR H>=24 THEN 150
-170 INPUT "R.A. min.";M
-180 IF M<0 OR M>=60 THEN 170
-190 H=H+M/60
-200 PRINT
-210 INPUT " + or - ";D$
-220 IF LEN(D$)>1 THEN 210
-230 INPUT "DEC. degrees";D
-240 IF D<0 OR D>90 THEN 230
-250 INPUT "DEC. min. ";M
-260 IF M<0 OR M>=60 THEN 250
-270 D=D+M/60
-280 IF D$="-" THEN D=-D
-290 REM
-300 REM
-310 REM SKY ATLAS 2000.0
-320 REM
-330 IF ABS(D)>=18.5 THEN 370
-340 S=9+INT(H/3+1/1.2)
-350 IF S=9 THEN S=17
-360 GOTO 460
-370 IF ABS(D)>=52 THEN 410
-380 S=4+INT(H/4)
-390 IF D<0 THEN S=S+14
-400 GOTO 460
-410 S=1+INT(H/8)
-420 IF D<0 THEN S=S+23
-430 REM
-440 REM URANOMETRIA 2000.0
-450 REM
-460 IF ABS(D)>=5.5 THEN 510
-470 U=215+INT(H*1.875+.5)
-480 IF U=260 THEN U=215
-490 V$="Volume I & II"
-500 GOTO 900
-510 IF D>0 THEN V$="Volume I"
-520 IF D<0 THEN V$="Volume II"
-530 IF ABS(D)>=50 THEN 730
-540 IF ABS(D)>=28 THEN 640
-550 IF ABS(D)>=17 THEN 600
-560 U=170+INT(H*1.875+.5):
-570 IF U=215 THEN U=170
-580 IF D<0 THEN U=U+90
-590 GOTO 900
-600 U=125+INT(H*1.875+.5)
-610 IF U=170 THEN U=125
-620 IF D<0 THEN U=U+180
-630 GOTO 900
-640 IF ABS(D)>=39 THEN 690
-650 U=89+INT(H*1.5+.5)
-660 IF U=125 THEN U=89
-670 IF D<0 THEN U=U+261
-680 GOTO 900
-690 U=59+INT(H/.8+.5)
-700 IF U=89 THEN U=59
-710 IF D<0 THEN U=U+327
-720 GOTO 900
-730 IF ABS(D)>=72.5 THEN 830
-740 IF ABS(D)>=61 THEN 790
-750 U=35+INT(H+.5)
-760 IF U=59 THEN U=35
-770 IF D<0 THEN U=U+381
-780 GOTO 900
-790 U=15+INT(H/1.2+.5)
-800 IF U=35 THEN U=15
-810 IF D<0 THEN U=U+425
-820 GOTO 900
-830 IF ABS(D)>=84.5 THEN 880
-840 U=3+INT(H/2+1/2.4)
-850 IF U=15 THEN U=3
-860 IF D<0 THEN U=U+457
-870 GOTO 900
-880 U=1+INT(H/12)
-890 IF D<0 THEN U=474-U
-900 PRINT: PRINT
-910 PRINT "SKY ATLAS 2000.0 --"
-920 PRINT " Chart ";S
-930 PRINT
-940 PRINT "URANOMETRIA 2000.0 --"
-950 PRINT " Chart ";U;" in ";V$
-960 PRINT
-970 REM ************************
-975 REM FROM SKY & TELESCOPE'S
-980 REM ASTRONOMICAL COMPUTING
-985 REM FOR APRIL, 1989, P. 420
-990 REM ************************
-995 END
diff --git a/bwbtest/B15B/chart.run b/bwbtest/B15B/chart.run
deleted file mode 100644
index 29393e1..0000000
--- a/bwbtest/B15B/chart.run
+++ /dev/null
@@ -1,17 +0,0 @@
-
-Enter 2000.0 position
-
-R.A. hrs.? 8
-R.A. min.? 45
-
- + or - ? +
-DEC. degrees? 30
-DEC. min. ? 45
-
-
-SKY ATLAS 2000.0 --
- Chart 6
-
-URANOMETRIA 2000.0 --
- Chart 102 in Volume I
-
diff --git a/bwbtest/B15B/circle.INP b/bwbtest/B15B/circle.INP
deleted file mode 100644
index bbd2775..0000000
--- a/bwbtest/B15B/circle.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-200
-N
diff --git a/bwbtest/B15B/circle.bas b/bwbtest/B15B/circle.bas
deleted file mode 100644
index c51a3f9..0000000
--- a/bwbtest/B15B/circle.bas
+++ /dev/null
@@ -1,47 +0,0 @@
-10 REM CIRCLE-DIVIDING PROGRAM
-12 REM
-14 N=9: DIM P1(N), P2(N)
-16 I0=180: C$=CHR$(27)+"3"+CHR$(1)
-18 H=8: REM MINIMUM VERTICAL
-20 REM LETTER SPACE IN MM
-22 DATA 4,6,9,12,18,36,72,180,360
-24 FOR I=1 TO N: READ P1(I): NEXT
-26 DATA 9,6,8,6,4,5,10,8,6
-28 FOR I=1 TO N: READ P2(I): NEXT
-30 REM
-32 INPUT "SCALE LENGTH (MM)";S
-34 IF S<30 THEN 32
-36 I1=0
-38 I1=I1+1: IF I1=N THEN 42
-40 IF S>=P1(I1)*H THEN 38
-42 PRINT "PRINTING...": LPRINT C$
-44 FOR I=1 TO I0/4: LPRINT: NEXT
-46 LPRINT S;" MM STRIP DIVIDED ";
-48 LPRINT "INTO ";P1(I1);" PARTS"
-50 FOR I=1 TO I0/4: LPRINT: NEXT
-52 REM
-54 REM PRINTING LOOP
-55 REM SET UP FOR DOT-MATRIX PRINTERS
-56 W=0: S0=INT(360/P1(I1))
-58 S1=S*I0/(25.4*360)
-60 FOR I=0 TO 360 STEP S0
-62 B=INT(I*S1-W): F=W
-64 FOR J=0 TO P2(I1)
-66 I3=INT(J*B/P2(I1)-F)
-68 IF I3<0 THEN 76
-70 FOR K=1 TO I3: LPRINT: NEXT K
-72 IF I3<=0 OR J>=P2(I1) THEN 76
-74 LPRINT " -";
-76 F=F+I3
-78 NEXT J
-80 LPRINT USING " #### --";I;
-82 W=W+B
-84 NEXT I
-86 FOR I=1 TO I0/4: LPRINT: NEXT
-88 INPUT "ANOTHER (Y/N)";Q$
-90 IF Q$="Y" THEN 32
-92 END
-94 REM *************************
-96 REM ASTRONOMICAL COMPUTING
-97 REM SKY & TELESCOPE, MARCH 88
-98 REM *************************
diff --git a/bwbtest/B15B/circle.run b/bwbtest/B15B/circle.run
deleted file mode 100644
index a565ffe..0000000
--- a/bwbtest/B15B/circle.run
+++ /dev/null
@@ -1,3 +0,0 @@
-SCALE LENGTH (MM)? 200
-PRINTING...
-ANOTHER (Y/N)? N
diff --git a/bwbtest/B15B/comet.INP b/bwbtest/B15B/comet.INP
deleted file mode 100644
index 8f9ddd6..0000000
--- a/bwbtest/B15B/comet.INP
+++ /dev/null
@@ -1,8 +0,0 @@
-2000,01,31
-1.2
-0.9
-4.5
-6.7
-8.9
-2015,03,01
-N
diff --git a/bwbtest/B15B/comet.bas b/bwbtest/B15B/comet.bas
deleted file mode 100644
index 10c02e7..0000000
--- a/bwbtest/B15B/comet.bas
+++ /dev/null
@@ -1,240 +0,0 @@
-5 GOSUB 69: GOTO 200
-10 REM KEPLER'S EQUATION
-11 REM
-12 P1=3.14159265: R1=180/P1
-13 K=0.01720209895
-18 IF E0>=0.95 THEN GOTO 40
-19 IF E0>=1 THEN 85
-20 A1=Q/(1-E0): M=K*T*A1^(-1.5)
-21 REM
-22 REM BINARY SEARCH
-23 REM
-24 F=SGN(M): M=ABS(M)/(2*P1)
-25 M=(M-INT(M))*2*P1*F
-26 IF M<0 THEN M=M+2*P1
-27 F=1: IF M>P1 THEN F=-1
-28 IF M>P1 THEN M=2*P1-M
-29 E=P1/2: D=P1/4
-30 FOR I1=1 TO 23
-31 M1=E-E0*SIN(E)
-32 E=E+SGN(M-M1)*D: D=D/2
-33 NEXT I1
-34 V=SQR((1+E0)/(1-E0)): E=E*F
-35 V=2*ATN(V*SIN(E/2)/COS(E/2))
-36 R=A1*(1-E0*COS(E))
-38 GOTO 81
-39 REM
-40 REM GAUSS METHOD
-41 REM
-43 A=SQR((1+9*E0)/10)
-44 B=5*(1-E0)/(1+9*E0)
-45 C=SQR(5*(1+E0)/(1+9*E0))
-46 B1=3*A*K*T/SQR(2*Q*Q*Q)
-47 B2=1: REM INITIAL VALUE
-48 W1=B2*B1: B3=ATN(2/W1)
-49 T1=SIN(B3/2)/COS(B3/2)
-50 S1=SGN(T1): T1=ABS(T1)
-51 T2=T1^(1/3)*S1: G=ATN(T2)
-52 S=2*COS(2*G)/SIN(2*G)
-53 A2=B*S*S: B0=B2: B2=0
-54 IF ABS(A2)>0.3 THEN 19
-55 FOR J=0 TO 7
-56 B2=B2+B(J)*A2^J
-57 NEXT J
-58 IF ABS(B2-B0)>1E-8 THEN 48
-59 C1=0
-60 FOR J=0 TO 7
-61 C1=C1+S(J)*A2^J
-62 NEXT J
-63 C1=SQR(1/C1)
-64 V1=C*C1*S: D1=1/(1+A2*C1*C1)
-65 V=2*ATN(V1): R=Q*D1*(1+V1*V1)
-67 GOTO 81
-68 REM
-69 REM COEFFICIENTS
-70 FOR J=0 TO 7: READ B(J): NEXT
-71 FOR J=0 TO 7: READ S(J): NEXT
-72 RETURN
-73 DATA 1,0,-0.017142857
-74 DATA -0.003809524, -0.001104267
-75 DATA -0.000367358,-0.000131675
-76 DATA -0.000049577,1,-0.8
-77 DATA 0.04571429,0.01523810
-78 DATA 0.00562820, 0.00218783
-79 DATA 0.00087905,0.00036155
-80 RETURN
-81 IF V<0 THEN V=V+2*P1
-84 GOTO 86
-85 PRINT "OUT OF RANGE"
-86 RETURN
-200 REM COMET POSITION IN SKY
-203 REM
-206 PRINT "PERI DATE ";
-207 GOSUB 800: J9=J: F9=F
-208 INPUT "PERI DIST Q ";Q
-209 INPUT "ECCENTRICITY ";E0
-212 INPUT "ARG OF PERIHELION ";W
-215 INPUT "LONG OF ASC NODE ";N
-218 INPUT "INCLINATION ";I
-233 P1=3.14159265: R1=P1/180
-236 E=23.4457889*R1: REM OBLIQUITY
-239 W=W*R1: N=N*R1: I=I*R1
-242 GOSUB 338
-245 PRINT
-246 PRINT "DATE ";
-247 GOSUB 800: J1=J: F1=F
-248 GOSUB 500: T=(J1-J9)+(F1-F9)
-249 GOSUB 10
-251 REM POSITION IN ORBIT PLANE
-254 X1=R*COS(V): Y1=R*SIN(V)
-257 REM
-260 REM HELIOCENTRIC EQUATORIAL
-261 REM COORDINATES
-263 X2=P7*X1+Q7*Y1
-266 Y2=P8*X1+Q8*Y1
-269 Z2=P9*X1+Q9*Y1
-272 REM
-275 REM GEOCENTRIC EQUATORIAL
-276 REM COORDINATES
-278 X3=X+X2: Y3=Y+Y2: Z3=Z+Z2
-281 GOSUB 392: REM FOR 2000.0!
-284 D3=SQR(X3*X3+Y3*Y3+Z3*Z3)
-287 R1=P1/180
-290 A=ATN(Y3/X3)/(15*R1)
-293 IF X3<0 THEN A=A+12
-296 IF A<0 THEN A=A+24
-299 D=ATN(Z3/SQR(X3*X3+Y3*Y3))/R1
-301 REM NOW ROUND OFF
-302 A=A+0.05/60
-305 H=INT(A): M=60*(A-H)
-308 M=INT(10*M)/10
-311 S=SGN(D): D=ABS(D)+0.5/60
-314 D1=INT(D): M1=INT(60*(D-D1))
-317 S$="+": IF S=-1 THEN S$="-"
-320 PRINT "R.A. ";H;"H ";M;"M"
-323 PRINT "DEC. ";S$;D1;"D ";M1;"M"
-326 PRINT "COMET-EARTH DIST:";D3
-329 PRINT "COMET-SUN DIST: ";R
-330 INPUT "ANOTHER (Y OR N) ";Q$
-331 IF Q$="Y" THEN 245
-332 END
-335 REM
-338 REM P'S AND Q'S
-344 W1=SIN(W): W2=COS(W)
-347 N1=SIN(N): N2=COS(N)
-350 I1=SIN(I): I2=COS(I)
-353 E1=SIN(E): E2=COS(E)
-356 P7=W2*N2-W1*N1*I2
-359 P8=(W2*N1+W1*N2*I2)*E2
-362 P8=P8-W1*I1*E1
-365 P9=(W2*N1+W1*N2*I2)*E1
-368 P9=P9+W1*I1*E2
-371 Q7=-W1*N2-W2*N1*I2
-374 Q8=(-W1*N1+W2*N2*I2)*E2
-377 Q8=Q8-W2*I1*E1
-380 Q9=(-W1*N1+W2*N2*I2)*E1
-383 Q9=Q9+W2*I1*E2
-386 RETURN
-389 REM
-392 REM 1950.0 --> 2000.0
-395 A7=+0.9999257: A8=-0.0111789
-398 A9=-0.0048590: B7=+0.0111789
-401 B8=+0.9999375: B9=-0.0000272
-404 C7=+0.0048590: C8=-0.0000272
-407 C9=+0.9999882
-410 X4=A7*X3+A8*Y3+A9*Z3
-413 Y4=B7*X3+B8*Y3+B9*Z3
-416 Z4=C7*X3+C8*Y3+C9*Z3
-419 X3=X4: Y3=Y4: Z3=Z4
-422 RETURN
-500 REM X,Y,Z OF THE SUN
-501 REM (EQUINOX 1950.0)
-502 REM
-504 J8=J-2415020: R1=3.14159265/180
-505 T=(J8+F)/36525
-506 P0=1.396041+0.000308*(T+0.5)
-507 P0=P0*(T-0.499998)
-508 A=100:GOSUB 529:G0=A+358.475833
-509 L0=A+279.696678-P0
-510 A=1336: GOSUB 529
-511 C0=A+270.434164-P0
-512 A=162: GOSUB 529
-513 V0=A+212.603219
-514 A=53:GOSUB 529: M0=A+319.529425
-515 A=8: GOSUB 529: J0=A+225.444651
-516 G=G0+T*(-0.950250-0.000150*T)
-517 C=C0+T*(307.883142-0.001133*T)
-518 L=L0+T*(0.768920+0.000303*T)
-519 V=V0+T*(197.803875+0.001286*T)
-520 M=M0+T*(59.8585+0.000181*T)
-521 J=J0+T*154.906654
-522 G=G*R1: C=C*R1: L=L*R1
-523 V=V*R1: M=M*R1: J=J*R1
-524 GOSUB 532
-528 RETURN
-529 REM NORMALIZATION
-530 A=360*(A*T-INT(A*T)): RETURN
-531 REM
-532 X=0.000011*COS(2*G-L-2*J)
-533 X=X+0.000011*COS(2*G+L-2*V)
-534 X=X-0.000012*COS(G+L-V)
-535 X=X-0.000012*COS(4*G-L-8*M+3*J)
-536 X=X+0.000012*COS(4*G+L-8*M+3*J)
-537 X=X-0.000014*COS(C-2*L)
-538 X=X+0.000017*COS(C)
-539 X=X+0.000018*SIN(2*G+L-2*V)
-540 X=X-0.000021*T*COS(G+L)
-541 X=X-0.000026*SIN(G-L-J)
-542 X=X+0.000035*COS(2*G-L)
-543 X=X+0.000063*T*COS(G-L)
-544 X=X+0.000105*COS(2*G+L)
-545 X=X+0.008374*COS(G+L)
-546 X=X-0.025127*COS(G-L)
-547 X=X+0.999860*COS(L)
-548 REM
-549 Y=0.000010*SIN(2*G+L-2*V)
-550 Y=Y-0.000010*SIN(2*G-L-2*J)
-551 Y=Y-0.000011*SIN(G+L-V)
-552 Y=Y+0.000011*SIN(4*G-L-8*M+3*J)
-553 Y=Y+0.000011*SIN(4*G+L-8*M+3*J)
-554 Y=Y+0.000013*SIN(C-2*L)
-555 Y=Y+0.000016*SIN(C)
-556 Y=Y-0.000017*COS(2*G+L-2*V)
-557 Y=Y-0.000019*T*SIN(G+L)
-558 Y=Y-0.000024*COS(G-L-J)
-559 Y=Y-0.000032*SIN(2*G-L)
-560 Y=Y-0.000057*T*SIN(G-L)
-561 Y=Y+0.000097*SIN(2*G+L)
-562 Y=Y+0.007683*SIN(G+L)
-563 Y=Y+0.023053*SIN(G-L)
-564 Y=Y+0.917308*SIN(L)
-565 REM
-566 Z=-0.000010*COS(G-L-J)
-567 Z=Z-0.000014*SIN(2*G-L)
-568 Z=Z-0.000025*T*SIN(G-L)
-569 Z=Z+0.000042*SIN(2*G+L)
-570 Z=Z+0.003332*SIN(G+L)
-571 Z=Z+0.009998*SIN(G-L)
-572 Z=Z+0.397825*SIN(L)
-573 RETURN
-800 REM CALENDAR --> JD
-805 REM
-810 INPUT "Y,M,D ";Y,M,D
-815 G=1
-820 D1=INT(D): F=D-D1-0.5
-825 J=-INT(7*(INT((M+9)/12)+Y)/4)
-830 IF G=0 THEN 850
-835 S=SGN(M-9): A=ABS(M-9)
-840 J3=INT(Y+S*INT(A/7))
-845 J3=-INT((INT(J3/100)+1)*3/4)
-850 J=J+INT(275*M/9)+D1+G*J3
-855 J=J+1721027+2*G+367*Y
-860 IF F>=0 THEN 870
-865 F=F+1: J=J-1
-870 RETURN
-875 END
-880 REM ------------------------
-890 REM APPEARED IN ASTRONOMICAL
-900 REM COMPUTING, SKY & TELE-
-910 REM SCOPE, DECEMBER, 1985
-920 REM ------------------------
diff --git a/bwbtest/B15B/comet.run b/bwbtest/B15B/comet.run
deleted file mode 100644
index 4001d7e..0000000
--- a/bwbtest/B15B/comet.run
+++ /dev/null
@@ -1,13 +0,0 @@
-PERI DATE Y,M,D ? 2000,01,31
-PERI DIST Q ? 1.2
-ECCENTRICITY ? 0.9
-ARG OF PERIHELION ? 4.5
-LONG OF ASC NODE ? 6.7
-INCLINATION ? 8.9
-
-DATE Y,M,D ? 2015,03,01
-R.A. 12 H 25.9 M
-DEC. - 2 D 31 M
-COMET-EARTH DIST: 20.7833
-COMET-SUN DIST: 21.6701
-ANOTHER (Y OR N) ? N
diff --git a/bwbtest/B15B/crater.INP b/bwbtest/B15B/crater.INP
deleted file mode 100644
index 1c858dc..0000000
--- a/bwbtest/B15B/crater.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-543
-12.34
-5000
-67
diff --git a/bwbtest/B15B/crater.bas b/bwbtest/B15B/crater.bas
deleted file mode 100644
index 6e2df35..0000000
--- a/bwbtest/B15B/crater.bas
+++ /dev/null
@@ -1,36 +0,0 @@
-10 REM - IMPACT CRATER DIMENSIONS
-20 CLS ' : PI=3.14159
-30 CR1=18: CD1=9
-40 PRINT "Terrestrial Impact Crater"
-50 INPUT " Impactor diameter (m)";ID
-60 INPUT " Impactor density (kg/m^3)";IR
-70 INPUT " Impactor velocity (km/s)";IK
-80 INPUT " Graze angle (deg. from horiz.)";GA
-90 IV=IK*1000: VI=PI*ID*ID*ID/6
-100 GF=(SIN(GA/180*PI))^.33
-110 MI=IR*VI: KE=.5*MI*IV*IV
-120 KT=KE/4.2E+12: REM impactor KE in kT TNT
-130 PRINT: PRINT "Impactor Parameters"
-140 PRINT USING " Volume ##.##^^^^ m^3"; VI
-150 PRINT USING " Mass ##.##^^^^ kg"; MI
-160 PRINT USING " KE ##.##^^^^ J"; KE
-170 PRINT USING " ##.##^^^^ kT TNT"; KT
-180 CD=2*CR1*KT^.3*GF: CA=CD*1.25
-190 CZ=CD1*KT^.3*GF: CL=CZ*1.25
-200 CV=.5*PI*CD*CD/4*CZ
-210 CE=2.15*CD
-220 PRINT: PRINT "Crater Parameters"
-230 PRINT " Diameter --"
-240 PRINT USING " Actual ###### m"; CD
-250 PRINT USING " Apparent ###### m"; CA
-260 PRINT " Depth --"
-270 PRINT USING " Actual ##### m"; CZ
-280 PRINT USING " Apparent ##### m"; CL
-290 PRINT USING " Target removed ##.##^^^^ m^3"; CV
-300 PRINT USING " Ejecta spread ###### m"; CE
-310 REM ========================
-320 REM FROM "ASTRONOMICAL
-330 REM COMPUTING," SKY & TELE-
-340 REM SCOPE, NOVEMBER 1996
-350 REM ========================
-360 END
diff --git a/bwbtest/B15B/crater.run b/bwbtest/B15B/crater.run
deleted file mode 100644
index 4d96da2..0000000
--- a/bwbtest/B15B/crater.run
+++ /dev/null
@@ -1,21 +0,0 @@
-Terrestrial Impact Crater
- Impactor diameter (m)? 543
- Impactor density (kg/m^3)? 12.34
- Impactor velocity (km/s)? 5000
- Graze angle (deg. from horiz.)? 67
-
-Impactor Parameters
- Volume 8.382974e+07 m^3
- Mass 1.034459e+09 kg
- KE 1.293074e+22 J
- 3.078747e+09 kT TNT
-
-Crater Parameters
- Diameter --
- Actual 24600 m
- Apparent 30751 m
- Depth --
- Actual 6150 m
- Apparent 7688 m
- Target removed 1.461604e+12 m^3
- Ejecta spread 52891 m
diff --git a/bwbtest/B15B/daysold.INP b/bwbtest/B15B/daysold.INP
deleted file mode 100644
index 4b11972..0000000
--- a/bwbtest/B15B/daysold.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-01,02,1903
-128000
-0
diff --git a/bwbtest/B15B/daysold.bas b/bwbtest/B15B/daysold.bas
deleted file mode 100644
index 50bba24..0000000
--- a/bwbtest/B15B/daysold.bas
+++ /dev/null
@@ -1,33 +0,0 @@
-10 REM DAYSOLD.BAS
-20 INPUT "Enter your birthday (M,D,Y)";M,D,Y
-30 REM Compute Julian Day Number
-40 J=-INT(7*(INT((M+9)/12)+Y)/4)
-50 S=SGN(M-9)
-60 A=ABS(M-9)
-70 J1=INT(Y+S*INT(A/7))
-80 J1=-INT((INT(J1/100)+1)*3/4)
-90 J=J+INT(275*M/9)+D+J1
-100 J=J+1721028+367*Y
-110 INPUT "Enter desired age in days ";A9
-120 IF A9=0 THEN 280
-130 REM Compute calendar date from new JD number
-140 J2=J+A9+1
-150 A1=INT((J2/36524.25)-51.12264)
-160 A=J2+1+A1-INT(A1/4)
-170 B=A+1524
-180 C=INT((B/365.25)-0.3343)
-190 D=INT(365.25*C)
-200 E=INT((B-D)/30.61)
-210 D=B-D-INT(30.61*E)
-220 M=E-1
-230 Y=C-4716
-240 IF E>13.5 THEN M=M-12
-250 IF M<2.5 THEN Y=Y+1
-260 PRINT USING "You will be ##### days old on ##/##/####";A9;M;D;Y
-270 GOTO 110
-280 END
-900 REM ---------------------------
-910 REM APPEARED IN COMPUTERS IN
-920 REM ASTRONOMY, SKY & TELESCOPE,
-930 REM NOVEMBER 2001, PAGE 63
-940 REM ---------------------------
diff --git a/bwbtest/B15B/daysold.run b/bwbtest/B15B/daysold.run
deleted file mode 100644
index d116356..0000000
--- a/bwbtest/B15B/daysold.run
+++ /dev/null
@@ -1,4 +0,0 @@
-Enter your birthday (M,D,Y)? 01,02,1903
-Enter desired age in days ? 128000
-You will be 128000 days old on 6/15/2253
-Enter desired age in days ? 0
diff --git a/bwbtest/B15B/dial.INP b/bwbtest/B15B/dial.INP
deleted file mode 100644
index 03a5247..0000000
--- a/bwbtest/B15B/dial.INP
+++ /dev/null
@@ -1,8 +0,0 @@
-180,80
-6
-123
-W
-6
-5
-2
-N
diff --git a/bwbtest/B15B/dial.bas b/bwbtest/B15B/dial.bas
deleted file mode 100644
index 5509f09..0000000
--- a/bwbtest/B15B/dial.bas
+++ /dev/null
@@ -1,78 +0,0 @@
-10 REM VERTICAL SUNDIALS
-11 INPUT "LAT, LONG ";B,L
-12 IF B<0 THEN 11
-13 INPUT "TIME-ZONE MERIDIAN";L0
-14 INPUT "AZIMUTH DIAL FACES";F
-15 IF F<=90 OR F>=270 THEN 14
-16 P1=3.14159265: R1=P1/180
-17 B1=B*R1: S=0
-18 INPUT "SUN E OR W";S$
-19 IF S$="E" THEN S=-1
-20 IF S$="W" THEN S=1
-21 IF S=0 THEN 18
-22 INPUT "DIAL HEIGHT";H5
-23 INPUT "WIDTH OF THIS PART";W5
-24 INPUT "STEP SIZE IN MIN";G
-25 F1=P1/2+S*R1*(180-F): PRINT
-26 R5=W5/H5: Z5=S*R1*(L0-L)
-27 PRINT "LAT: ";B;" LONG: ";L;
-28 PRINT " MERID: ";L0
-29 PRINT "DIAL FACES AZIMUTH ";F
-30 GOSUB 73
-31 PRINT "SUN ";S$;" ";W5;
-32 PRINT "WIDE BY";H5;"HIGH"
-33 PRINT: H=12-S: G=S*G/60
-34 REM
-35 REM CALCULATING LOOP
-36 Q=Z5+S*P1*(H-12)/12
-37 IF Q<0 THEN 47
-38 IF H<4 OR H>20 THEN 48
-39 IF Q<>0 THEN 41
-40 K=0: GOTO 45
-41 K0=SIN(F1)*TAN(P1/2-Q)
-42 K1=COS(F1)*SIN(B1)+K0
-43 IF K1=0 THEN K1=1E-10
-44 K=COS(B1)/K1
-45 GOSUB 52
-46 IF K>=0 THEN GOSUB 57
-47 H=H+G: GOTO 35
-48 PRINT
-49 INPUT "AGAIN (Y OR N)";Q$
-50 S=0: IF Q$="Y" THEN 18
-51 END
-52 REM DECIDE X OR Y
-53 D=S*K*H5: D$=" X="
-54 IF K12 THEN 66
-65 IF M1=0 THEN P$=" NOON"
-66 IF H1>12 THEN H1=H1-12
-67 H1$=STR$(H1)
-68 IF H1<10 THEN H1$=" "+H1$
-69 D=INT(D*1000+0.5)/1000
-70 PRINT H1$;M1$;P$;
-71 PRINT TAB(15);D$;D
-72 RETURN
-73 REM COMPUTE END OF STYLE
-74 P5=TAN(P1/2-B1)*H5
-75 Z=SIN(F1)*P5
-76 Z=INT(Z*1000+0.5)/1000
-77 X=S*TAN(P1/2-F1)*Z
-78 X=INT(X*1000+0.5)/1000
-79 Y=-H5
-80 PRINT "STYLE END COORDINATES:"
-81 PRINT "X=";X;", Y=";Y;", Z=";Z
-82 RETURN
-83 REM *************************
-84 REM FROM "ASTRONOMICAL COM-
-85 REM PUTING," SKY & TELESCOPE
-86 REM DECEMEBR, 1987
-87 REM *************************
diff --git a/bwbtest/B15B/dial.run b/bwbtest/B15B/dial.run
deleted file mode 100644
index b049a45..0000000
--- a/bwbtest/B15B/dial.run
+++ /dev/null
@@ -1,16 +0,0 @@
-LAT, LONG ? 180,80
-TIME-ZONE MERIDIAN? 6
-AZIMUTH DIAL FACES? 123
-SUN E OR W? W
-DIAL HEIGHT? 6
-WIDTH OF THIS PART? 5
-STEP SIZE IN MIN? 2
-
-LAT: 180 LONG: 80 MERID: 6
-DIAL FACES AZIMUTH 123
-STYLE END COORDINATES:
-X= 2.80352E+9 , Y=-6 , Z=-1.82063E+9
-SUN W 5 WIDE BY 6 HIGH
-
-
-AGAIN (Y OR N)? N
diff --git a/bwbtest/B15B/difpat.INP b/bwbtest/B15B/difpat.INP
deleted file mode 100644
index 84315dc..0000000
--- a/bwbtest/B15B/difpat.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-2
-Y
diff --git a/bwbtest/B15B/difpat.bas b/bwbtest/B15B/difpat.bas
deleted file mode 100644
index 338eb56..0000000
--- a/bwbtest/B15B/difpat.bas
+++ /dev/null
@@ -1,73 +0,0 @@
-10 REM DIFFRACTION PATTERN
-20 REM
-40 DIM II(40,24),AA(40,24),BB(40,24)
-50 R=3: REM 6-INCH APERTURE
-60 L=.000022: REM WAVELENGTH
-70 GOSUB 530
-80 INPUT "HOW MANY RAYS";H
-90 FOR I1=1 TO H
-100 X=R*(2*RND-1)
-110 Y=R*(2*RND-1)
-115 REM NOTE THAT THE RND STATEMENT OPERATES
-117 REM DIFFERENTLY ON DIFFERENT MACHINES
-120 GOSUB 390
-130 IF F=0 THEN 100
-140 PRINT "DOING RAY ";I1
-150 GOSUB 450
-160 NEXT
-170 REM
-180 PRINT "NOW FINDING INTENSITY"
-190 C=II(20,12)^2
-200 FOR I=0 TO 40: FOR J=0 TO 24
-210 II(I,J)=II(I,J)*II(I,J)/C
-220 NEXT J: NEXT I
-230 REM
-240 REM PRINT PICTURE
-250 REM
-260 INPUT "PRINTER ON";Q$
-270 I$=" ./:;XH8M#": GOSUB 620
-280 FOR J=0 TO 24: LPRINT "I";
-290 FOR I=0 TO 40
-300 V=INT(9.99*II(I,J)^.47)+1
-310 LPRINT MID$(I$,V,1);
-320 NEXT I
-330 LPRINT "I": NEXT J
-340 GOSUB 620
-350 LPRINT
-360 LPRINT "1 ARC SEC: I---------I"
-370 GOTO 720
-380 REM
-390 REM APERTURE FILTER
-400 REM
-410 F=1
-420 R1=SQR(X*X+Y*Y)
-430 IF R1>R THEN F=0
-440 RETURN
-450 REM PHASE CALCULATION
-460 REM
-470 FOR I=0 TO 40
-480 FOR J=0 TO 24
-490 P=X*AA(I,J)+Y*BB(I,J)
-500 II(I,J)=II(I,J)+COS(P)
-510 NEXT J: NEXT I
-520 RETURN
-530 REM COMPUTE COEFFICIENTS
-540 REM
-550 K=2*3.14159265#/(L*206265!)
-560 FOR I=0 TO 40: FOR J=0 TO 24
-570 AA(I,J)=K*(I-20)/10
-580 BB(I,J)=K*(12-J)/6
-590 NEXT J: NEXT I
-600 RETURN
-610 REM
-620 REM PRINT A LINE
-630 LPRINT " ";
-640 FOR I=0 TO 40: LPRINT "-";
-650 NEXT: LPRINT
-660 RETURN
-670 REM =======================
-680 REM FROM "ASTRONOMICAL
-690 REM COMPUTING," SKY & TELE-
-700 REM SCOPE, SEPTEMBER, 1987
-710 REM =======================
-720 END
diff --git a/bwbtest/B15B/difpat.run b/bwbtest/B15B/difpat.run
deleted file mode 100644
index 96ccc25..0000000
--- a/bwbtest/B15B/difpat.run
+++ /dev/null
@@ -1,5 +0,0 @@
-HOW MANY RAYS? 2
-DOING RAY 1
-DOING RAY 2
-NOW FINDING INTENSITY
-PRINTER ON? Y
diff --git a/bwbtest/B15B/easter.INP b/bwbtest/B15B/easter.INP
deleted file mode 100644
index e56d616..0000000
--- a/bwbtest/B15B/easter.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-2015
-N
diff --git a/bwbtest/B15B/easter.bas b/bwbtest/B15B/easter.bas
deleted file mode 100644
index 9a0ffdb..0000000
--- a/bwbtest/B15B/easter.bas
+++ /dev/null
@@ -1,32 +0,0 @@
-10 REM EASTER
-12 REM
-14 INPUT "YEAR ";Y
-16 IF Y<1583 THEN 14
-18 Y1=Y/19
-20 A=INT((Y1-INT(Y1))*19+.001)
-22 B1=Y/100: B=INT(B1)
-24 C=INT((B1-INT(B1))*100+.001)
-26 D1=B/4: D=INT(D1)
-28 E=INT((D1-INT(D1))*4+.001)
-30 F=INT(((B+8)/25)+.001)
-32 G=INT((B-F+1)/3)
-34 H1=(19*A+B-D-G+15)/30
-36 H=INT((H1-INT(H1))*30+.001)
-38 C1=C/4: I=INT(C1)
-40 K=INT((C1-I)*4+.001)
-42 L1=(32+2*E+2*I-H-K)/7
-44 L=INT((L1-INT(L1))*7+.001)
-46 M=INT((A+11*H+22*L)/451)
-48 N1=(H+L-7*M+114)/31: N=INT(N1)
-50 P=INT((N1-N)*31+.001)
-52 N$="APRIL"
-54 IF N=3 THEN N$="MARCH"
-56 PRINT "EASTER IS ON ";N$;P+1
-58 INPUT "ANOTHER (Y OR N) ";Q$
-60 IF Q$="Y" THEN 14
-62 END
-70 REM ------------------------
-80 REM APPEARED IN ASTRONOMICAL
-90 REM COMPUTING, SKY & TELE-
-95 REM SCOPE, MARCH, 1986
-99 REM ------------------------
diff --git a/bwbtest/B15B/easter.run b/bwbtest/B15B/easter.run
deleted file mode 100644
index 1dedbb6..0000000
--- a/bwbtest/B15B/easter.run
+++ /dev/null
@@ -1,3 +0,0 @@
-YEAR ? 2015
-EASTER IS ON APRIL 5
-ANOTHER (Y OR N) ? N
diff --git a/bwbtest/B15B/extinc.INP b/bwbtest/B15B/extinc.INP
deleted file mode 100644
index 31fe728..0000000
--- a/bwbtest/B15B/extinc.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-7
-4
-1.234
diff --git a/bwbtest/B15B/extinc.bas b/bwbtest/B15B/extinc.bas
deleted file mode 100644
index 15e72d7..0000000
--- a/bwbtest/B15B/extinc.bas
+++ /dev/null
@@ -1,34 +0,0 @@
-10 REM EXTINCTION ANGLE
-12 REM
-14 R=180/3.14159265
-16 INPUT "STAR'S MAG";M
-18 INPUT "LIM MAG AT ZEN";M0
-20 INPUT "EXT COEFF, K";K
-22 REM FIND BACKGROUND
-24 K0=0.0126: K1=M0+K
-26 IF K1<4.21 THEN K0=0.00000126
-28 C=-9.80
-30 IF M0+K<4.21 THEN C=-8.35
-32 X0=(M0+16.57+K+2.5*C)/(-5.0)
-34 B0=(10^X0-1)^2/K0-K*118/0.2
-36 REM FIND DESIRED AIRMASS
-38 B=B0+236*(K/0.20)
-40 K0=0.0126
-42 IF B>1650 THEN K0=0.00000126
-44 C=-9.80
-46 IF B>1650 THEN C=-8.35
-48 I=C+2*LOG(1+SQR(K0*B))/LOG(10)
-50 A=(M+16.57+2.5*I)/(-K)
-52 REM FIND EXT ANGLE
-54 Z=90.1/R: D=0.1/R
-56 Z=Z-D
-58 X=COS(Z)+0.025*EXP(-11*COS(Z))
-60 IF (1/X)>A THEN 56
-62 Z=Z*R
-64 PRINT "EXT ANGLE: ";Z
-66 END
-68 REM ******************************
-70 REM FROM ASTRONOMICAL COMPUTING,
-72 REM SKY & TELESCOPE, APRIL, 1987,
-74 REM PAGE 426
-76 REM ******************************
diff --git a/bwbtest/B15B/extinc.run b/bwbtest/B15B/extinc.run
deleted file mode 100644
index f4c62a9..0000000
--- a/bwbtest/B15B/extinc.run
+++ /dev/null
@@ -1,4 +0,0 @@
-STAR'S MAG? 7
-LIM MAG AT ZEN? 4
-EXT COEFF, K? 1.234
-EXT ANGLE: -92.2
diff --git a/bwbtest/B15B/facecirc.INP b/bwbtest/B15B/facecirc.INP
deleted file mode 100644
index d2500e5..0000000
--- a/bwbtest/B15B/facecirc.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-250
-d
diff --git a/bwbtest/B15B/facecirc.bas b/bwbtest/B15B/facecirc.bas
deleted file mode 100644
index 2041174..0000000
--- a/bwbtest/B15B/facecirc.bas
+++ /dev/null
@@ -1,77 +0,0 @@
-10 REM - THIS IS FACECIRC.BAS
-20 CLS
-30 REM - Constants
-40 A = 4080: C = 5100: HF = 180: PLU = 40: E = 80: FA = 1: FB = 10: FC = 350
-50 K = .017453293#: REM - This is PI/180
-60 INPUT "Please Enter the Outside DIAMETER in MM - "; DIA: OR1 = DIA / 2: PRINT : PRINT
-70 IR1 = OR1 - 3: PRINT : PRINT
-80 IR2 = IR1 - 2: IR3 = IR1 - 1
-90 REM - Radius is converted to plotter units (PLU)
-100 OR2 = OR1 * PLU: IR4 = IR1 * PLU: IR5 = IR2 * PLU: IR6 = IR3 * PLU
-110 PRINT : PRINT "Do you want the scale in Degrees or Hours and Minutes?"
-120 INPUT " Please indicate 'd' for Degrees or 'h' for Hours... "; A$: PRINT
-130 IF A$ = "h" OR A$ = "H" THEN QQ = 1
-140 REM - Clear, set into HP-GL/2 mode, and initialize the printer
-150 LPRINT CHR$(27); "E" : LPRINT CHR$(27); "%0B" : LPRINT "IN;"
-160 REM - Select a pen and set the width
-170 LPRINT "SP1;": LPRINT "PW.1;"
-180 PRINT : PRINT : PRINT "Printing......."
-190 PRINT : PRINT "NOTE: This will take up to 70 seconds to print."
-200 REM - Plot outside and inside circles
-210 LPRINT "PA"; A; ","; C; ";": LPRINT "CI"; OR2; : LPRINT "PU;"
-220 LPRINT "PA"; A; ","; C; ";": LPRINT "CI"; IR4; : LPRINT "PU;"
-230 REM - Put in the Degrees or Hours
-240 IF QQ = 1 THEN FA = 1.25
-250 FOR I = -HF TO HF STEP FA
-260 LPRINT "PU;"
-270 LPRINT "PA"; A + SIN(I * K) * IR4; ","; C + COS(I * K) * IR4; ";"
-280 LPRINT "PD;"
-290 LPRINT "PA"; A + SIN(I * K) * OR2; ","; C + COS(I * K) * OR2; ";"
-300 LPRINT "PU;"
-310 NEXT I
-320 REM - Put in longer tick marks
-330 IF QQ = 1 THEN FB = 15
-340 FOR I = -HF TO HF STEP FB
-350 LPRINT "PU;"
-360 LPRINT "PA"; A + SIN(I * K) * IR5; ","; C + COS(I * K) * IR5; ";"
-370 LPRINT "PD;"
-380 LPRINT "PA"; A + SIN(I * K) * OR2; ","; C + COS(I * K) * OR2; ";"
-390 LPRINT "PU;"
-400 NEXT I
-410 REM - Put in shorter tick marks
-420 FOR I = -HF TO HF STEP 5
-430 LPRINT "PU;"
-440 LPRINT "PA"; A + SIN(I * K) * IR6; ","; C + COS(I * K) * IR6; ";"
-450 LPRINT "PD;"
-460 LPRINT "PA"; A + SIN(I * K) * OR2; ","; C + COS(I * K) * OR2; ";"
-470 LPRINT "PU;"
-480 NEXT I
-490 REM - Select Font and Label
-500 LPRINT "SD1,21,2,1,4,8,7,4148;"
-510 IF QQ = 1 THEN GOTO 530
-520 IF OR1 < 45 THEN LPRINT "DV1;"
-530 LPRINT "DT*,1;"
-540 LPRINT "SS;"
-550 LPRINT "LO16;"
-560 IF QQ = 1 THEN FC = 345: FB = 15
-570 FOR J = 0 TO FC STEP FB
-580 LPRINT "PU;"
-590 IF QQ = 1 THEN GOTO 610
-600 IF OR1 < 45 THEN LPRINT "PA"; A + SIN(J * K) * (IR5 + E); ","; C + COS(J * K) * (IR5 + E); ";": GOTO 620
-610 LPRINT "PA"; A + SIN(J * K) * IR5; ","; C + COS(J * K) * IR5; ";"
-620 LPRINT "DI"; COS(-J * K); ","; SIN(-J * K); ";"
-630 IF J = 90 THEN LPRINT "DI0,-1;"
-640 IF J = 180 THEN LPRINT "DI-1,0;"
-650 IF J = 270 THEN LPRINT "DI0,1;"
-660 IF QQ = 1 THEN LPRINT "LB"; INT(J / 15); "*;": GOTO 680
-670 LPRINT "LB"; INT(J); "*;"
-680 LPRINT "PU;"
-690 NEXT J
-700 REM - Reset the printer
-710 LPRINT CHR$(27); "%0A": LPRINT CHR$(27); "E"
-720 END
-900 REM ***********************************************
-910 REM THIS PROGRAM BY RONALD KOCELA PRODUCES CIRCULAR
-920 REM SETTING CIRCLES ON HP LASERJET PRINTERS.
-930 REM FROM SKY & TELESCOPE, MARCH 1996, PAGE 84.
-940 REM ***********************************************
diff --git a/bwbtest/B15B/facecirc.run b/bwbtest/B15B/facecirc.run
deleted file mode 100644
index d25d1bc..0000000
--- a/bwbtest/B15B/facecirc.run
+++ /dev/null
@@ -1,14 +0,0 @@
-Please Enter the Outside DIAMETER in MM - ? 250
-
-
-
-
-
-Do you want the scale in Degrees or Hours and Minutes?
- Please indicate 'd' for Degrees or 'h' for Hours... ? d
-
-
-
-Printing.......
-
-NOTE: This will take up to 70 seconds to print.
diff --git a/bwbtest/B15B/fireball.INP b/bwbtest/B15B/fireball.INP
deleted file mode 100644
index 952e36f..0000000
--- a/bwbtest/B15B/fireball.INP
+++ /dev/null
@@ -1,5 +0,0 @@
-567890
-2.345
-123456
-76.54
-0.123
diff --git a/bwbtest/B15B/fireball.bas b/bwbtest/B15B/fireball.bas
deleted file mode 100644
index c81fb57..0000000
--- a/bwbtest/B15B/fireball.bas
+++ /dev/null
@@ -1,62 +0,0 @@
-10 REM FIREBALL
-12 PRINT
-14 INPUT "INITIAL MASS (KG) ";MM
-16 INPUT "DENSITY (KG/M^3) ";D
-18 INPUT "SPEED (KM/S) ";V
-20 INPUT "ZENITH ANGLE (DEG) ";Z
-22 INPUT "TIME STEP (SEC) ";DT
-24 GOSUB 98: PRINT: GOSUB 114
-26 A=1.2: L=.001: G=1: H0=.2
-28 H1=500000: SG=H0/(2*G*H1)
-30 H=155000: T=0: FM=10: FL=FM
-32 M=MM: V=V*1000
-34 RE=6371000: ZR=Z*3.14159/180
-36 VV=-V*COS(ZR): VH=V*SIN(ZR)
-38 REM DENSITY OF ATMOSPHERE
-40 I=INT(H/10000)
-42 IF I>15 THEN I=15
-44 FR=(H/10000)-I
-46 R=10^(LR(I)*(1-FR)+FR*LR(I+1))
-48 REM RATES OF CHANGE
-50 A2=G*A*R*V*V/(M*D*D)^.33333
-52 GV=9.810001/(1+H/RE)^2
-54 AV=-GV-A2*VV/V+VH*VH/(RE+H)
-56 AH=-A2*VH/V-VV*VH/(RE+H)
-58 M0=SG*M*V*A2
-60 IF FL=FM THEN GOSUB 76
-62 REM INCREMENT VARIABLES
-64 T=T+DT: S=S+VH*DT*RE/(RE+H)
-66 H=H+VV*DT: M=M-M0*DT
-68 VV=VV+AV*DT: VH=VH+AH*DT
-70 V=SQR(VH*VH+VV*VV)
-72 IF M<0 OR H<0 THEN END
-74 FL=FL+1: GOTO 38
-76 REM OUTPUT
-78 PRINT INT(.5+T*10)/10;
-80 PRINT TAB(10);INT(.5+S/1000);
-82 PRINT TAB(20);INT(.5+H/1000);
-84 PRINT TAB(30);INT(.5+V/100)/10;
-86 PRINT TAB(40);INT(.5+A2);
-88 PRINT TAB(50);INT(.5+100*M/MM);
-90 LV=.5*V*V*M0*L*1E+10/(H*H)
-92 MV=6.8-1.086*LOG(LV)
-94 PRINT TAB(60);INT(.5+10*MV)/10
-96 FL=0: RETURN
-98 REM LOG(DENSITY) OF ATMOSPHERE
-100 DIM LR(16)
-102 FOR I=0 TO 16: READ LR(I): NEXT
-104 DATA .09,-.38,-1.05,-1.74,-2.39
-106 DATA -2.98,-3.50,-4.07,-4.72
-108 DATA -5.45,-6.30,-7.00,-7.62
-110 DATA -7.97,-8.32,-8.67,-8.81
-112 RETURN
-114 REM HEADING
-116 PRINT" GROUND";
-118 PRINT TAB(39);"ATMOS"
-120 PRINT"TIME TRACK HEIGHT";
-122 PRINT TAB(30);"SPEED DECEL";
-124 PRINT TAB(50);"MASS VISUAL"
-126 PRINT" (S) (KM) (KM)";
-128 PRINT TAB(30);"(KM/S) (M/S/S)";
-130 PRINT TAB(50);" (%) MAG"
-132 RETURN
diff --git a/bwbtest/B15B/fireball.run b/bwbtest/B15B/fireball.run
deleted file mode 100644
index d20d8d9..0000000
--- a/bwbtest/B15B/fireball.run
+++ /dev/null
@@ -1,11 +0,0 @@
-
-INITIAL MASS (KG) ? 567890
-DENSITY (KG/M^3) ? 2.345
-SPEED (KM/S) ? 123456
-ZENITH ANGLE (DEG) ? 76.54
-TIME STEP (SEC) ? 0.123
-
- GROUND ATMOS
-TIME TRACK HEIGHT SPEED DECEL MASS VISUAL
- (S) (KM) (KM) (KM/S) (M/S/S) (%) MAG
- 0 0 155 123456 227707 100 -55.7
diff --git a/bwbtest/B15B/fracts.INP b/bwbtest/B15B/fracts.INP
deleted file mode 100644
index 1036e4e..0000000
--- a/bwbtest/B15B/fracts.INP
+++ /dev/null
@@ -1 +0,0 @@
-0.1234
diff --git a/bwbtest/B15B/fracts.bas b/bwbtest/B15B/fracts.bas
deleted file mode 100644
index 93579ad..0000000
--- a/bwbtest/B15B/fracts.bas
+++ /dev/null
@@ -1,42 +0,0 @@
-10 REM REPRESENTING A DECIMAL
-12 REM VALUE BY A CONTINUED
-14 REM FRACTION
-16 REM
-18 ' DEFDBL A-H,K-Z
-20 ' DEFINT I,J
-22 C1=1: O=99999
-24 O1$="##### ########## /"
-26 O2$="= ##.#############"
-28 REM
-30 P=1E12
-32 DIM F(100)
-34 INPUT "DECIMAL VALUE";K
-36 PRINT
-38 I=-1
-40 I=I+1
-42 F(I)=INT(K): IF I>=1 THEN 46
-44 N=F(I): D=1: GOTO 48
-46 GOSUB 68
-48 R=N/D
-50 IF ABS(N)>P THEN 66
-52 IF ABS(D)>P THEN 66
-54 PRINT USING O1$;F(I);N;
-56 PRINT D;TAB(30);
-58 PRINT USING O2$;R
-60 K1=K-INT(K): IF K1=0 THEN 66
-62 IF ABS(R-O)<1/P THEN 66
-64 K=C1/K1: O=R: GOTO 40
-66 END
-68 D=F(I): N=1
-70 FOR J=I-1 TO 0 STEP -1
-72 N1=D
-74 D1=F(J)*D+N
-76 N=N1: D=D1
-78 NEXT J
-80 N=D1: D=N1
-82 RETURN
-100 REM ************************
-110 REM FROM SKY & TELESCOPE'S
-120 REM ASTRONOMICAL COMPUTING
-130 REM FOR JANUARY, 1989
-140 REM ************************
diff --git a/bwbtest/B15B/fracts.run b/bwbtest/B15B/fracts.run
deleted file mode 100644
index 9a7ebda..0000000
--- a/bwbtest/B15B/fracts.run
+++ /dev/null
@@ -1,13 +0,0 @@
-DECIMAL VALUE? 0.1234
-
- 0 0 / 1 = 0.0000000000000
- 8 1 / 8 = 0.1250000000000
- 9 9 / 73 = 0.1232876712329
- 1 10 / 81 = 0.1234567901235
- 1 19 / 154 = 0.1233766233766
- 1 29 / 235 = 0.1234042553191
- 3 106 / 859 = 0.1233993015134
- 1 135 / 1094 = 0.1234003656307
- 1 241 / 1953 = 0.1233998975934
- 1 376 / 3047 = 0.1234000656383
- 1 617 / 5000 = 0.1234000000000
diff --git a/bwbtest/B15B/gflash.INP b/bwbtest/B15B/gflash.INP
deleted file mode 100644
index ed1d0e7..0000000
--- a/bwbtest/B15B/gflash.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-15000
-89
-0.9
-B
diff --git a/bwbtest/B15B/gflash.bas b/bwbtest/B15B/gflash.bas
deleted file mode 100644
index c9d6534..0000000
--- a/bwbtest/B15B/gflash.bas
+++ /dev/null
@@ -1,202 +0,0 @@
-10 ' THE GREEN FLASH
-20 '
-30 INPUT "Height of observer in feet";H
-40 INPUT "Zenith dist. of occulting edge (deg)";Z0
-50 INPUT "Aerosol extinction (mag/air mass)";KD
-60 INPUT "Occult bottom (B) or top (T) of Sun";Q$
-70 TB=1: IF Q$="T" OR Q$="t" THEN TB=-1
-80 PRINT: GOSUB 1590
-90 DS=1: ' Sun's distance in a.u.
-100 RS=1: ' Sun's radius in solar radii
-110 TS=5700: ' Sun's temperature (Kelvin)
-120 D=0: ' Sun's declination in degrees
-130 MP=1: ' Planet's mass in Earth masses
-140 PE=1: ' Planet's rotation period in days
-150 R0=1: ' Planet's radius in Earth radii
-160 L=40: ' Observer's latitude in degrees
-170 P=1: ' Sea-level pressure, bars
-180 T0=10: ' Air temperature in degrees Celsius
-190 OZ=3: ' Ozone layer thickness (mm at STP)
-200 HS=12: ' Ozone ht. (miles above sea level)
-210 AA=-1.3: ' Aerosol exponent (unitless)
-220 AH=1: ' Aerosol scale height (miles)
-230 PP(1)=78: ' Nitrogen percentage by volume
-240 PP(2)=22: ' Oxygen percentage
-250 PP(3)=0: ' Carbon dioxide
-260 PP(4)=0: ' Hydrogen
-270 PP(5)=0: ' Helium
-280 PP(6)=0: ' Methane
-290 PP(7)=0: ' Ammonia
-300 PP(8)=0: ' Argon
-310 '
-330 ' Convert input data to cgs units
-340 DS=DS*1.496E+13: RS=RS*6.96E+10: ' cm
-350 R0=R0*6.378E+8: H=H*30.48: ' cm
-360 HS=HS*1.609E+5: AH=AH*1.609E+5: ' cm
-370 D=D*PI/180: L=L*PI/180: Z0=Z0*PI/180: ' radians
-380 MP=MP*5.976E+27: ' grams
-390 PE=PE*24*3600: ' seconds
-400 T0=T0+273.1: ' degrees Kelvin
-410 '
-420 ' Calculate average molecular weight
-430 MW=0
-440 FOR IG=1 TO 8: MW=MW+MX(IG)*PP(IG)*.01: NEXT IG
-450 '
-460 ' Calculate atmospheric parameters
-470 G=6.67E-8*MP*(R0^(-2)):' Acceleration of gravity
-480 S=8.31E+7*T0/(G*MW): ' Atmospheric scale height
-490 LA=-.4*T0/S: ' Adiabatic lapse rate
-500 '
-510 ' Choose a color
-520 FOR IC=1 TO 11
-530 W=(IC*500+2500)*1E-8
-540 ' Calculate index of refraction
-550 N0=0
-560 FOR IG=1 TO 8
-570 NS=(A(IG)*.00001)*(1+(B(IG)*1E-11)/(W^2))
-580 N0=N0+NS*PP(IG)*.01*P*273.1/T0
-590 NEXT IG
-600 N=1+N0*EXP(-H/S): ' At observer
-610 N0=N0+1: ' At sea level
-620 '
-630 ' Calc. refraction and air mass for each color
-640 GOSUB 1510: ' Refraction subroutine
-650 IF RF>RX THEN RX=RF
-660 IF RF90 THEN KX=90
-760 TR(IC)=10^(-.4*KX)
-770 '
-780 ' Calculate Sun's flux above atmosphere
-790 BB=.0000374*(W^(-5))/(EXP(1.43/(W*TS))-1)
-800 FA(IC)=((RS/DS)^2)*BB*1E-8: ' in erg/cm2/s/A
-810 NEXT IC
-820 '
-830 ' Pick relevant time range for calculations
-840 CZ=COS(Z0+RN+TB*RS/DS)
-850 HC=(CZ-SIN(D)*SIN(L))/(COS(D)*COS(L))
-860 HA=ATN(SQR(1-HC*HC)/HC): IF HC<0 THEN HA=HA+PI
-870 T1=HA*PE*.5/PI: ' Time when lowest disk sets
-880 CZ=COS(Z0+RX+TB*RS/DS)
-890 HC=(CZ-SIN(D)*SIN(L))/(COS(D)*COS(L))
-900 HA=ATN(SQR(1-HC*HC)/HC): IF HC<0 THEN HA=HA+PI
-910 T2=HA*PE*.5/PI: ' Time when highest disk sets
-920 DT=(T2-T1)/50: ' Choose a time increment
-930 T0=T1-DT: ' Define a fiducial time
-940 PRINT " Time x y V mag. Color"
-950 '
-960 ' ***** Main loop starts here *****
-970 FOR IT=-1 TO 48
-980 T=T1+IT*DT: ' Choose a time
-990 TT=T-T0: ' Seconds from start time
-1000 '
-1010 ' Cycle through wavelengths
-1020 FOR IC=1 TO 11
-1030 ' Calc. altitude of solar disk for that color
-1040 HA=2*PI*T/PE: ' Hour angle of Sun
-1050 CZ=SIN(D)*SIN(L)+COS(D)*COS(L)*COS(HA)
-1060 ZA=ATN(SQR(1-CZ*CZ)/CZ): IF CZ<0 THEN ZA=ZA+PI
-1070 ZA=ZA-R(IC): ' Zenith distance of Sun
-1080 '
-1090 ' Calculate the fraction of disk visible
-1100 CC=(ZA-Z0)*TB*DS/RS
-1110 IF CC>1 THEN CC=1: ' If nothing visible
-1120 TH(IC)=ATN(SQR(1-CC*CC)/CC)
-1130 IF CC<0 THEN TH(IC)=TH(IC)+PI
-1140 FR=(TH(IC)-CC*SIN(TH(IC)))/PI
-1150 '
-1160 ' Calculate visible flux from Sun
-1170 F(IC)=FA(IC)*TR(IC)*FR
-1180 NEXT IC
-1190 '
-1200 ' (Could print out flux, F(IC) [ergs/cm2/s/A],
-1210 ' as well as the Sun's stellar magnitude,
-1220 ' M(IC)=-2.5*LOG(F(IC))/B0-(M0(IC)+20),
-1230 ' as a function of the color IC, where
-1240 ' 1=3000A, 2=3500A, 3=4000A, ... , 11=8000A.)
-1250 '
-1260 XX=0: YY=0: ZZ=0
-1270 FOR IC=1 TO 11
-1280 XX=XX+X1(IC)*F(IC): ' X from CIE standard
-1290 YY=YY+Y1(IC)*F(IC): ' Y from CIE standard
-1300 ZZ=ZZ+Z1(IC)*F(IC): ' Z from CIE standard
-1310 NEXT IC
-1320 IF XX+YY+ZZ=0 THEN 1480
-1330 X=XX/(XX+YY+ZZ): ' x
-1340 Y=YY/(XX+YY+ZZ): ' y
-1350 IF Y<=.01 THEN 1480: ' If invisible to eye
-1360 PH=ATN((.333-X)/(Y-.333)): ' Angle from white
-1370 IF (Y-.333)<0 THEN PH=PH+PI:' in color diagram
-1380 CO$="Violet"
-1390 IF PH<4.229 THEN CO$= " Blue"
-1400 IF PH<2.580 THEN CO$= " Green"
-1410 IF PH<1.106 THEN CO$= "Yellow"
-1420 IF PH<0.359 THEN CO$= "Orange"
-1430 IF PH<0.000 THEN CO$= " Red"
-1440 V=-2.5*LOG(.034*YY/2.54E-10)/B0: ' Visual mag.
-1450 PRINT USING "##.## ";TT;
-1460 PRINT USING "##.## ##.## ###.# ";X;Y;V;
-1470 PRINT CO$
-1480 NEXT IT
-1490 END
-1500 '
-1510 ' Refraction subroutine (quick version)
-1520 N=1+(N0-1)*EXP(-H/S): ' At observer
-1530 BS=R0*SIN(Z0)/(R0+.5*S): BE=ATN(BS/SQR(1-BS*BS))
-1540 R5=N*BS: RF=ATN(R5/SQR(1-R5*R5))-BE: CZ=COS(Z0)
-1560 AM=1/(CZ+.8*SQR(S/R0)*EXP(-.38*CZ*SQR(R0/S)))
-1570 RETURN
-1580 '
-1590 ' Constants and data statements
-1600 RX=-1: RN=1
-1610 ' PI=3.14159:
-1615 B0=LOG(10): ' Pi and log-10 factor
-1620 DIM A(8),B(8),PP(8),MX(8),KS(11),M0(11),X1(11)
-1630 DIM Y1(11),Z1(11),R1(11),G1(11),B1(11),M(11)
-1640 DIM R(11),TR(11),F(11),FA(11),LF(11),TH(11)
-1650 FOR I=1 TO 8: READ A(I): NEXT I
-1660 DATA 29.1, 26.6, 43.9, 13.6, 3.5, 43, 37, 27.9
-1670 FOR I=1 TO 8: READ B(I): NEXT I
-1680 DATA 7.7, 5.1, 6.4, 7.5, 2.3, 6.0, 12.0, 5.6
-1690 FOR I=1 TO 8: READ MX(I): NEXT I
-1700 DATA 28, 32, 44, 2, 4, 16, 17, 39.9
-1710 FOR I=1 TO 11: READ KS(I): NEXT I
-1720 DATA 3.2, .005, 0, .001, .012, .031, .044
-1730 DATA .023, .008, .005, .001
-1740 FOR I=1 TO 11: READ M0(I): NEXT I
-1750 DATA 1.19, 0.95, 0.52, 0.46, 0.74, 1.06, 1.33
-1760 DATA 1.6, 1.88, 2.1, 2.3
-1770 FOR I=1 TO 11: READ X1(I): NEXT I
-1780 DATA 0, 0, .014, .336, .005, .433, 1.062
-1790 DATA .283, .011, 0, 0
-1800 FOR I=1 TO 11: READ Y1(I): NEXT I
-1810 DATA 0, 0, .0004, .038, .323, .995, .631
-1820 DATA .107, .004, .0001, 0
-1830 FOR I=1 TO 11: READ Z1(I): NEXT I
-1840 DATA 0, 0, .068, 1.773, .272, .009, 0,0,0,0,0
-1850 FOR I=1 TO 11: READ R1(I): NEXT I
-1860 DATA 0, 0, .025, -.039, -1.16, .097
-1870 DATA .847, .989, 1, 0, 0
-1880 FOR I=1 TO 11: READ G1(I): NEXT I
-1890 DATA 0, 0, -.011, .0218, 1.39, .905, .154
-1900 DATA .011, 0, 0, 0
-1910 FOR I=1 TO 11: READ B1(I): NEXT I
-1920 DATA 0, 0, .986, 1.017, .778, -.0025
-1930 DATA -.0012, 0, 0, 0, 0
-1940 RETURN
-2000 '
-2010 ' GFLASH.BAS -- This program by Dr. Bradley
-2020 ' E. Schaefer predicts how the "green flash"
-2030 ' should look to an observer watching the
-2040 ' setting Sun. Inputs can be varied to see
-2050 ' the effect of different atmospheric conditions
-2060 ' and elevation above sea level. The program
-2070 ' is discussed in detail in Sky & Telescope,
-2080 ' February 1992, page 200.
diff --git a/bwbtest/B15B/gflash.run b/bwbtest/B15B/gflash.run
deleted file mode 100644
index a52057f..0000000
--- a/bwbtest/B15B/gflash.run
+++ /dev/null
@@ -1,25 +0,0 @@
-Height of observer in feet? 15000
-Zenith dist. of occulting edge (deg)? 89
-Aerosol extinction (mag/air mass)? 0.9
-Occult bottom (B) or top (T) of Sun? B
-
- Time x y V mag. Color
- 0.00 0.70 0.30 13.5 Violet
- 0.11 0.70 0.30 13.9 Violet
- 0.22 0.70 0.30 14.3 Violet
- 0.33 0.69 0.31 14.9 Violet
- 0.44 0.67 0.33 15.6 Violet
- 0.55 0.61 0.39 16.7 Red
- 0.66 0.58 0.41 17.6 Red
- 0.76 0.48 0.51 19.1 Red
- 0.87 0.29 0.69 20.3 Orange
- 0.98 0.29 0.68 21.4 Orange
- 1.09 0.13 0.59 24.6 Yellow
- 1.20 0.02 0.51 25.8 Yellow
- 1.31 0.02 0.50 26.6 Yellow
- 1.42 0.04 0.44 28.0 Green
- 1.53 0.16 0.02 33.6 Blue
- 1.64 0.16 0.02 34.0 Blue
- 1.75 0.16 0.02 34.5 Blue
- 1.86 0.16 0.02 35.3 Blue
- 1.97 0.16 0.02 36.9 Blue
diff --git a/bwbtest/B15B/glob1.INP b/bwbtest/B15B/glob1.INP
deleted file mode 100644
index d4ea418..0000000
--- a/bwbtest/B15B/glob1.INP
+++ /dev/null
@@ -1,7 +0,0 @@
-1
-ABC
-7
-2
-156
-123
-N
diff --git a/bwbtest/B15B/glob1.bas b/bwbtest/B15B/glob1.bas
deleted file mode 100644
index 7ddad90..0000000
--- a/bwbtest/B15B/glob1.bas
+++ /dev/null
@@ -1,39 +0,0 @@
-10 REM GLOBULAR CLUSTER PLOT
-12 REM
-14 R1=3.14159265/180
-16 M0=+0.6: REM RR LYRAE STARS
-18 GOSUB 66
-20 PRINT
-22 INPUT "NAME ";N$
-24 INPUT "APPAR. MAG. (H.B.)";M1
-26 INPUT "VISUAL EXTINCTION ";M2
-28 D=10^(.2*(M1-M2-M0)-2)
-30 D=D*3262: REM LIGHT-YEARS
-32 INPUT "LONGITUDE";L
-34 INPUT "LATITUDE ";B
-36 L=L*R1: B=B*R1
-38 PRINT
-40 PRINT "DISTANCE = ";D
-42 IF S>2 THEN 50
-44 X=D*COS(L)*COS(B)
-46 PRINT " X = ";X
-48 IF S<2 THEN 56
-50 Y=D*SIN(L)*COS(B)
-52 PRINT " Y = ";Y
-54 IF S=2 THEN 60
-56 Z=D*SIN(B)
-58 PRINT " Z + ";Z
-60 INPUT "ANOTHER (Y OR N) ";Q$
-62 IF Q$<>"N" THEN 20
-64 END
-66 PRINT "(1) X-Z EDGE-ON VIEW"
-68 PRINT "(2) X-Y FACE-ON VIEW"
-70 PRINT "(3) Y-Z EDGE-ON VIEW"
-72 PRINT
-74 INPUT "YOUR SELECTION ";S
-76 RETURN
-80 REM ------------------------
-82 REM APPEARED IN ASTRONOMICAL
-84 REM COMPUTING, SKY & TELE-
-86 REM SCOPE, DECEMBER, 1984
-88 REM ------------------------
diff --git a/bwbtest/B15B/glob1.run b/bwbtest/B15B/glob1.run
deleted file mode 100644
index 3a67035..0000000
--- a/bwbtest/B15B/glob1.run
+++ /dev/null
@@ -1,16 +0,0 @@
-(1) X-Z EDGE-ON VIEW
-(2) X-Y FACE-ON VIEW
-(3) Y-Z EDGE-ON VIEW
-
-YOUR SELECTION ? 1
-
-NAME ? ABC
-APPAR. MAG. (H.B.)? 7
-VISUAL EXTINCTION ? 2
-LONGITUDE? 156
-LATITUDE ? 123
-
-DISTANCE = 247.448
- X = 123.118
- Z + 207.527
-ANOTHER (Y OR N) ? N
diff --git a/bwbtest/B15B/gmst.INP b/bwbtest/B15B/gmst.INP
deleted file mode 100644
index 0405193..0000000
--- a/bwbtest/B15B/gmst.INP
+++ /dev/null
@@ -1 +0,0 @@
-6,7
diff --git a/bwbtest/B15B/gmst.bas b/bwbtest/B15B/gmst.bas
deleted file mode 100644
index fd36ac8..0000000
--- a/bwbtest/B15B/gmst.bas
+++ /dev/null
@@ -1,25 +0,0 @@
-700 REM GREENWICH MEAN
-702 REM SIDEREAL TIME
-704 REM
-706 INPUT "J,F ";J,F
-708 D=J-2451545
-710 T=D/36525: T1=INT(T)
-712 J0=T1*36525+2451545
-714 T2=(J-J0+0.5)/36525
-716 S=24110.54841+184.812866*T1
-718 S=S+8640184.812866*T2
-720 S=S+0.093104*T*T
-722 S=S-0.0000062*T*T*T
-724 S=S/86400: S=S-INT(S)
-726 S=24*(S+(F-0.5)*1.002737909)
-728 IF S<0 THEN S=S+24
-730 IF S>24 THEN S=S-24
-732 H=INT(S): M1=60*(S-H)
-734 M=INT(M1): S=60*(M1-M)
-736 PRINT "GMST: ";H;M;S
-738 END
-740 REM ------------------------
-745 REM APPERAED IN ASTRONOMICAL
-750 REM COMPUTING, SKY & TELE-
-755 REM SCOPE. JUNE, 1984
-760 REM ------------------------
diff --git a/bwbtest/B15B/gmst.run b/bwbtest/B15B/gmst.run
deleted file mode 100644
index 7565568..0000000
--- a/bwbtest/B15B/gmst.run
+++ /dev/null
@@ -1,2 +0,0 @@
-J,F ? 6,7
-GMST: 137 4 37.6587
diff --git a/bwbtest/B15B/gwmonth.INP b/bwbtest/B15B/gwmonth.INP
deleted file mode 100644
index 00750ed..0000000
--- a/bwbtest/B15B/gwmonth.INP
+++ /dev/null
@@ -1 +0,0 @@
-3
diff --git a/bwbtest/B15B/gwmonth.bas b/bwbtest/B15B/gwmonth.bas
deleted file mode 100644
index a8a27d4..0000000
--- a/bwbtest/B15B/gwmonth.bas
+++ /dev/null
@@ -1,12 +0,0 @@
-10 REM NAME OF MONTH
-20 REM
-25 DIM A$(150)
-27 DIM M$(25)
-30 LET A$="320125799653785534469788JANUARYFEBRUARYMARCHAPRILMAYJUNEJULYAUGUSTSEPTEMBEROCTOBERNOVEMBERDECEMBER"
-40 INPUT A
-50 LET M$=MID$(A$,(A*6+22-VAL(MID$(A$,A,1))),VAL(MID$(A$,A+12,1)))
-60 PRINT M$
-70 REM ***********************************
-80 REM APPEARED IN ASTRONOMICAL COMPUTING
-90 REM SKY & TELESCOPE, OCTOBER 1984 ISSUE
-100 REM **********************************
diff --git a/bwbtest/B15B/gwmonth.run b/bwbtest/B15B/gwmonth.run
deleted file mode 100644
index 96fcf51..0000000
--- a/bwbtest/B15B/gwmonth.run
+++ /dev/null
@@ -1,2 +0,0 @@
-? 3
-MARCH
diff --git a/bwbtest/B15B/interp.INP b/bwbtest/B15B/interp.INP
deleted file mode 100644
index 86755a2..0000000
--- a/bwbtest/B15B/interp.INP
+++ /dev/null
@@ -1,7 +0,0 @@
-3
-1,6
-2,8
-3,10
-1.5
-2.5
-X
diff --git a/bwbtest/B15B/interp.bas b/bwbtest/B15B/interp.bas
deleted file mode 100644
index f465bf9..0000000
--- a/bwbtest/B15B/interp.bas
+++ /dev/null
@@ -1,39 +0,0 @@
-10 REM LAGRANGE INTERPOLATION
-12 REM
-14 INPUT "HOW MANY POINTS";N
-16 PRINT
-18 DIM X(N),F(N),L(N)
-20 FOR I=1 TO N
-22 INPUT "X,F";X(I),F(I)
-24 NEXT I
-26 FOR I=1 TO N: L(I)=1
-28 FOR J=1 TO N
-30 IF J=I THEN 34
-32 L(I)=L(I)*(X(I)-X(J))
-34 NEXT J
-36 L(I)=F(I)/L(I)
-38 NEXT I
-40 PRINT
-42 INPUT "DESIRED X";X$
-44 IF X$="X" THEN 78
-48 X=VAL(X$): F1=0
-50 FOR I=1 TO N
-52 IF X<>X(I) THEN 56
-54 F=F(I): F1=1
-56 NEXT I
-58 IF F1=1 THEN 74
-60 T=1: F=0
-62 FOR I=1 TO N
-64 T=T*(X-X(I))
-66 NEXT I
-68 FOR I=1 TO N
-70 F=F+L(I)*T/(X-X(I))
-72 NEXT I
-74 PRINT "F: ";F
-76 PRINT: GOTO 42
-78 END
-80 REM ------------------------
-85 REM APPEARED IN ASTRONOMICAL
-90 REM COMPUTING, SKY & TELE-
-95 REM SCOPE, APRIL, 1984
-99 REM ------------------------
diff --git a/bwbtest/B15B/interp.run b/bwbtest/B15B/interp.run
deleted file mode 100644
index f624977..0000000
--- a/bwbtest/B15B/interp.run
+++ /dev/null
@@ -1,13 +0,0 @@
-HOW MANY POINTS? 3
-
-X,F? 1,6
-X,F? 2,8
-X,F? 3,10
-
-DESIRED X? 1.5
-F: 7
-
-DESIRED X? 2.5
-F: 9
-
-DESIRED X? X
diff --git a/bwbtest/B15B/jdcal.INP b/bwbtest/B15B/jdcal.INP
deleted file mode 100644
index c09b760..0000000
--- a/bwbtest/B15B/jdcal.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-6,9
-1
diff --git a/bwbtest/B15B/jdcal.bas b/bwbtest/B15B/jdcal.bas
deleted file mode 100644
index e5c8144..0000000
--- a/bwbtest/B15B/jdcal.bas
+++ /dev/null
@@ -1,26 +0,0 @@
-900 REM JD --> CALENDAR
-905 REM
-910 INPUT "J,F ";J,F
-915 INPUT "JC (0) OR GC (1) ";G
-920 F=F+0.5
-925 IF F<1 THEN 935
-930 F=F-1: J=J+1
-935 IF G=1 THEN 945
-940 A=J: GOTO 955
-945 A1=INT((J/36524.25)-51.12264)
-950 A=J+1+A1-INT(A1/4)
-955 B=A+1524
-960 C=INT((B/365.25)-0.3343)
-965 D=INT(365.25*C)
-970 E=INT((B-D)/30.61)
-975 D=B-D-INT(30.61*E)+F
-980 M=E-1: Y=C-4716
-985 IF E>13.5 THEN M=M-12
-990 IF M<2.5 THEN Y=Y+1
-995 PRINT "DATE: ";Y;M;D
-997 END
-1000 REM ------------------------
-1001 REM APPEARED IN ASTRONOMICAL
-1002 REM COMPUTING, SKY & TELE-
-1003 REM SCOPE, MAY, 1984
-1004 REM ------------------------
diff --git a/bwbtest/B15B/jdcal.run b/bwbtest/B15B/jdcal.run
deleted file mode 100644
index 792d70a..0000000
--- a/bwbtest/B15B/jdcal.run
+++ /dev/null
@@ -1,3 +0,0 @@
-J,F ? 6,9
-JC (0) OR GC (1) ? 1
-DATE: -4713 12 9.5
diff --git a/bwbtest/B15B/jmerid.INP b/bwbtest/B15B/jmerid.INP
deleted file mode 100644
index 8df3b33..0000000
--- a/bwbtest/B15B/jmerid.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-2015,03,01
-12,34,56
diff --git a/bwbtest/B15B/jmerid.bas b/bwbtest/B15B/jmerid.bas
deleted file mode 100644
index 5f201ea..0000000
--- a/bwbtest/B15B/jmerid.bas
+++ /dev/null
@@ -1,129 +0,0 @@
-100 REM JUPITER'S CENTRAL MERIDIAN
-105 REM
-110 DT=57: REM Value of ET-UT (sec)
-111 REM in 1990; change DT for
-112 REM other years as needed!!
-115 P1=3.14159265
-120 P2=2*P1: RD=180/P1: DR=1/RD
-125 GOSUB 330: REM Get date and UT
-130 D=(J-2451545)+F
-135 D=D+DT/86400: REM UT to ET
-140 GOSUB 405
-145 READ A1,A2,D1,D2
-150 T=T-1: REM Cent from 2000.0
-155 A1=A1+A2*T
-160 D1=D1+D2*T
-165 Q=A1: GOSUB 710: A1=Q*DR
-170 Q=D1: GOSUB 710: D1=Q*DR
-175 D9=COS(D5)*SIN(A1-A5)
-180 N9=SIN(D1)*COS(D5)*COS(A1-A5)
-185 N9=N9-COS(D1)*SIN(D5)
-190 K=RD*ATN(N9/D9)
-195 IF D9<0 THEN K=K+180
-200 REM
-205 READ W0,W1,W2: REM System I
-210 GOSUB 245
-215 PRINT "C-MERID (I): ";C
-220 REM
-225 READ W0,W1,W2: REM System II
-230 GOSUB 245
-235 PRINT "C-MERID (II): ";C
-240 END
-245 REM Rotations from epoch
-250 W=W0+W1*(D-.0057755*RR)+W2*T
-255 Q=W-K: GOSUB 710: C=Q
-260 C=INT(100*C+.5)/100
-265 RETURN
-275 REM North Pole R.A.
-280 DATA 268.05, +0.107
-285 REM North Pole Dec.
-290 DATA 64.49, -0.015
-295 REM System I
-300 DATA 67.10, 877.9000, 1.291
-305 REM System II
-310 DATA 43.30, 870.2700, 1.291
-315 REM
-320 REM Calendar --> JD
-325 REM
-330 INPUT "YR,MO,DAY ";Y,M,D
-335 INPUT "UT (H,M,S) ";H1,M1,S1
-340 D=D+H1/24+M1/1440+S1/86400
-345 G=1: IF Y<1582 THEN G=0
-350 D1=INT(D): F=D-D1-.5
-355 J=-INT(7*(INT((M+9)/12)+Y)/4)
-360 IF G=0 THEN 380
-365 S=SGN(M-9): A=ABS(M-9)
-370 J3=INT(Y+S*INT(A/7))
-375 J3=-INT((INT(J3/100)+1)*3/4)
-380 J=J+INT(275*M/9)+D1+G*J3
-385 J=J+1721027+2*G+367*Y
-390 IF F>=0 THEN 400
-395 F=F+1: J=J-1
-400 RETURN
-405 REM Fundamental Arguments
-410 REM
-415 T=D/36525+1
-420 REM T=Centuries from 1900.0
-425 L0=.779072+.00273790931*D
-430 G0=.993126+.0027377785*D
-435 L5=.089608+.00023080893*D
-440 G5=.056531+.00023080893*D
-445 G6=.882987+.00009294371*D
-450 L0=(L0-INT(L0))*P2
-455 G0=(G0-INT(G0))*P2
-460 L5=(L5-INT(L5))*P2
-465 G5=(G5-INT(G5))*P2
-470 G6=(G6-INT(G6))*P2
-475 REM Sun
-480 L=6910*SIN(G0)
-485 L=L+72*SIN(2*G0)
-490 L=L-17*T*SIN(G0)
-495 L=L-7*COS(G0-G5)
-500 R=1.00014-.01675*COS(G0)
-505 R=R-.00014*COS(2*G0)
-510 L=L0+L/206265
-515 REM Jupiter
-520 J=19934*SIN(G5)
-525 J=J+5023*T+2511
-530 J=J+1093*COS(2*G5-5*G6)
-535 J=J+601*SIN(2*G5)
-540 J=J-479*SIN(2*G5-5*G6)
-545 J=J-185*SIN(2*G5-2*G6)
-550 J=J+137*SIN(3*G5-5*G6)
-555 J=J-131*SIN(G5-2*G6)
-560 B=-4692*COS(G5)
-565 B=B+259*SIN(G5)
-570 B=B+227-227*COS(2*G5)
-575 B=B+30*T*SIN(G5)
-580 R5=5.20883-.25122*COS(G5)
-585 R5=R5-.00604*COS(2*G5)
-590 R5=R5+.0026*COS(2*G5-2*G6)
-595 R5=R5-.0017*COS(3*G5-5*G6)
-600 R5=R5-.00106*SIN(2*G5-2*G6)
-605 R5=R5-.00091*T*SIN(G5)
-610 R5=R5-.00084*T*COS(G5)
-615 L5=L5+J/206265: B5=B/206265
-620 N9=R5*COS(B5)*SIN(L5-L)
-625 D9=R5*COS(B5)*COS(L5-L)+R
-630 L1=ATN(N9/D9)
-635 IF D9<0 THEN L1=L1+P1
-640 LL=L1+L
-645 V=N9*N9+D9*D9
-650 RR=SQR(V+(R5*SIN(B5))^2)
-655 S=R5*SIN(B5)/RR
-660 BB=ATN(S/SQR(1-S*S))
-665 E=(84428-47*T)/206265
-670 N9=SIN(LL)*COS(E)-TAN(BB)*SIN(E)
-675 D9=COS(LL): A5=ATN(N9/D9)
-680 IF D9<0 THEN A5=A5+P1
-685 S=SIN(BB)*COS(E)
-690 S=S+COS(BB)*SIN(E)*SIN(LL)
-695 D5=ATN(S/SQR(1-S*S))
-700 RETURN
-705 REM
-710 REM Normalize Degrees
-715 Q=Q/360: Q=Q-INT(Q): Q=Q*360
-720 RETURN
-800 REM This program computes the longtude of Jupiter's central
-810 REM meridian for any date and time. From SKY & TELESCOPE
-820 REM magazine for December, 1989, page 641.
diff --git a/bwbtest/B15B/jmerid.run b/bwbtest/B15B/jmerid.run
deleted file mode 100644
index 0027e4a..0000000
--- a/bwbtest/B15B/jmerid.run
+++ /dev/null
@@ -1,4 +0,0 @@
-YR,MO,DAY ? 2015,03,01
-UT (H,M,S) ? 12,34,56
-C-MERID (I): 120.42
-C-MERID (II): 321.68
diff --git a/bwbtest/B15B/kepler.INP b/bwbtest/B15B/kepler.INP
deleted file mode 100644
index 81cf0ad..0000000
--- a/bwbtest/B15B/kepler.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-4567890
-0.89
-1,2
diff --git a/bwbtest/B15B/kepler.bas b/bwbtest/B15B/kepler.bas
deleted file mode 100644
index 944016e..0000000
--- a/bwbtest/B15B/kepler.bas
+++ /dev/null
@@ -1,129 +0,0 @@
-10 REM KEPLER'S EQUATION
-20 REM
-30 P1=PI : D7=P1/180 : R1=1/D7
-40 K=.01720209895
-50 GOSUB 1060
-60 REM
-70 PRINT "PERIHELION DISTANCE Q: "; : INPUT Q
-90 PRINT "ECCENTRICITY "; : INPUT E0
-92 PRINT "STARTING AND ENDING T "; : INPUT T7,T8
-95 FOR T=T7 TO T8 STEP .1
-100 A1=Q/(1-E0) : IF A1<0 THEN M=0 : GO TO 120
-110 N0=K*A1^(-1.5) : M=N0*T
-120 PRINT "MEAN ANOMALY IS ";M*R1;" DEGREES"
-122 PRINT : PRINT
-123 PRINT "METHOD I V R"
-124 PRINT
-130 IF A1<0 THEN 205
-140 IF E0>.99 THEN 170
-150 PRINT "SIMPLE ";
-160 GOSUB 490 : GOSUB 400
-170 PRINT "ENCKE ";
-180 GOSUB 560 : GOSUB 400
-190 PRINT "BINARY ";
-200 GOSUB 260 : GOSUB 400
-205 REM
-210 PRINT "HERRICK ";
-220 GOSUB 640 : GOSUB 440
-230 PRINT "GAUSS ";
-240 GOSUB 850 : GOSUB 440
-245 NEXT T
-250 GO TO 2000
-260 REM BINARY METHOD
-270 REM
-280 F=SGN(M) : M=ABS(M)/(2*P1) : M=(M-INT(M))*2*P1*F
-290 IF M<0 THEN M=M+2*P1
-300 F=1 : IF M>P1 THEN M=2*P1-M : F=-1
-310 E=P1/2 : D=P1/4
-320 FOR I1=1 TO 47
-330 M1=E-E0*SIN(E)
-340 E=E+SGN(M-M1)*D : D=D/2
-350 E1=E
-360 NEXT I1
-370 E=E*F : I=I1-1
-380 RETURN
-390 REM
-400 REM TRUE ANOMALY FROM ECCENTRIC ANOMALY
-410 REM
-420 V=2*ATN(SQR((1+E0)/(1-E0))*SIN(E/2)/COS(E/2))
-430 R=A1*(1-E0*COS(E))
-440 PRINT USING " #### ###.###### ##.#######";I;V*R1;R
-470 RETURN
-480 REM
-490 REM SIMPLE ITERATION
-500 REM
-510 E=M : I=0
-520 E1=M+E0*SIN(E) : I=I+1
-530 IF ABS(E-E1)>1.0000000000000E-10 THEN E=E1 : GO TO 520
-540 RETURN
-550 REM
-560 REM ENCKE ITERATION
-570 REM
-580 E=M : I=0
-590 E1=E+(M+E0*SIN(E)-E)/(1-E0*COS(E)) : I=I+1
-600 IF ABS(E-E1)>1.0000000000000E-10 THEN E=E1 : GO TO 590
-610 RETURN
-620 REM
-640 REM HERRICK'S METHOD
-650 REM
-660 REM ENTER WITH T,E0,Q
-670 REM EXIT WITH TRUE ANOMALY
-680 REM
-682 I=0
-690 P=Q*(1+E0)
-700 C=K*(1+E0)*(1+E0)/(2*P^1.5)
-710 X=SGN(T) : REM ASSUME V +90 OR -90 TO START
-720 L=(1-E0)/(1+E0)
-730 D2=C*(1+L*X*X)/(1+X*X)
-740 C2=X/(1+L*X*X) : K1=X*X*X/(1+E0)
-750 C2=C2+K1*(1/(1+L*X*X)-1/3)
-760 N=0 : S=-1
-770 N=N+1
-775 I=I+1
-780 S=-S
-790 F=K1*S*(L*X*X)^N/(2*N+3)
-800 C2=C2+F : IF ABS(F)>1.0000000000000E-12 THEN 770
-810 D3=T-C2/C : IF ABS(D3)<1.0000000000000E-10 THEN 830
-820 X=X+D2*D3 : GO TO 730
-830 V=2*ATN(X) : R=Q*(1+E0)/(1+E0*COS(V))
-840 RETURN
-850 REM GAUSS METHOD
-860 REM
-870 REM ENTER WITH T,E0,Q; EXIT WITH V,R
-880 REM
-882 I=0
-890 A=SQR((1+9*E0)/10) : B=5*(1-E0)/(1+9*E0)
-900 C=SQR(5*(1+E0)/(1+9*E0))
-910 B1=3*A*K*T/SQR(2*Q*Q*Q)
-920 B2=1 : REM INITIAL ASSUMPTION
-930 W1=B2*B1
-940 B3=ATN(2/W1) : T1=SIN(B3/2)/COS(B3/2)
-950 S1=SGN(T1) : T1=ABS(T1) : T2=T1^(1/3)*S1
-960 G=ATN(T2) : S=2/(SIN(2*G)/COS(2*G))
-970 A2=B*S*S
-980 B0=B2 : B2=0
-982 FOR J=0 TO 7 : B2=B2+B(J)*A2^J : NEXT J
-984 I=I+1
-990 IF ABS(B2-B0)>1.0000000000000E-13 THEN 930
-1000 C1=0 : FOR J=0 TO 7 : C1=C1+G(J)*A2^J : NEXT J
-1010 V1=C*C1*S
-1020 D1=1/(1+A2*C1*C1) : R=Q*D1*(1+V1*V1)
-1030 V=2*ATN(V1)
-1040 RETURN
-1050 REM
-1060 REM COEFFICIENTS
-1080 FOR J=0 TO 7 : READ B(J) : NEXT J
-1090 FOR J=0 TO 7 : READ G(J) : NEXT J
-1100 FOR J=0 TO 7 : READ S(J) : NEXT J
-1110 RETURN
-1120 DATA 1,0,-0.017142857,-0.003809524,-0.001104267
-1130 DATA -0.000367358,-0.000131675,-0.000049577
-1140 DATA 1,0.4,0.21714286,0.12495238,0.07339814
-1150 DATA 0.04351610,0.02592289,0.01548368
-1160 DATA 1,-0.8,0.04571429,0.01523810,0.00562820
-1170 DATA 0.00218783,0.00087905,0.00036155
-2000 END
-2010 REM ------------------------------------------
-2020 REM APPEARED IN ASTRONOMICAL COMPUTING, SKY &
-2030 REM TELESCOPE, AUGUST, 1985
-2040 REM ------------------------------------------
diff --git a/bwbtest/B15B/kepler.run b/bwbtest/B15B/kepler.run
deleted file mode 100644
index 800b79e..0000000
--- a/bwbtest/B15B/kepler.run
+++ /dev/null
@@ -1,103 +0,0 @@
-PERIHELION DISTANCE Q: ? 4567890
-ECCENTRICITY ? 0.89
-STARTING AND ENDING T ? 1,2
-MEAN ANOMALY IS 3.68315E-12 DEGREES
-
-
-METHOD I V R
-
-SIMPLE 1 0.000000 4567890.0000000
-ENCKE 1 0.000000 4567890.0000000
-BINARY 47 0.000000 4567890.0000000
-HERRICK 19 0.000000 4567890.0000000
-GAUSS 1 0.000000 4567890.0000000
-MEAN ANOMALY IS 4.05147E-12 DEGREES
-
-
-METHOD I V R
-
-SIMPLE 1 0.000000 4567890.0000000
-ENCKE 1 0.000000 4567890.0000000
-BINARY 47 0.000000 4567890.0000000
-HERRICK 19 0.000000 4567890.0000000
-GAUSS 1 0.000000 4567890.0000000
-MEAN ANOMALY IS 4.41978E-12 DEGREES
-
-
-METHOD I V R
-
-SIMPLE 1 0.000000 4567890.0000000
-ENCKE 1 0.000000 4567890.0000000
-BINARY 47 0.000000 4567890.0000000
-HERRICK 19 0.000000 4567890.0000000
-GAUSS 1 0.000000 4567890.0000000
-MEAN ANOMALY IS 4.7881E-12 DEGREES
-
-
-METHOD I V R
-
-SIMPLE 1 0.000000 4567890.0000000
-ENCKE 1 0.000000 4567890.0000000
-BINARY 47 0.000000 4567890.0000000
-HERRICK 19 0.000000 4567890.0000000
-GAUSS 1 0.000000 4567890.0000000
-MEAN ANOMALY IS 5.15641E-12 DEGREES
-
-
-METHOD I V R
-
-SIMPLE 1 0.000000 4567890.0000000
-ENCKE 1 0.000000 4567890.0000000
-BINARY 47 0.000000 4567890.0000000
-HERRICK 19 0.000000 4567890.0000000
-GAUSS 1 0.000000 4567890.0000000
-MEAN ANOMALY IS 5.52473E-12 DEGREES
-
-
-METHOD I V R
-
-SIMPLE 1 0.000000 4567890.0000000
-ENCKE 1 0.000000 4567890.0000000
-BINARY 47 0.000000 4567890.0000000
-HERRICK 19 0.000000 4567890.0000000
-GAUSS 1 0.000000 4567890.0000000
-MEAN ANOMALY IS 5.89304E-12 DEGREES
-
-
-METHOD I V R
-
-SIMPLE 1 0.000000 4567890.0000000
-ENCKE 1 0.000000 4567890.0000000
-BINARY 47 0.000000 4567890.0000000
-HERRICK 19 0.000000 4567890.0000000
-GAUSS 1 0.000000 4567890.0000000
-MEAN ANOMALY IS 6.26136E-12 DEGREES
-
-
-METHOD I V R
-
-SIMPLE 1 0.000000 4567890.0000000
-ENCKE 1 0.000000 4567890.0000000
-BINARY 47 0.000000 4567890.0000000
-HERRICK 19 0.000000 4567890.0000000
-GAUSS 1 0.000000 4567890.0000000
-MEAN ANOMALY IS 6.62967E-12 DEGREES
-
-
-METHOD I V R
-
-SIMPLE 1 0.000000 4567890.0000000
-ENCKE 1 0.000000 4567890.0000000
-BINARY 47 0.000000 4567890.0000000
-HERRICK 19 0.000000 4567890.0000000
-GAUSS 1 0.000000 4567890.0000000
-MEAN ANOMALY IS 6.99799E-12 DEGREES
-
-
-METHOD I V R
-
-SIMPLE 1 0.000000 4567890.0000000
-ENCKE 1 0.000000 4567890.0000000
-BINARY 47 0.000000 4567890.0000000
-HERRICK 19 0.000000 4567890.0000000
-GAUSS 1 0.000000 4567890.0000000
diff --git a/bwbtest/B15B/lens.INP b/bwbtest/B15B/lens.INP
deleted file mode 100644
index 82637ec..0000000
--- a/bwbtest/B15B/lens.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-1,2,3
-4,5,6
-7
diff --git a/bwbtest/B15B/lens.bas b/bwbtest/B15B/lens.bas
deleted file mode 100644
index 0e223e0..0000000
--- a/bwbtest/B15B/lens.bas
+++ /dev/null
@@ -1,35 +0,0 @@
-10 REM APLANATIC DOUBLET DESIGN
-12 REM
-14 INPUT "FRONT INDEXES";A,B,C
-16 INPUT "REAR INDEXES ";D,E,F
-18 INPUT "FOCAL LENGTH ";FL
-20 PRINT
-22 G=B/(B-1): H=E/(E-1)
-24 I=(B-1)/(C-A): J=(E-1)/(F-D)
-26 K=I^2: L=I^3: M=J^2: N=J^3
-28 O=(3-2/G)*I: P=(3-2/H)*J
-30 Q=(3*G-1)*K
-32 R=(8-4/H)*I*J-(3*H-1)*M
-34 S=(G^2)*L-(5-2/H)*K*J
-36 T=(4*H-1)*I*M-(H^2)*N
-38 U=(2-1/G)*I: V=(2-1/H)*J
-40 W=G*K-(3-1/H)*I*J+H*M
-42 X=(U^2)*P-(V^2)*O
-44 Y=2*U*W*P-(V^2)*Q+U*V*R
-46 Z=(W^2)*P-(V^2)*(S+T)+V*W*R
-48 A1=(Y-SQR(Y^2-4*X*Z))/(2*X)
-50 A2=(U*A1)/V-W/V
-52 R1=((I-J)/A1)*FL
-54 R2=((I-J)/(A1-(I*(G-1))))*FL
-56 R3=((I-J)/A2)*FL
-58 R4=((I-J)/(A2+(J*(H-1))))*FL
-60 PRINT "R1 = ";R1
-62 PRINT "R2 = ";R2
-64 PRINT "R3 = ";R3
-66 PRINT "R4 = ";R4
-68 END
-70 REM ------------------------
-80 REM APPEARED IN ASTRONOMICAL
-90 REM COMPUTING, SKY & TELE-
-92 REM SCOPE, NOVEMBER, 1984
-94 REM ------------------------
diff --git a/bwbtest/B15B/lens.run b/bwbtest/B15B/lens.run
deleted file mode 100644
index 7ab3277..0000000
--- a/bwbtest/B15B/lens.run
+++ /dev/null
@@ -1,8 +0,0 @@
-FRONT INDEXES? 1,2,3
-REAR INDEXES ? 4,5,6
-FOCAL LENGTH ? 7
-
-R1 = -4.27217
-R2 = -5.36326
-R3 = 17.2997
-R4 = 98.1781
diff --git a/bwbtest/B15B/lheight.INP b/bwbtest/B15B/lheight.INP
deleted file mode 100644
index 3b767a8..0000000
--- a/bwbtest/B15B/lheight.INP
+++ /dev/null
@@ -1,10 +0,0 @@
-56789
-4
-123
-145
-167
-189
-154
-165
-9876
-N
diff --git a/bwbtest/B15B/lheight.bas b/bwbtest/B15B/lheight.bas
deleted file mode 100644
index 7de40ce..0000000
--- a/bwbtest/B15B/lheight.bas
+++ /dev/null
@@ -1,61 +0,0 @@
-100 REM COMPUTING LUNAR HEIGHTS
-110 REM
-120 INPUT "HALF-HEIGHT CHORD (MM) ";L1
-130 INPUT "SEGMENT ";L2
-140 PRINT
-150 PRINT "USE VALUES IN DEGREES"
-160 PRINT
-170 INPUT "EARTH SEL. LONG. ";LE
-180 INPUT "EARTH SEL. LAT. ";BE
-190 INPUT "SUN SEL. COLONG. ";CS
-200 INPUT "SUN SEL. LAT. ";BS
-210 REM CONVERT DEGREES TO RADIANS
-220 DR = 3.14159/180
-230 LS = 90-CS
-240 IF LS900 THEN FR=SQR(TH/900) : REM APPEAR EXTENDED
-530 FC=10^(0.4*(CI/2-1)) : REM COLOR OF STAR
-540 FS=1.0 : REM OBSERVER'S SENSITIVITY
-550 REM
-560 REM CALCULATE SKY BRIGHTNESS
-570 REM
-580 IF MZ>=(7-K) THEN 620 : REM
-590 XX=0.2*(8.68-K-MZ) : REM FS ASSUMED = 1
-600 BS=39.7*(10^XX-1)^2 : REM SKY BRIGHTNESS FOR MZ
-610 GOTO 650
-620 BS=54 : REM BEST POSS. SKY BRIGHT-
-630 FS=10^(0.4*(7-K-MZ)) : REM NESS & GOOD EYESIGHT
-640 REM
-650 BS=BS*(Z*Z*0.5+1) : REM ZENITH HAS DARKEST SKY
-660 B=BS/(FB*FT*FPX*FA*FM*FC) : REM BACKGROUND BRIGHTNESS
-670 REM IN TELESCOPE
-690 REM CALCULATE LIMITING MAGNITUDE
-700 REM
-710 I=CC*(1+SQR(KK*B))^2 : REM Hecht (JOSA,v37,p59,1947)
-720 IS=I*FB*FE*FT*FPX*FA*FR*FC*FS : REM FOR NO SCOPE, NO AIR
-730 M=-16.57-2.5*LOG(IS)/LOG(10) : REM INTENSITY TO V MAG
-740 M=M+(EX-6)*0.16 : REM EMPIRICAL EXPERIENCE
-750 REM CORRECTION
-760 PRINT "VISUAL LIMITING MAGNITUDE = ";M
-770 END
-800 REM
-810 REM This program by Bradley Schaefer calculates the
-820 REM limiting stellar magnitude an observer can expect
-830 REM to see with various types and sizes of telescopes,
-840 REM and under various conditions. It is fully discussed
-850 REM in SKY & TELESCOPE magazine, November, 1989, page 522.
diff --git a/bwbtest/B15B/limmag.run b/bwbtest/B15B/limmag.run
deleted file mode 100644
index 69f7a71..0000000
--- a/bwbtest/B15B/limmag.run
+++ /dev/null
@@ -1,12 +0,0 @@
-SCOPE APERTURE ? 7
-POWER ? 9
-LIM MAG AT ZENITH ? 2
-OBSERVER'S AGE ? 3
-TELESCOPE TYPE (1-3) ? 2
-CLEANLINESS (1-9) ? 8
-COLOR INDEX OF STAR ? 4
-ZENITH DISTANCE ? 56789
-EXTINCTION COEFF ? 1.2
-SEEING DISK RADIUS ? 2.3
-EXPERIENCE (1-9) ? 3
-VISUAL LIMITING MAGNITUDE = 61.4254
diff --git a/bwbtest/B15B/lookback.INP b/bwbtest/B15B/lookback.INP
deleted file mode 100644
index 4fe64b8..0000000
--- a/bwbtest/B15B/lookback.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-A
-16
-T
-1
diff --git a/bwbtest/B15B/lookback.bas b/bwbtest/B15B/lookback.bas
deleted file mode 100644
index 01e2e70..0000000
--- a/bwbtest/B15B/lookback.bas
+++ /dev/null
@@ -1,48 +0,0 @@
-10 REM LOOKBACK.BAS - Lookback Time
-20 REM by Thomas A. Weil
-30 RM = 3700 / 2.7-1
-40 INPUT "Will you enter the (A)ge of the universe or the (H)ubble parameter"; AH$
-50 IF AH$ = "H" OR AH$ = "h" GOTO 90
-60 IF AH$ <> "A" AND AH$ <> "a" GOTO 40
-70 INPUT "Enter age of the universe NOW in billions of years"; TN
-80 TN = TN * 1E+09: GOTO 110
-90 INPUT "Enter Hubble parameter in km/sec/Mpc"; HN
-100 TN = (2 / 3) / (HN / 9.7781E+11)
-110 INPUT "Enter (T)ime THEN or (R)edshift of the light we see NOW"; TR$
-120 IF TR$ = "R" OR TR$ = "r" GOTO 190
-130 IF TR$ <> "T" AND TR$ <> "t" GOTO 110
-140 INPUT "Enter age of the universe THEN in billions of years"; TT
-150 TT = TT * 1E+09: SC = (TN / TT) ^ (2 / 3): RS = SC - 1: IF RS < RM GOTO 230
-160 SM = RM + 1: TM = TN / (SM ^ 1.5)
-170 PRINT : PRINT USING "You can't look back to a time earlier than ####### years"; TM
-180 PRINT : GOTO 110
-190 INPUT "Enter redshift value for the light we see NOW"; RS
-200 SC = RS + 1: TT = TN / (SC ^ 1.5): IF RS < RM GOTO 230
-210 PRINT : PRINT USING "Redshift value too large; nothing at redshift beyond ##### can be seen"; RM
-220 GOTO 160
-230 PRINT : PRINT USING "Age of the universe NOW = ###.#### billion years"; TN / 1E+09
-240 PRINT USING "Age of the universe THEN = ###.#### billion years"; TT / 1E+09
-250 TV = TN - TT
-260 PRINT USING "Light travel time = ###.#### billion years"; TV / 1E+09
-270 SC = (TN / TT) ^ (2 / 3)
-280 PRINT USING "Scale of the universe NOW versus THEN = ####.###"; SC
-290 RS = SC - 1
-300 PRINT USING "Redshift of the light we see NOW = ####.###"; RS
-310 DT = 3 * TT * ((TN / TT) ^ (1 / 3) - 1)
-320 PRINT USING "Distance of object THEN = ##.### billion light-years"; DT / 1E+09
-330 DN = DT * SC
-340 PRINT USING "Distance of object NOW = ##.### billion light-years"; DN / 1E+09
-350 ST = 2 * ((TN / TT) ^ (1 / 3) - 1)
-360 PRINT USING "Speed away from us THEN = ##.### x speed of light"; ST
-370 SN = 2 * ((TN / TT) ^ (1 / 3) - 1) / (TN / TT) ^ (1 / 3)
-380 PRINT USING "Speed away from us NOW = ##.### x speed of light"; SN
-390 HT = (2 / 3) / TT * 9.7781E+11
-400 PRINT USING "Hubble parameter THEN = #######.# km/sec/megaparsec"; HT
-410 HN = (2 / 3) / TN * 9.7781E+11
-420 PRINT USING "Hubble parameter NOW = #######.# km/sec/megaparsec"; HN
-500 REM ========================
-510 REM FROM "ASTRONOMICAL
-520 REM COMPUTING," SKY & TELE-
-530 REM SCOPE, SEPTEMBER 1997
-540 REM ========================
-550 END
diff --git a/bwbtest/B15B/lookback.run b/bwbtest/B15B/lookback.run
deleted file mode 100644
index e6beb87..0000000
--- a/bwbtest/B15B/lookback.run
+++ /dev/null
@@ -1,16 +0,0 @@
-Will you enter the (A)ge of the universe or the (H)ubble parameter? A
-Enter age of the universe NOW in billions of years? 16
-Enter (T)ime THEN or (R)edshift of the light we see NOW? T
-Enter age of the universe THEN in billions of years? 1
-
-Age of the universe NOW = 16.0000 billion years
-Age of the universe THEN = 1.0000 billion years
-Light travel time = 15.0000 billion years
-Scale of the universe NOW versus THEN = 6.350
-Redshift of the light we see NOW = 5.350
-Distance of object THEN = 4.560 billion light-years
-Distance of object NOW = 28.951 billion light-years
-Speed away from us THEN = 3.040 x speed of light
-Speed away from us NOW = 1.206 x speed of light
-Hubble parameter THEN = 651.9 km/sec/megaparsec
-Hubble parameter NOW = 40.7 km/sec/megaparsec
diff --git a/bwbtest/B15B/lookbak2.INP b/bwbtest/B15B/lookbak2.INP
deleted file mode 100644
index c6b87a7..0000000
--- a/bwbtest/B15B/lookbak2.INP
+++ /dev/null
@@ -1,6 +0,0 @@
-0.1
-0.9
-A
-16
-T
-1
diff --git a/bwbtest/B15B/lookbak2.bas b/bwbtest/B15B/lookbak2.bas
deleted file mode 100644
index 1f4eb39..0000000
--- a/bwbtest/B15B/lookbak2.bas
+++ /dev/null
@@ -1,123 +0,0 @@
-100 REM LOOKBAK2.BAS - May 2001; Updated Sept. 2003
-110 REM by Thomas A. Weil, taweil@aol.com
-112 REM Now handles user-specified values for both OmegaM and OmegaL.
-114 REM Includes some code from Ned Wright's Cosmology Calculator,
-116 REM http://www.astro.ucla.edu/~wright/CosmoCalc.html
-120 INPUT "Enter Matter Density of the universe, OmegaM (0 - 2.0)"; OMG
-130 IF OMG<0 OR OMG>2 GOTO 120
-140 INPUT "Enter Cosmological Constant, OmegaL (0. - 1.0)"; LAM
-150 IF LAM<0 OR LAM>1 GOTO 140
-160 INPUT "Will you enter (A)ge of the universe or (H)ubble constant"; AH$
-170 IF AH$="H" OR AH$="h" GOTO 210
-180 IF AH$<>"A" AND AH$<>"a" GOTO 160
-190 INPUT "Enter Age of the universe NOW in billions of years"; TN
-200 TN=TN*1E+09 : HN=60 : M=8 : GOTO 220
-210 INPUT "Enter Hubble constant in km/sec/Mpc"; HN : M=1
-212 REM N is the number of iterations to be used in each FOR-NEXT.
-214 REM Ned Wright's Cosmology Calculator uses N=1000, but N=200
-216 REM is faster and still seems to be quite accurate.
-218 REM HFAC converts the Hubble constant to units of km/sec/Mpc from speed
-219 REM as a fraction of the speed of light per light year of distance.
-220 N=200 : DELTA=.0000001 : HFAC=9.7782E+11 : E=2.718282 : PARSEC=3.2616
-222 REM For user-specified TN, we now calculate HN, but since ORDX depends
-224 REM on HN, we need to iterate AgeFac until the results converge.
-226 REM AgeFac is the factor to multiply the inverse of the Hubble
-228 REM constant by to determine the age of the universe.
-230 FOR J=1 TO M
-232 REM OMC is Omega(Curvature); OMC=0 gives us a "flat" universe.
-234 REM ORDX is Omega(Radiation), which is radiation pressure, which was a
-236 REM major contributor to expansion when the universe was very young.
-240 ORDX=.4165/(HN*HN) : OMC=1-OMG-LAM-ORDX : Z=5 : AZ=1/(1+Z) : AA=0
-242 REM Calc. age at redshift Z, and lookback time, and add them to get Age
-244 REM Now (TN). For this calculation we assume Z=5, but any value would do.
-250 TRS=0 : TLB=0 : FOR I=1 TO N : A=AZ*(I-.5)/N : AA=AZ+(1-AZ)*(I-.5)/N
-260 TRS=TRS+1/SQR(OMC+(OMG/A)+(ORDX/(A*A))+(LAM*A*A))
-270 TLB=TLB+1/SQR(OMC+(OMG/AA)+(ORDX/(AA*AA))+(LAM*AA*AA)) : NEXT I
-280 AGEFAC=TLB/N*(1-AZ)+TRS/N*AZ
-290 IF AH$="H" OR AH$="h" GOTO 310
-300 HN=AGEFAC/TN*HFAC
-310 NEXT J
-320 TN=AGEFAC/HN*HFAC
-330 INPUT "Will you enter (T)ime THEN or (R)edshift of the light we see NOW"; TR$
-340 IF TR$="R" OR TR$="r" GOTO 470
-350 IF TR$<>"T" AND TR$<>"t" GOTO 330
-360 INPUT "Enter Age of the universe THEN, in billions of years"; TTT
-370 TTT=TTT*1E+09 : IF TTT>299999 GOTO 410
-380 PRINT
-390 PRINT " You cannot see back to a time earlier than about 300,000 years"
-392 REM My first article in S&T, Sept. 1997, page 59, explains why.
-400 PRINT : GOTO 330
-410 PRINT " Finding what redshift matches Age THEN ......" : Z=(TN-TTT)/TN
-420 AZ=1/(1+Z) : TRS=0 : FOR I=1 TO N : A=AZ*(I-.5)/N
-430 TRS=TRS+1/SQR(OMC+OMG/A+ORDX/(A*A)+LAM*A*A) : NEXT I
-440 TT=TRS/N*HFAC/HN*AZ : TOL=TOL+DELTA
-450 IF TT/TTT>1-TOL AND TT/TTT<1+TOL GOTO 480
-452 REM If Time Then (TT) doesn't match yet, adjust Z accordingly
-460 Z=Z*(.2+.8*TT/TTT) : GOTO 420
-470 INPUT "Enter redshift value for the light we see NOW"; Z
-472 REM Calculate Distances
-480 DCMR=0 : AZ=1/(1+Z) : FOR I=1 TO N
-490 A=AZ+(1-AZ)*(I-.5)/N : ADOT=SQR(OMC+(OMG/A)+(ORDX/(A*A))+(LAM*A*A))
-500 DCMR=DCMR+1/(A*ADOT) : NEXT I
-510 DCMR=(1-AZ)*DCMR/N : X=SQR(ABS(OMC))*DCMR : IF X<=.1 GOTO 550
-520 IF OMC>0 GOTO 540
-530 RATIO=SIN(X)/X : GOTO 580
-540 RATIO=.5*(E^X-E^(-X))/X : GOTO 580
-550 Y=X*X : IF OMC>=0 GOTO 570
-560 Y=(-Y)
-570 RATIO=1+Y/6+Y*Y/120
-580 DL=AZ*RATIO*DCMR/(AZ*AZ)*977.82/HN : DN=DL/(1+Z) : DT=DN/(1+Z)
-582 REM Calculate Time Then (TT) at redshift Z
-590 AZ=1/(1+Z) : AGE=0 : FOR I=1 TO N
-600 A=AZ*(I-.5)/N : AGE=AGE+1/SQR(OMC+OMG/A+ORDX/(A*A)+LAM*A*A) : NEXT I
-610 TT=HFAC/HN*AZ*AGE/N : TV=TN-TT : DMOD=5*.4343*LOG(DL*1E+09/(10*PARSEC))
-620 IF TT<300000 GOTO 380
-630 HT=HN*SQR(OMG*(1+Z)^3+(1-OMG-LAM-ORDX)*(1+Z)^2+LAM+ORDX*(1+Z)^4)
-640 ST=HT*DT/977.82 : SC=Z+1 : SN=HN*DN*1E+09/HFAC
-650 PRINT USING "Age Factor NOW (Age=Fac/H0) = ##.####";AGEFAC
-660 PRINT USING "Age of the universe NOW =####.#### billion years"; TN/1E+09
-670 PRINT USING "Age of the universe THEN =####.#### billion years"; TT/1E+09
-680 PRINT USING "Light travel time =####.#### billion years"; TV/1E+09
-690 PRINT USING "Redshift of the light we see NOW =#####.###"; Z
-700 PRINT USING "Scale of the universe NOW versus THEN =#####.###"; SC
-710 PRINT USING "Distance of object THEN = #####.### billion light-years"; DT
-720 PRINT USING "Distance of object NOW = ######.### billion light-years"; DN
-730 PRINT USING "Luminosity Distance NOW =#######.### billion light-years"; DL
-740 PRINT USING "Distance Modulus = ######.###"; DMOD
-750 PRINT USING "Speed away from us THEN =####.### x speed of light*"; ST
-760 PRINT USING "Speed away from us NOW =####.### x speed of light*"; SN
-770 PRINT USING "Hubble constant THEN =########.## km/sec/megaparsec"; HT
-780 PRINT USING "Hubble constant NOW =########.## km/sec/megaparsec"; HN
-790 PRINT " * Not the object's own speed, but caused by the expansion of space."
-800 END
-900 REM ---------------------------
-910 REM APPEARED IN COMPUTERS IN ASTRONOMY,
-920 REM SKY & TELESCOPE, AUGUST 2001, PAGE 62.
-930 REM Corrections made Sept. 2003 to lines 232, 550, and 630, with
-932 REM many thanks to Bruce Nelson, a great mathematician whose hobby
-934 REM is cosmology and who decided to re-derive all these equations!
-936 REM The updates give smoother results when OMC is small and more
-938 REM accurate results for HT and ST for very large values of Z.
-940 REM ---------------------------
-950 REM ** SAMPLE RUN, for OmegaM=.35, OmegaL=.65, H0=61, and Z=1.7 **
-960 REM Enter Matter Density of the Universe, OmegaM (0 - 2.0)? .35
-970 REM Enter Cosmological Constant, OmegaL (0. - 1.0)? .65
-980 REM Will you enter (A)ge of the universe or (H)ubble constant? H
-990 REM Enter Hubble constant in km/sec/Mpc? 61
-1000 REM Will you enter (T)ime THEN or (R)edshift of the light we see NOW? R
-1010 REM Enter redshift value for the light we see NOW? 1.7
-1020 REM Age Factor NOW (Age=Fac/H0) = 0.9226
-1030 REM Age of the universe NOW = 14.7887 billion years
-1040 REM Age of the universe THEN = 4.0054 billion years
-1050 REM Light travel time = 10.7833 billion years
-1060 REM Redshift of the light we see NOW = 1.700
-1070 REM Scale of the universe NOW versus THEN = 2.700
-1080 REM Distance of object THEN = 6.292 billion light-years
-1090 REM Distance of object NOW = 16.987 billion light-years
-1100 REM Luminosity Distance NOW = 45.865 billion light-years
-1110 REM Distance Modulus = 45.741
-1120 REM Speed away from us THEN = 1.078 x speed of light*
-1130 REM Speed away from us NOW = 1.060 x speed of light*
-1140 REM Hubble constant THEN = 167.55 km/sec/megaparsec
-1150 REM Hubble constant NOW = 61.00 km/sec/megaparsec
-1160 REM * Not the object's own speed, but caused by the expansion of space.
diff --git a/bwbtest/B15B/lookbak2.run b/bwbtest/B15B/lookbak2.run
deleted file mode 100644
index 1bdcecf..0000000
--- a/bwbtest/B15B/lookbak2.run
+++ /dev/null
@@ -1,22 +0,0 @@
-Enter Matter Density of the universe, OmegaM (0 - 2.0)? 0.1
-Enter Cosmological Constant, OmegaL (0. - 1.0)? 0.9
-Will you enter (A)ge of the universe or (H)ubble constant? A
-Enter Age of the universe NOW in billions of years? 16
-Will you enter (T)ime THEN or (R)edshift of the light we see NOW? T
-Enter Age of the universe THEN, in billions of years? 1
- Finding what redshift matches Age THEN ......
-Age Factor NOW (Age=Fac/H0) = 1.2766
-Age of the universe NOW = 16.0000 billion years
-Age of the universe THEN = 1.0000 billion years
-Light travel time = 15.0000 billion years
-Redshift of the light we see NOW = 7.810
-Scale of the universe NOW versus THEN = 8.810
-Distance of object THEN = 4.235 billion light-years
-Distance of object NOW = 37.310 billion light-years
-Luminosity Distance NOW = 328.712 billion light-years
-Distance Modulus = 50.018
-Speed away from us THEN = 2.821 x speed of light*
-Speed away from us NOW = 2.977 x speed of light*
-Hubble constant THEN = 651.33 km/sec/megaparsec
-Hubble constant NOW = 78.02 km/sec/megaparsec
- * Not the object's own speed, but caused by the expansion of space.
diff --git a/bwbtest/B15B/lunar.INP b/bwbtest/B15B/lunar.INP
deleted file mode 100644
index 9b3c236..0000000
--- a/bwbtest/B15B/lunar.INP
+++ /dev/null
@@ -1 +0,0 @@
-2015
diff --git a/bwbtest/B15B/lunar.bas b/bwbtest/B15B/lunar.bas
deleted file mode 100644
index 036324d..0000000
--- a/bwbtest/B15B/lunar.bas
+++ /dev/null
@@ -1,122 +0,0 @@
-10 REM NEW AND FULL MOONS
-12 REM
-14 REM
-16 R1=3.14159265/180: U=0
-18 INPUT "YEAR ";Y
-19 G=1: IF Y<1583 THEN G=0
-20 PRINT
-22 K0=INT((Y-1900)*12.3685)
-24 T=(Y-1899.5)/100
-26 T2=T*T: T3=T*T*T
-28 J0=2415020+29*K0
-30 F0=0.0001178*T2-0.000000155*T3
-32 F0=F0+0.75933+0.53058868*K0
-34 F0=F0-0.000837*T-0.000335*T2
-36 J0=J0+INT(F0): F0=F0-INT(F0)
-38 M0=K0*0.08084821133
-40 M0=360*(M0-INT(M0))+359.2242
-42 M0=M0-0.0000333*T2
-44 M0=M0-0.00000347*T3
-46 M1=K0*0.07171366128
-48 M1=360*(M1-INT(M1))+306.0253
-50 M1=M1+0.0107306*T2
-52 M1=M1+0.00001236*T3
-54 B1=K0*0.08519585128
-56 B1=360*(B1-INT(B1))+21.2964
-58 B1=B1-0.0016528*T2
-60 B1=B1-0.00000239*T3
-62 FOR K9=1 TO 27 STEP 2
-64 J=J0+14*K9: F=F0+0.765294*K9
-66 K=K9/2
-68 M5=(M0+K*29.10535608)*R1
-69 M6=(M1+K*385.81691806)*R1
-70 B6=(B1+K*390.67050646)*R1
-71 F=F-0.4068*SIN(M6)
-72 F=F+(0.1734-0.000393*T)*SIN(M5)
-73 F=F+0.0161*SIN(2*M6)
-74 F=F-0.0104*SIN(2*B6)
-75 F=F-0.0074*SIN(M5-M6)
-76 F=F-0.0051*SIN(M5+M6)
-77 F=F+0.0021*SIN(2*M5)
-81 F=F+0.5/1440
-82 J=J+INT(F): F=F-INT(F)
-86 GOSUB 100
-92 NEXT
-94 GO TO 999
-100 REM LUNAR ECLIPSE SUBROUTINE
-102 D7=0
-104 IF ABS(SIN(B6))>0.36 THEN 196
-106 S=5.19595-0.0048*COS(M5)
-108 S=S+0.0020*COS(2*M5)
-110 S=S-0.3283*COS(M6)
-112 S=S-0.0060*COS(M5+M6)
-114 S=S+0.0041*COS(M5-M6)
-116 C1=0.2070*SIN(M5)
-118 C1=C1+0.0024*SIN(2*M5)
-120 C1=C1-0.0390*SIN(M6)
-122 C1=C1+0.0115*SIN(2*M6)
-124 C1=C1-0.0073*SIN(M5+M6)
-126 C1=C1-0.0067*SIN(M5-M6)
-128 C1=C1+0.0117*SIN(2*B6)
-130 D9=ABS(S*SIN(B6)+C1*COS(B6))
-132 U=0.0059+0.0046*COS(M5)
-134 U=U-0.0182*COS(M6)
-136 U=U+0.0004*COS(2*M6)
-138 U=U-0.0005*COS(M5+M6)
-140 RP=1.2847+U: RU=0.7404-U
-142 MP=(1.5572+U-D9)/0.545
-144 IF MP<0 THEN 196
-146 MU=(1.0129-U-D9)/0.545
-148 D5=1.5572+U: D6=1.0129-U
-150 D7=0.4679-U
-152 N=(0.5458+0.04*COS(M6))/60
-154 D5=SQR(D5*D5-D9*D9)/N
-156 IF MU<=0 THEN 164
-158 D6=SQR(D6*D6-D9*D9)/N
-160 IF MU<=1 THEN 164
-162 D7=SQR(D7*D7-D9*D9)/N
-164 GOSUB 900: PRINT
-166 PRINT "ECLIPSE DATE: ";Y;M;D1
-168 PRINT " MAXIMUM PHASE: ";
-170 PRINT H1;"h ";M9;"m UT"
-172 MP=INT(1000*MP+0.5)/1000
-174 PRINT " PENUMBRAL MAG: ";MP
-176 IF MU<=0 THEN 182
-178 MU=INT(1000*MU+0.5)/1000
-180 PRINT " UMBRAL MAG: ";MU
-182 PRINT " SEMIDURATIONS --"
-184 D5=INT(D5+0.5): REM ROUND OFF
-186 PRINT " PENUMBRA: ";D5;"m"
-188 IF MU<0 THEN 196
-190 D6=INT(D6+0.5): D7=INT(D7+0.5)
-192 PRINT " UMBRA: ";D6;"m"
-194 PRINT " TOTALITY: ";D7;"m"
-196 RETURN
-900 REM JD --> CALENDAR
-905 REM
-920 F=F+0.5
-925 IF F<1 THEN 935
-930 F=F-1: J=J+1
-935 IF G=1 THEN 945
-940 A=J: GOTO 955
-945 A1=INT((J/36524.25)-51.12264)
-950 A=J+1+A1-INT(A1/4)
-955 B=A+1524
-960 C=INT((B/365.25)-0.3343)
-965 D=INT(365.25*C)
-970 E=INT((B-D)/30.61)
-975 D=B-D-INT(30.61*E)+F
-980 M=E-1: Y=C-4716
-985 IF E>13.5 THEN M=M-12
-990 IF M<2.5 THEN Y=Y+1
-993 D1=INT(D): H=24*(D-D1)
-994 H1=INT(H): M9=INT(60*(H-H1))
-997 RETURN
-999 END
-1000 REM ***********************
-1001 REM THIS IS THE *COMPLETE*
-1002 REM PROGRAM FOR PREDICTING
-1003 REM LUNAR ECLIPSES (SEE
-1004 REM SKY & TELESCOPE, JUNE,
-1005 REM 1988, PAGE 640)
-1006 REM ***********************
diff --git a/bwbtest/B15B/lunar.run b/bwbtest/B15B/lunar.run
deleted file mode 100644
index e13c2ab..0000000
--- a/bwbtest/B15B/lunar.run
+++ /dev/null
@@ -1,20 +0,0 @@
-YEAR ? 2015
-
-
-ECLIPSE DATE: 2015 4 4
- MAXIMUM PHASE: 12 h 0 m UT
- PENUMBRAL MAG: 2.074
- UMBRAL MAG: .994
- SEMIDURATIONS --
- PENUMBRA: 178 m
- UMBRA: 104 m
- TOTALITY: 0 m
-
-ECLIPSE DATE: 2015 9 28
- MAXIMUM PHASE: 2 h 46 m UT
- PENUMBRAL MAG: 2.228
- UMBRAL MAG: 1.275
- SEMIDURATIONS --
- PENUMBRA: 155 m
- UMBRA: 99 m
- TOTALITY: 36 m
diff --git a/bwbtest/B15B/mallam.INP b/bwbtest/B15B/mallam.INP
deleted file mode 100644
index a96b328..0000000
--- a/bwbtest/B15B/mallam.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-MARS
-987
-65
diff --git a/bwbtest/B15B/mallam.bas b/bwbtest/B15B/mallam.bas
deleted file mode 100644
index 87fa3a0..0000000
--- a/bwbtest/B15B/mallam.bas
+++ /dev/null
@@ -1,56 +0,0 @@
-10 REM PRECESSION OF A SATELLITE'S ORBIT DUE TO J2
-20 REM
-30 GOSUB 260: J=0
-40 INPUT "Planet's name"; P$
-50 FOR K=1 TO 9
-60 IF P$=PL$(K) THEN J=K
-70 NEXT
-80 IF J=0 THEN 40
-90 REM
-100 INPUT "Altitude of the satellite orbit (km)"; A
-110 INPUT "Inclination to the equator (degrees)"; I
-120 I=I/RD: REM Convert to radians
-130 REM
-140 K1=R(J)*R(J) * (R(J)+A)^(-3.5) * SQR(GM(J))
-150 N=-1.5*K1*J2(J)*COS(I)
-160 P=.75*K1*J2(J) * (5*COS(I)*COS(I)-1)
-170 N=N*RD*S: P=P*RD*S: REM Radians/sec to deg/day
-180 REM
-190 PRINT "Precession of the node: "
-200 PRINT " ";N;"deg/day, ";N*Y;"deg/yr"
-210 PRINT
-220 PRINT "Precession of pericenter: "
-230 PRINT " ";P;"deg/day, ";P*Y;"deg/yr"
-240 REM
-250 END
-260 REM READ IN DATA
-270 DIM PL$(9), GM(9), J2(9), R(9)
-280 RD=180/3.14159265#: REM Radians to degrees
-290 Y=365.2422: REM Days per year
-300 S=86400: REM Seconds per day
-310 REM
-320 DATA "MERCURY","VENUS","EARTH","MOON","MARS"
-330 DATA "JUPITER","SATURN","URANUS","NEPTUNE"
-340 FOR J=1 TO 9: READ PL$(J): NEXT
-350 REM
-360 REM PLANETARY GM'S (KM^3/S^2)
-370 DATA 22032, 324860, 398600, 4902, 42828
-380 DATA 125680000, 37931000, 5793900, 6835000
-390 FOR J=1 TO 9: READ GM(J): NEXT
-400 REM
-410 REM PLANETARY J2'S
-420 DATA 0.00006, 0.0000186, 0.001083, 0.0002027
-430 DATA 0.00196,0.014736,0.016480,0.003345,0.0043
-440 FOR J=1 TO 9: READ J2(J): NEXT
-450 REM
-460 REM PLANETARY RADII (KM)
-470 DATA 2440, 6050, 6378, 1738, 3398
-480 DATA 71492, 60268, 25559, 24760
-490 FOR J=1 TO 9: READ R(J): NEXT
-500 RETURN
-510 REM
-520 REM This program by Anthony Mallama predicts how
-530 REM a satellite in a low orbit around the Earth
-540 REM or any other planet will change due to the
-550 REM planet's equatorial bulge. It is described
-560 REM fully in Sky & Telescope, May, 1990, page 543.
diff --git a/bwbtest/B15B/mallam.run b/bwbtest/B15B/mallam.run
deleted file mode 100644
index 24fd8e9..0000000
--- a/bwbtest/B15B/mallam.run
+++ /dev/null
@@ -1,8 +0,0 @@
-Planet's name? MARS
-Altitude of the satellite orbit (km)? 987
-Inclination to the equator (degrees)? 65
-Precession of the node:
- -2.63238 deg/day, -961.457 deg/yr
-
-Precession of pericenter:
- -.333142 deg/day, -121.677 deg/yr
diff --git a/bwbtest/B15B/mars.INP b/bwbtest/B15B/mars.INP
deleted file mode 100644
index 8df3b33..0000000
--- a/bwbtest/B15B/mars.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-2015,03,01
-12,34,56
diff --git a/bwbtest/B15B/mars.bas b/bwbtest/B15B/mars.bas
deleted file mode 100644
index c795691..0000000
--- a/bwbtest/B15B/mars.bas
+++ /dev/null
@@ -1,173 +0,0 @@
-100 REM PHYSICAL EPHEMERIS OF MARS
-105 REM
-106 DEFDBL A-Z
-110 DT=57: REM Value of ET-UT (sec)
-111 REM in 1990; change DT for
-112 REM other years as needed!!
-115 P1=3.14159265#
-120 P2=2*P1: RD=180/P1: DR=1/RD
-125 GOSUB 330: REM Get date and UT
-130 D=(J-2451545!)+F
-135 D=D+DT/86400!: REM UT to ET
-140 GOSUB 405: PRINT
-145 READ A1,A2,D1,D2
-150 T=T-1: REM Cent from 2000.0
-155 A1=A1+A2*T
-160 D1=D1+D2*T
-165 Q=A1: GOSUB 710: A1=Q*DR
-170 Q=D1: GOSUB 710: D1=Q*DR
-175 D9=COS(D5)*SIN(A1-A5)
-180 N9=SIN(D1)*COS(D5)*COS(A1-A5)
-185 N9=N9-COS(D1)*SIN(D5)
-190 K=RD*ATN(N9/D9)
-195 IF D9<0 THEN K=K+180
-205 READ W0,W1,W2: GOSUB 304
-215 REM
-220 REM Planetocentric decl. Earth
-222 SD=-SIN(D1)*SIN(D5)
-224 SD=SD-COS(D1)*COS(D5)*COS(A1-A5)
-226 DE=RD*ATN(SD/SQR(1-SD*SD))
-228 REM
-230 REM P.A. of Axis
-232 SP=COS(D1)*SIN(A1-A5)
-234 CP=SIN(D1)*COS(D5)
-236 CP=CP-COS(D1)*SIN(D5)*COS(A1-A5)
-238 PA=RD*ATN(SP/CP)
-240 IF CP<0 THEN PA=PA+180
-242 IF PA<0 THEN PA=PA+360
-244 IF PA>=360 THEN PA=PA-360
-248 REM
-250 REM Phase and magnitude
-252 K4=((R4+RR)^2-R*R)/(4*R4*RR)
-254 CI=(R4*R4+RR*RR-R*R)/(2*R4*RR)
-256 I=RD*ATN(SQR(1-CI*CI)/CI)
-258 M4=5*LOG(RR*R4)/LOG(10)
-260 M4=-1.52+.016*I+M4
-262 REM
-270 A1$="Central meridian: ###.##"
-272 A2$="P.A. of axis: ###.##"
-274 A3$="Decl. of Earth: ###.##"
-276 A4$="Angular diameter: ###.#"
-278 A5$="Phase: ###.###"
-280 A6$="Magnitude: ###.#"
-282 PRINT USING A1$;C
-284 PRINT USING A2$;PA
-286 PRINT USING A3$;DE
-288 PRINT USING A4$;9.359999/RR
-290 PRINT USING A5$;K4
-292 PRINT USING A6$;M4
-300 END
-304 REM Rotations from epoch
-305 W=W0+W1*(D-.0057755*RR)+W2*T
-306 Q=W-K: GOSUB 710: C=Q
-308 RETURN
-309 REM North Pole R.A.
-310 DATA 317.681, +0.678
-311 REM North Pole Dec.
-312 DATA 52.886, +0.352
-313 REM Rotation
-314 DATA 176.655,350.8919830,0.62
-315 REM
-320 REM Calendar --> JD
-325 REM
-330 INPUT "YR,MO,DAY ";Y,M,D
-335 INPUT "UT (H,M,S) ";H1,M1,S1
-340 D=D+H1/24+M1/1440+S1/86400!
-345 G=1: IF Y<1582 THEN G=0
-350 D1=INT(D): F=D-D1-.5
-355 J=-INT(7*(INT((M+9)/12)+Y)/4)
-360 IF G=0 THEN 380
-365 S=SGN(M-9): A=ABS(M-9)
-370 J3=INT(Y+S*INT(A/7))
-375 J3=-INT((INT(J3/100)+1)*3/4)
-380 J=J+INT(275*M/9)+D1+G*J3
-385 J=J+1721027!+2*G+367*Y
-390 IF F>=0 THEN 400
-395 F=F+1: J=J-1
-400 RETURN
-405 REM Fundamental Arguments
-410 REM
-415 T=D/36525!+1
-420 REM T=Centuries from 1900.0
-425 L0=.779072+.00273790931#*D
-430 G0=.993126+.0027377785#*D
-431 L4=.987353+.00145575328#*D
-432 G4=.053856+.00145561327#*D
-433 F4=.849694+.00145569465#*D
-435 L5=.089608+.00023080893#*D
-440 G5=.056531+.00023080893#*D
-445 G6=.882987+9.294371E-05*D
-450 L0=(L0-INT(L0))*P2
-455 G0=(G0-INT(G0))*P2
-456 L4=(L4-INT(L4))*P2
-457 G4=(G4-INT(G4))*P2
-458 F4=(F4-INT(F4))*P2
-460 L5=(L5-INT(L5))*P2
-465 G5=(G5-INT(G5))*P2
-470 G6=(G6-INT(G6))*P2
-475 REM Sun
-480 L=6910*SIN(G0)
-485 L=L+72*SIN(2*G0)
-490 L=L-17*T*SIN(G0)
-495 L=L-7*COS(G0-G5)
-500 R=1.00014-.01675*COS(G0)
-505 R=R-.00014*COS(2*G0)
-510 L=L0+L/206265!
-515 REM Mars
-520 M=38451!*SIN(G4)
-525 M=M+2238*SIN(2*G4)
-530 M=M+181*SIN(3*G4)
-535 M=M-52*SIN(2*F4)
-540 M=M+37*T*SIN(G4)
-545 M=M-22*COS(G4-2*G5)
-550 M=M-19*SIN(G4-G5)
-555 M=M+17*COS(G4-G5)
-556 M=M+17*SIN(4*G4)
-557 M=M-16*COS(2*G4-2*G5)
-558 M=M+13*COS(G0-2*G4)
-559 M=M-10*SIN(G4-2*F4)
-560 M=M+7*COS(G0-G4)
-561 M=M-7*COS(2*G0-3*G4)
-564 B=6603*SIN(F4)
-565 B=B+622*SIN(G4-F4)
-570 B=B+615*SIN(G4+F4)
-575 B=B+64*SIN(2*G4+F4)
-580 R4=1.53031-.1417*COS(G4)
-585 R4=R4-.0066*COS(2*G4)
-590 R4=R4-.00047*COS(3*G4)
-615 L4=L4+M/206265!: B4=B/206265!
-620 N9=R4*COS(B4)*SIN(L4-L)
-625 D9=R4*COS(B4)*COS(L4-L)+R
-630 L1=ATN(N9/D9)
-635 IF D9<0 THEN L1=L1+P1
-640 LL=L1+L
-645 V=N9*N9+D9*D9
-650 RR=SQR(V+(R4*SIN(B4))^2)
-655 S=R4*SIN(B4)/RR
-660 BB=ATN(S/SQR(1-S*S))
-665 E=(84428!-47*T)/206265!
-670 N9=SIN(LL)*COS(E)-TAN(BB)*SIN(E)
-675 D9=COS(LL): A5=ATN(N9/D9)
-680 IF D9<0 THEN A5=A5+P1
-685 S=SIN(BB)*COS(E)
-690 S=S+COS(BB)*SIN(E)*SIN(LL)
-695 D5=ATN(S/SQR(1-S*S))
-700 RETURN
-705 REM
-710 REM Normalize Degrees
-715 Q=Q/360: Q=Q-INT(Q): Q=Q*360
-720 RETURN
-800 REM This program computes
-810 REM a number of interesting
-811 REM things about Mars' tele-
-812 REM scopic appearance at any
-813 REM date and time (UT). Valid
-814 REM for several centuries, pro-
-815 REM vided that you reset
-816 REM the value of 'Delta-T' in
-817 REM line 110 to an appropriate
-818 REM value. Written by Roger
-819 REM Sinnott, this program is
-820 REM explained more fully in
-821 REM Sky & Telescope magazine
-822 REM for Sept. 1990, page 296.
diff --git a/bwbtest/B15B/mars.run b/bwbtest/B15B/mars.run
deleted file mode 100644
index 3b8f1af..0000000
--- a/bwbtest/B15B/mars.run
+++ /dev/null
@@ -1,9 +0,0 @@
-YR,MO,DAY ? 2015,03,01
-UT (H,M,S) ? 12,34,56
-
-Central meridian: 354.05
-P.A. of axis: 329.72
-Decl. of Earth: -25.36
-Angular diameter: 4.2
-Phase: 0.975
-Magnitude: 1.3
diff --git a/bwbtest/B15B/meteor.INP b/bwbtest/B15B/meteor.INP
deleted file mode 100644
index 638a86c..0000000
--- a/bwbtest/B15B/meteor.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-987
-65.43
-2109
-87.65
diff --git a/bwbtest/B15B/meteor.bas b/bwbtest/B15B/meteor.bas
deleted file mode 100644
index 372c55b..0000000
--- a/bwbtest/B15B/meteor.bas
+++ /dev/null
@@ -1,36 +0,0 @@
-10 REM METEOR FLIGHT
-12 PRINT
-14 INPUT "INITIAL MASS (KG)";MM
-16 INPUT "DENSITY (KG PER CUBIC METER)";D
-18 INPUT "SPEED AT ENTRY (KM/S)";V
-20 INPUT "ZENITH ANGLE (DEG)";Z
-22 A=1: L=0.001: G=0.75: H0=0.2: H1=500000
-24 H=150000: T=0: T9=0.01: T0=0: T1=0.1
-26 M=MM: Z=COS(Z*3.1416/180): V=V*1000
-28 PRINT: GOSUB 64
-30 R=EXP(-H/6500): IF H<=130000 THEN GOTO 34
-32 R=2E-9*EXP(-(H-130000)/40000)
-34 A2=G*A*R*V*V/((M^0.33333)*(D^0.66667))
-36 M0=H0*A*R*V*V*V*((M/D)^0.66667)/(2*H1)
-38 V9=A2*T9: M9=M0*T9: T=T+T9: H=H-V*T9*Z
-40 V=V-V9: M=M-M9
-42 IF V<100 OR M<0 OR H<0 THEN GOTO 82
-44 IF M0/M<0.1 AND T0=0 THEN GOTO 30
-46 IF (T-T0)=12 THEN MM=MM-12
-70 K1=INT(365.25*(YY+4712))
-80 K2=INT(30.6*MM+.5)
-90 K3=INT(INT((YY/100)+49)*.75)-38
-100 J=K1+K2+D+59: ' JD for dates in Julian calendar
-110 IF J>2299160 THEN J=J-K3: ' For Gregorian calendar
-120 ' J is the Julian date at 12h UT on day in question
-130 '
-140 ' Calculate illumination (synodic) phase
-150 V=(J-2451550.1 )/29.530588853 : GOSUB 400: IPX=V
-160 AG=IPX*29.53: ' Moon's age in days
-170 IPX=IPX*P2: ' Convert phase to radians
-180 '
-190 ' Calculate distance from anomalistic phase
-200 V=(J-2451562.2 )/27.55454988 : GOSUB 400: DP=V
-210 DP=DP*P2: ' Convert to radians
-220 DI=60.4-3.3*COS(DP)-.6*COS(2*IPX-DP)-.5*COS(2*IPX)
-230 '
-240 ' Calculate latitude from nodal (draconic) phase
-250 V=(J-2451565.2 )/27.212220817 : GOSUB 400: NP=V
-260 NP=NP*P2: ' Convert to radians
-270 LA=5.1*SIN(NP)
-280 '
-290 ' Calculate longitude from sidereal motion
-300 V=(J-2451555.8 )/27.321582241 : GOSUB 400: RP=V
-310 LO=360*RP+6.3*SIN(DP)+1.3*SIN(2*IPX-DP)+.7*SIN(2*IPX)
-320 '
-330 PRINT "Moon's age from new (days): ";AG
-340 PRINT "Distance (Earth radii): ";DI
-350 PRINT "Ecliptic latitude (degrees): ";LA
-360 PRINT "Ecliptic longitude (degrees): ";LO
-370 PRINT: INPUT "Continue (y or n)";Q$
-380 IF Q$<>"N" AND Q$<>"n" THEN GOTO 40
-390 END
-400 ' Normalize values to range 0 to 1
-410 V=V-INT(V): IF V<0 THEN V=V+1
-420 RETURN
-430 '
-440 ' This program helps anyone who needs to know the Moon's
-450 ' phase (age), distance, and position along the ecliptic on
-460 ' any date within several thousand years in the past or future.
-470 ' To illustrate its application, Bradley Schaefer applied it
-480 ' to a number of famous events influenced by the Moon in
-490 ' World War II. His article appeared in Sky & Telescope for
-500 ' April 1994, page 86.
diff --git a/bwbtest/B15B/moonfx.run b/bwbtest/B15B/moonfx.run
deleted file mode 100644
index caff243..0000000
--- a/bwbtest/B15B/moonfx.run
+++ /dev/null
@@ -1,7 +0,0 @@
-Year, month, day? 2015,03,01
-Moon's age from new (days): 10.6797
-Distance (Earth radii): 62.9648
-Ecliptic latitude (degrees): -5.06297
-Ecliptic longitude (degrees): 113.748
-
-Continue (y or n)? n
diff --git a/bwbtest/B15B/moons.INP b/bwbtest/B15B/moons.INP
deleted file mode 100644
index 9b3c236..0000000
--- a/bwbtest/B15B/moons.INP
+++ /dev/null
@@ -1 +0,0 @@
-2015
diff --git a/bwbtest/B15B/moons.bas b/bwbtest/B15B/moons.bas
deleted file mode 100644
index 50f7f25..0000000
--- a/bwbtest/B15B/moons.bas
+++ /dev/null
@@ -1,52 +0,0 @@
-10 REM NEW AND FULL MOONS
-12 REM
-14 REM
-16 R1=3.14159265/180: U=0
-18 INPUT "YEAR ";Y
-20 PRINT
-22 K0=INT((Y-1900)*12.3685)
-24 T=(Y-1899.5)/100
-26 T2=T*T: T3=T*T*T
-28 J0=2415020+29*K0
-30 F0=0.0001178*T2-0.000000155*T3
-32 F0=F0+0.75933+0.53058868*K0
-34 F0=F0-0.000837*T-0.000335*T2
-36 J=J+INT(F): F=F-INT(F)
-38 M0=K0*0.08084821133
-40 M0=360*(M0-INT(M0))+359.2242
-42 M0=M0-0.0000333*T2
-44 M0=M0-0.00000347*T3
-46 M1=K0*0.07171366128
-48 M1=360*(M1-INT(M1))+306.0253
-50 M1=M1+0.0107306*T2
-52 M1=M1+0.00001236*T3
-54 B1=K0*0.08519585128
-56 B1=360*(B1-INT(B1))+21.2964
-58 B1=B1-0.0016528*T2
-60 B1=B1-0.00000239*T3
-62 FOR K9=0 TO 28
-64 J=J0+14*K9: F=F0+0.765294*K9
-66 K=K9/2
-68 M5=(M0+K*29.10535608)*R1
-69 M6=(M1+K*385.81691806)*R1
-70 B6=(B1+K*390.67050646)*R1
-71 F=F-0.4068*SIN(M6)
-72 F=F+(0.1734-0.000393*T)*SIN(M5)
-73 F=F+0.0161*SIN(2*M6)
-74 F=F+0.0104*SIN(2*B6)
-75 F=F-0.0074*SIN(M5-M6)
-76 F=F-0.0051*SIN(M5+M6)
-77 F=F+0.0021*SIN(2*M5)
-78 F=F+0.0010*SIN(2*B6-M6)
-82 J=J+INT(F): F=F-INT(F)
-84 IF U=0 THEN PRINT " NEW MOON ";
-86 IF U=1 THEN PRINT "FULL MOON ";
-88 PRINT J;F
-90 U=U+1: IF U=2 THEN U=0
-92 NEXT
-94 END
-95 REM ------------------------
-96 REM APPEARED IN ASTRONOMICAL
-97 REM COMPUTING, SKY & TELE-
-98 REM SCOPE, MARCH, 1985
-99 REM ------------------------
diff --git a/bwbtest/B15B/moons.run b/bwbtest/B15B/moons.run
deleted file mode 100644
index 7a1be2d..0000000
--- a/bwbtest/B15B/moons.run
+++ /dev/null
@@ -1,31 +0,0 @@
-YEAR ? 2015
-
- NEW MOON 2.45701E+6 .566477
-FULL MOON 2.45703E+6 .703339
- NEW MOON 2.45704E+6 5.11149E-2
-FULL MOON 2.45706E+6 .465169
- NEW MOON 2.45707E+6 .490342
-FULL MOON 2.45709E+6 .252979
- NEW MOON 2.4571E+6 .899635
-FULL MOON 2.45712E+6 2.10313E-3
- NEW MOON 2.45713E+6 .290326
-FULL MOON 2.45715E+6 .654318
- NEW MOON 2.45716E+6 .67698
-FULL MOON 2.45718E+6 .181986
- NEW MOON 2.45719E+6 8.68665E-2
-FULL MOON 2.4572E+6 .598315
- NEW MOON 2.45722E+6 .55781
-FULL MOON 2.45723E+6 .946217
- NEW MOON 2.45725E+6 .120929
-FULL MOON 2.45726E+6 .274565
- NEW MOON 2.45728E+6 .779877
-FULL MOON 2.45729E+6 .61981
- NEW MOON 2.45731E+6 .503566
-FULL MOON 2.45732E+6 4.23133E-3
- NEW MOON 2.45734E+6 .239214
-FULL MOON 2.45735E+6 .445782
- NEW MOON 2.45737E+6 .936132
-FULL MOON 2.45738E+6 .96412
- NEW MOON 2.4574E+6 .563102
-FULL MOON 2.45741E+6 .572861
- NEW MOON 2.45743E+6 .109838
diff --git a/bwbtest/B15B/moonup.INP b/bwbtest/B15B/moonup.INP
deleted file mode 100644
index 7af8670..0000000
--- a/bwbtest/B15B/moonup.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-123,145
-6
-2015,03,01
diff --git a/bwbtest/B15B/moonup.bas b/bwbtest/B15B/moonup.bas
deleted file mode 100644
index bc30850..0000000
--- a/bwbtest/B15B/moonup.bas
+++ /dev/null
@@ -1,171 +0,0 @@
-10 REM MOONRISE-MOONSET
-15 GOSUB 170
-20 INPUT "LAT, LONG (DEG)";B5,L5
-25 INPUT "TIME ZONE (HRS)";H
-30 L5=L5/360: Z0=H/24
-35 GOSUB 760: T=(J-2451545)+F
-40 GOSUB 245: T=T+Z0
-45 REM
-50 REM POSITION LOOP
-55 FOR I=1 TO 3
-60 GOSUB 495: MM(I,1)=A5
-65 MM(I,2)=D5: MM(I,3)=R5: T=T+0.5
-70 NEXT
-75 IF MM(2,1)>MM(1,1) THEN 85
-80 MM(2,1)=MM(2,1)+P2
-85 IF MM(3,1)>MM(2,1) THEN 95
-90 MM(3,1)=MM(3,1)+P2
-95 Z1=R1*(90.567-41.685/MM(2,3))
-100 S=SIN(B5*R1): C=COS(B5*R1)
-105 Z=COS(Z1): M8=0: W8=0: PRINT
-110 A0=MM(1,1): D0=MM(1,2)
-115 FOR C0=0 TO 23
-120 P=(C0+1)/24
-125 F0=MM(1,1):F1=MM(2,1):F2=MM(3,1)
-130 GOSUB 225: A2=F
-135 F0=MM(1,2):F1=MM(2,2):F2=MM(3,2)
-140 GOSUB 225: D2=F
-145 GOSUB 285: A0=A2:D0=D2:V0=V2
-150 NEXT
-155 GOSUB 450: REM SPECIAL MSG?
-160 END
-165 REM
-170 REM CONSTANTS
-175 DIM MM(3,3)
-180 P1=3.14159265: P2=2*P1
-185 R1=P1/180: K1=15*R1*1.0027379
-190 S$="MOONSET AT "
-195 R$="MOONRISE AT "
-200 M1$="NO MOONRISE THIS DATE"
-205 M2$="NO MOONSET THIS DATE"
-210 M3$="MOON DOWN ALL DAY"
-215 M4$="MOON UP ALL DAY"
-220 RETURN
-225 REM 3-POINT INTERPOLATION
-230 A=F1-F0: B=F2-F1-A
-235 F=F0+P*(2*A+B*(2*P-1))
-240 RETURN
-245 REM LST AT 0H ZONE TIME
-250 T0=T/36525
-255 S=24110.5+8640184.813*T0
-260 S=S+86636.6*Z0+86400*L5
-265 S=S/86400: S=S-INT(S)
-270 T0=S*360*R1
-275 RETURN
-280 REM
-285 REM TEST AN HOUR FOR AN EVENT
-290 L0=T0+C0*K1: L2=L0+K1
-295 IF A20 THEN 325
-320 V0=S*SIN(D0)+C*COS(D0)*COS(H0)-Z
-325 V2=S*SIN(D2)+C*COS(D2)*COS(H2)-Z
-330 IF SGN(V0)=SGN(V2) THEN 440
-335 V1=S*SIN(D1)+C*COS(D1)*COS(H1)-Z
-340 A=2*V2-4*V1+2*V0: B=4*V1-3*V0-V2
-345 D=B*B-4*A*V0: IF D<0 THEN 440
-350 D=SQR(D)
-355 IF V0<0 AND V2>0 THEN PRINT R$;
-360 IF V0<0 AND V2>0 THEN M8=1
-365 IF V0>0 AND V2<0 THEN PRINT S$;
-370 IF V0>0 AND V2<0 THEN W8=1
-375 E=(-B+D)/(2*A)
-380 IF E>1 OR E<0 THEN E=(-B-D)/(2*A)
-385 T3=C0+E+1/120: REM ROUND OFF
-390 H3=INT(T3): M3=INT((T3-H3)*60)
-395 PRINT USING "##:##";H3;M3;
-400 H7=H0+E*(H2-H0)
-405 N7=-COS(D1)*SIN(H7)
-410 D7=C*SIN(D1)-S*COS(D1)*COS(H7)
-415 A7=ATN(N7/D7)/R1
-420 IF D7<0 THEN A7=A7+180
-425 IF A7<0 THEN A7=A7+360
-430 IF A7>360 THEN A7=A7-360
-435 PRINT USING ", AZ ###.#";A7
-440 RETURN
-445 REM
-450 REM SPECIAL MESSAGE ROUTINE
-455 IF M8=0 AND W8=0 THEN 475
-460 IF M8=0 THEN PRINT M1$
-465 IF W8=0 THEN PRINT M2$
-470 GOTO 485
-475 IF V2<0 THEN PRINT M3$
-480 IF V2>0 THEN PRINT M4$
-485 RETURN
-490 REM
-495 REM FUNDAMENTAL ARGUMENTS
-500 L=0.606434+0.03660110129*T
-505 M=0.374897+0.03629164709*T
-510 F=0.259091+0.03674819520*T
-515 D=0.827362+0.03386319198*T
-520 N=0.347343-0.00014709391*T
-525 G=0.993126+0.00273777850*T
-530 L=L-INT(L): M=M-INT(M)
-535 F=F-INT(F): D=D-INT(D)
-540 N=N-INT(N): G=G-INT(G)
-545 L=L*P2: M=M*P2: F=F*P2
-550 D=D*P2: N=N*P2: G=G*P2
-555 V=0.39558*SIN(F+N)
-560 V=V+0.08200*SIN(F)
-565 V=V+0.03257*SIN(M-F-N)
-570 V=V+0.01092*SIN(M+F+N)
-575 V=V+0.00666*SIN(M-F)
-580 V=V-0.00644*SIN(M+F-2*D+N)
-585 V=V-0.00331*SIN(F-2*D+N)
-590 V=V-0.00304*SIN(F-2*D)
-595 V=V-0.00240*SIN(M-F-2*D-N)
-600 V=V+0.00226*SIN(M+F)
-605 V=V-0.00108*SIN(M+F-2*D)
-610 V=V-0.00079*SIN(F-N)
-615 V=V+0.00078*SIN(F+2*D+N)
-620 U=1-0.10828*COS(M)
-625 U=U-0.01880*COS(M-2*D)
-630 U=U-0.01479*COS(2*D)
-635 U=U+0.00181*COS(2*M-2*D)
-640 U=U-0.00147*COS(2*M)
-645 U=U-0.00105*COS(2*D-G)
-650 U=U-0.00075*COS(M-2*D+G)
-655 W=0.10478*SIN(M)
-660 W=W-0.04105*SIN(2*F+2*N)
-665 W=W-0.02130*SIN(M-2*D)
-670 W=W-0.01779*SIN(2*F+N)
-675 W=W+0.01774*SIN(N)
-680 W=W+0.00987*SIN(2*D)
-685 W=W-0.00338*SIN(M-2*F-2*N)
-690 W=W-0.00309*SIN(G)
-695 W=W-0.00190*SIN(2*F)
-700 W=W-0.00144*SIN(M+N)
-705 W=W-0.00144*SIN(M-2*F-N)
-710 W=W-0.00113*SIN(M+2*F+2*N)
-715 W=W-0.00094*SIN(M-2*D+G)
-720 W=W-0.00092*SIN(2*M-2*D)
-725 REM
-730 REM COMPUTE RA, DEC, DIST
-735 S=W/SQR(U-V*V)
-740 A5=L+ATN(S/SQR(1-S*S))
-745 S=V/SQR(U):D5=ATN(S/SQR(1-S*S))
-750 R5=60.40974*SQR(U)
-755 RETURN
-760 REM CALENDAR --> JD
-765 INPUT "Y,M,D ";Y,M,D
-770 G=1: IF Y<1582 THEN G=0
-775 D1=INT(D): F=D-D1-0.5
-780 J=-INT(7*(INT((M+9)/12)+Y)/4)
-785 IF G=0 THEN 805
-790 S=SGN(M-9): A=ABS(M-9)
-795 J3=INT(Y+S*INT(A/7))
-800 J3=-INT((INT(J3/100)+1)*3/4)
-805 J=J+INT(275*M/9)+D1+G*J3
-810 J=J+1721027+2*G+367*Y
-815 IF F>=0 THEN 825
-820 F=F+1: J=J-1
-825 RETURN
-900 REM ***************************
-910 REM THIS PROGRAM COMPUTES THE
-920 REM TIMES OF MOONRISE AND MOON-
-930 REM SET ANYWHERE IN THE WORLD.
-940 REM FROM SKY & TELESCOPE, JULY,
-950 REM 1989, PAGE 78.
-960 REM ***************************
diff --git a/bwbtest/B15B/moonup.run b/bwbtest/B15B/moonup.run
deleted file mode 100644
index 45df6ab..0000000
--- a/bwbtest/B15B/moonup.run
+++ /dev/null
@@ -1,6 +0,0 @@
-LAT, LONG (DEG)? 123,145
-TIME ZONE (HRS)? 6
-Y,M,D ? 2015,03,01
-
-MOONSET AT 1: 4, AZ 121.5
-MOONRISE AT 9:48, AZ 239.8
diff --git a/bwbtest/B15B/msachart.INP b/bwbtest/B15B/msachart.INP
deleted file mode 100644
index 8e2f6ed..0000000
--- a/bwbtest/B15B/msachart.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-5,6,7
-1,2,3
diff --git a/bwbtest/B15B/msachart.bas b/bwbtest/B15B/msachart.bas
deleted file mode 100644
index 9d732f2..0000000
--- a/bwbtest/B15B/msachart.bas
+++ /dev/null
@@ -1,56 +0,0 @@
-10 REM Chart number for
-20 REM The Millennium Star Atlas
-30 REM by Laurent Corp
-40 CLS
-50 PRINT : PRINT "Enter 2000.0 position"
-60 PRINT : INPUT "R.A. (h,m,s)";H,M,S
-70 IF H<0 OR H>=24 THEN 60
-80 IF M<0 OR M>=60 THEN 60
-90 IF S<0 OR S>=60 THEN 60
-100 HM=H
-110 H=H+M/60+S/3600
-120 PRINT : INPUT "Dec. (d,m,s)";D$,M,S
-130 D=ABS(VAL(D$))
-140 IF D>90 THEN 120
-150 IF M<0 OR M>=60 THEN 120
-160 IF S<0 OR S>=60 THEN 120
-170 D=D+M/60+S/3600
-180 IF LEFT$(D$,1)="-" THEN D=-D
-190 PRINT: PRINT "Millennium Star Atlas"
-200 IF ABS(D)>87 THEN H=0
-210 IF H>=0 AND H<=8 THEN V$="Volume I": VL=0
-220 IF H>8 AND H<=16 THEN V$="Volume II": VL=1
-230 IF H>16 AND H<24 THEN V$="Volume III": VL=2
-240 QT=0 : PA=0 : QN=0
-250 IF ABS(D)>90 THEN D=90
-260 IF ABS(D)<=90 THEN PA=240: QT=QT+2: QN=2
-270 IF ABS(D)<87 THEN PA=120: QT=QT+4: QN=4
-280 IF ABS(D)<81 THEN PA=60: QT=QT+8: QN=8
-290 IF ABS(D)<75 THEN PA=48: QT=QT+10: QN=10
-300 IF ABS(D)<69 THEN PA=40: QT=QT+12: QN=12
-310 IF ABS(D)<63 THEN PA=480/14: QT=QT+14: QN=14
-320 IF ABS(D)<57 THEN PA=30: QT=QT+16: QN=16
-330 IF ABS(D)<51 THEN PA=24: QT=QT+20: QN=20
-340 IF ABS(D)<45 THEN PA=24: QT=QT+20: QN=20
-350 IF ABS(D)<39 THEN PA=480/22: QT=QT+22: QN=22
-360 IF ABS(D)<33 THEN PA=480/22: QT=QT+22: QN=22
-370 IF ABS(D)<27 THEN PA=20: QT=QT+24: QN=24
-380 IF ABS(D)<21 THEN PA=20: QT=QT+24: QN=24
-390 IF ABS(D)<15 THEN PA=20: QT=QT+24: QN=24
-400 IF ABS(D)<9 THEN PA=20: QT=QT+24: QN=24
-410 IF ABS(D)<3 THEN PA=20: QT=QT+24: QN=24
-420 IF H=8 THEN H=7.99
-430 IF H=16 THEN H=15.99
-440 IF H=24 THEN H=23.99
-450 IF H>VL*8 THEN H=H-(VL*8)
-460 CA=INT((H*60)/PA)
-470 IF ABS(D)>87 AND (HM>4 AND HM<16) THEN QT=1: QN=0
-480 CH=QT-CA+(VL*516)
-490 IF LEFT$(D$,1)="-" THEN CH=(516+(VL*516)-QT+QN-CA)
-500 PRINT "Chart ";CH;"in ";V$
-510 END
-900 REM ---------------------------
-910 REM APPEARED IN ASTRONOMICAL
-920 REM COMPUTING, SKY & TELESCOPE,
-930 REM OCTOBER 1998, PAGE 63
-940 REM ---------------------------
diff --git a/bwbtest/B15B/msachart.run b/bwbtest/B15B/msachart.run
deleted file mode 100644
index ddd1303..0000000
--- a/bwbtest/B15B/msachart.run
+++ /dev/null
@@ -1,9 +0,0 @@
-
-Enter 2000.0 position
-
-R.A. (h,m,s)? 5,6,7
-
-Dec. (d,m,s)? 1,2,3
-
-Millennium Star Atlas
-Chart 255 in Volume I
diff --git a/bwbtest/B15B/obscur.INP b/bwbtest/B15B/obscur.INP
deleted file mode 100644
index 71181b5..0000000
--- a/bwbtest/B15B/obscur.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-9
-8.8
-0.123
diff --git a/bwbtest/B15B/obscur.bas b/bwbtest/B15B/obscur.bas
deleted file mode 100644
index 9302815..0000000
--- a/bwbtest/B15B/obscur.bas
+++ /dev/null
@@ -1,48 +0,0 @@
-10 REM OBSCURED FRACTION
-12 REM AT A SOLAR ECLIPSE
-14 REM
-16 P=3.14159265
-18 INPUT "SUN'S SEMIDIAMETER ";S1
-20 INPUT "MOON'S SEMIDIAMETER";S2
-22 S=S2/S1
-24 INPUT "ECLIPSE MAGNITUDE ";M
-26 IF M>(S+1)/2 OR M<0 THEN 24
-28 REM
-30 W=M*2
-32 D=1+S-W
-34 IF M<1 AND D<>0 THEN 46
-36 IF S>=1 THEN F=1: REM TOTAL
-38 IF S<1 THEN F=S*S: REM ANNULAR
-40 F=F*P
-42 GOTO 90
-44 REM
-46 REM ANGLE B
-48 B1=(D*D+1-S*S)/(2*D)
-50 IF B1>1 THEN B1=1
-52 IF B1<-1 THEN B1=-1
-54 IF B1<>0 THEN 58
-56 B=P/2: GOTO 64
-58 B=ATN(SQR(1-B1*B1)/B1)
-60 IF B1<0 THEN B=B+P
-62 REM
-64 REM ANGLE C
-66 C1=(S*S+1-D*D)/(2*S)
-68 IF C1>1 THEN C1=1
-70 IF C1<-1 THEN C1=-1
-72 IF C1<>0 THEN 76
-74 C=P/2: GOTO 82
-76 C=ATN(SQR(1-C1*C1)/C1)
-78 IF C1<0 THEN C=C+P
-80 REM
-82 REM ANGLE A
-84 A=P-B-C
-86 REM
-88 F=S*S*A+B-S*SIN(C)
-90 PRINT "OBSCURATION: ";F/P
-92 END
-100 REM ***********************
-110 REM FROM SKY & TELESCOPE'S
-120 REM ASTRONOMICAL COMPUTING
-130 REM DEPARTMENT, NOVEMBER,
-140 REM 1986, PAGES 515-516.
-150 REM ***********************
diff --git a/bwbtest/B15B/obscur.run b/bwbtest/B15B/obscur.run
deleted file mode 100644
index 26fbfe0..0000000
--- a/bwbtest/B15B/obscur.run
+++ /dev/null
@@ -1,4 +0,0 @@
-SUN'S SEMIDIAMETER ? 9
-MOON'S SEMIDIAMETER? 8.8
-ECLIPSE MAGNITUDE ? 0.123
-OBSCURATION: 5.05196E-2
diff --git a/bwbtest/B15B/occvis.INP b/bwbtest/B15B/occvis.INP
deleted file mode 100644
index 846733a..0000000
--- a/bwbtest/B15B/occvis.INP
+++ /dev/null
@@ -1,5 +0,0 @@
-98
-76
-54
-32
-2
diff --git a/bwbtest/B15B/occvis.bas b/bwbtest/B15B/occvis.bas
deleted file mode 100644
index 373902f..0000000
--- a/bwbtest/B15B/occvis.bas
+++ /dev/null
@@ -1,121 +0,0 @@
-10 ' Visibility of an Occultation
-20 INPUT "Moon's sunlit percentage";SF
-30 INPUT "Zenith distance of star (degrees)";Z
-40 INPUT "Height of Sun above horizon";HS
-50 INPUT "Cusp angle (<0 for bright side) in deg";C
-60 BV=.7: ' Star's color index, B-V (in mags.)
-70 K=.3 : ' Vis. extinction coeff. (mag./airmass)
-80 BC=0: ' Brightness from light pollution (nL)
-90 SE=1: ' Seeing disk diameter at zenith (arcsec)
-100 FV=20: ' Moon fraction in field of view (%)
-110 D=6: ' Telescope aperture (inches)
-120 M=150: ' Magnification
-130 TR=80: ' Telescope throughput (%)
-140 AG=30: ' Observer's age (years)
-150 RS=1: ' Snellen ratio (20/20=1, 20/40=0.5,...)
-160 EX=5: ' Experience (1-9; 5=average, 9=expert)
-170 MS=8.61: ' Star's visual magnitude
-180 PRINT "Choose program mode --"
-190 PRINT " (1) Minimum aperture"
-200 PRINT " (2) Limiting magnitude"
-210 INPUT Q$: IF Q$<>"1" AND Q$<>"2" THEN 210
-220 IF Q$="2" THEN 270
-230 D=.5: ' Find minimum telescope aperture
-240 D=D+.1: M=25*D: GOSUB 290: IF MS>ML THEN 240
-250 PRINT "Aperture should be at least" ;D;" inches"
-260 GOTO 280
-270 GOSUB 290: PRINT "Limiting magnitude is ";ML
-280 END
-290 ' Routine to find lim. mag. for given conditions
-300 XX=COS(Z/57.295): ' First, estimate corrections
-310 X=1/(XX+.025*EXP(-11*XX)): ' Airmass of Moon
-320 ZE=SQR(2.89*X*SE^2+(17.9/D)^2):'2nd moment of image
-330 F1=10^(.4*K*X): ' Extinction
-340 F2=1.41: ' Binocular vision
-350 F3=100/TR: ' Transmission of scope
-360 DE=4: ' Guess that pupil is 4mm
-370 F4=(25.4*D/(M*DE))^2: ' Light outside pupil
-380 IF F4<1 THEN F4=1
-390 F5=(DE/(25.4*D))^2: ' Light gathering power
-400 XX=1-EXP(-.026*DE^2)
-410 YY=1-EXP(-.026*(25.4*D/M)^2)
-420 F6=(25.4*D/(DE*M))^2*XX/YY:'Stiles-Crawford effect
-430 IF F6>1 THEN F6=1
-440 F7=(1+.03*(M*ZE/100)^2)/RS^2: ' Resolving the star
-450 FI=F1*F2*F3*F4*F5*F6*F7:' Corr. for intensities
-460 FB=M^2*F2*F3*F4*F5*F6:'Corr. for surface brightness
-470 ' Calculate brightness of Moon
-480 CP=SF/50-1
-490 IF CP=0 THEN PH=3.14159/2: GOTO 520
-500 PH=ATN(SQR(1-CP*CP)/CP): ' Lunar phase (0 is full)
-510 IF CP<0 THEN PH=PH+3.14159
-520 DM=1.49*PH+.043*(PH^4)-12.73 : ' Moon's magnitude
-530 IM=10^(-.4*(DM+16.57)): ' Intensity of Moon
-540 BM=5.67E+12*IM/(F1*SF): ' Moon brightness (nL)
-550 SP=3.14159-PH: ' Earth's phase from Moon
-560 XX=1.49*SP+.043*(SP^4)-12.73
-570 BE=1.1E+07*10^(-.4*(XX+16.57))/F1: ' Earthshine
-580 ' Calculate glare brightness
-590 XX=(COS(C/57.295))^2+(1-SF/100+SIN(C/57.295))^2
-600 YY=(1-.4*EXP(-1*C/30))
-610 IF YY<.6 THEN YY=.6
-620 TH=.25*SQR(XX)*YY: ' Effective distance to Moon
-630 B1=6.25E+07*IM*(F1-1)/(TH*F1)^2:'Scattering in air
-640 B2=4.63E+07*IM*(FV/100)/(TH^2*F1):'Scat. in eye
-650 B3=443000*IM/(TH^3*D*F1): ' Diffraction
-660 B4=2.6E+08*IM*EXP(-1*(TH/.4)^2)/F1: ' By mirror
-670 BG=B1+B2+B3+B4: ' Glare brightness
-680 ' Calculate effective background brightness
-690 XX=1-.96*(SIN(Z/57.295))^2
-700 BN=180*(.4+.6/SQR(XX))/F1: ' Night sky
-710 XX=10^(PH/1.571-1.1): IF XX<1 THEN XX=1
-720 BT=XX*10^(8.45+.4*HS)*(F1-1)/F1: ' Twilight sky
-730 PM=10^5.36*(1.06+(COS(PH))^2): ' Mie scattering
-740 PA=10^(1.65+1.43*PH): ' Aerosol scattering
-750 XX=-.4*K/(SQR(1-.96*(SIN((90-HS)/57.295))^2))
-760 BD=11700*10^XX*(PM+PA)*(F1-1)/F1: ' Daytime sky
-770 BS=BN+BT+BC: ' Sky brightness
-780 IF BD1 THEN F6=1
-1010 F7=(1+.03*(M*ZE/RE)^2)/RS^2:'Resolving the star
-1020 F8=10^(-.4*(1-.5*BV)): 'Color corr (night)
-1030 IF BA>1480 THEN F8=1: 'Color corr (day)
-1040 FI=F1*F2*F3*F4*F5*F6*F7*F8: 'Corr for intensities
-1050 FB=M^2*F2*F3*F4*F5*F6*F8: 'For surface brightness
-1060 ' Calculate limiting magnitude
-1070 B=BA/FB: ' Perceived brightness
-1080 ID=4.46E-09*(1+SQR(1.26E-06*B))^2: 'Day vision
-1090 IN=1.59E-10*(1+SQR(.0126*B))^2: 'Night vision
-1100 I=ID: IF IN0 THEN 40
-36 R=Q: V=0: GOTO 90
-38 REM
-40 REM FIND TRUE ANOMALY
-42 REM
-44 Q1=K*SQR((1+E0)/Q)/(Q*2)
-46 Q1=Q1*T
-48 S=2/(3*ABS(Q1))
-50 X=2/TAN(2*ATN(TAN(ATN(S)/2)^C))
-52 IF T<0 THEN X=-X
-54 G=(1-E0)/(1+E0): L0=0
-56 REM
-58 X0=X: W=1: Y=X*X: G1=-Y*X
-60 Q3=Q1+2*G*X*Y/3
-62 W=W+1
-64 G1=-G1*G*Y
-66 W1=(W-(W+1)*G)/(2*W+1)
-68 F=W1*G1
-70 Q3=Q3+F
-72 IF W>50 OR ABS(F)>D1 THEN 96
-74 IF ABS(F)>D THEN 62
-76 L0=L0+1: IF L0>50 THEN 96
-78 X1=X: X=(2*X*X*X/3+Q3)/(X*X+1)
-80 IF ABS(X-X1)>D THEN 78
-82 IF ABS(X-X0)>D THEN 58
-84 V=2*ATN(X)
-86 R=Q*(1+E0)/(1+E0*COS(V))
-88 IF V<0 THEN V=V+2*P1
-90 PRINT "TRUE ANOMALY: ";V*R1
-92 PRINT "DISTANCE (AU): ";R
-94 GOTO 98
-96 PRINT "NO CONVERGENCE"
-98 END
-99 REM *************************
-100 REM FROM SKY & TELESCOPE,
-101 REM MAY, 1987, PAGE 535
-102 REM ************************
diff --git a/bwbtest/B15B/orbits.run b/bwbtest/B15B/orbits.run
deleted file mode 100644
index 3f2dc2d..0000000
--- a/bwbtest/B15B/orbits.run
+++ /dev/null
@@ -1,6 +0,0 @@
-PERI DISTANCE Q ? 9876
-ECCENTRICITY ? 0.543
-DAYS FROM PERI ? 21
-
-TRUE ANOMALY: 2.6196E-5
-DISTANCE (AU): 9876.
diff --git a/bwbtest/B15B/path.INP b/bwbtest/B15B/path.INP
deleted file mode 100644
index a8e188e..0000000
--- a/bwbtest/B15B/path.INP
+++ /dev/null
@@ -1,6 +0,0 @@
-AAA
-MAR
-2
-1,2.3,4.5
-31,6.7,8.9
-1
diff --git a/bwbtest/B15B/path.bas b/bwbtest/B15B/path.bas
deleted file mode 100644
index 1c76e58..0000000
--- a/bwbtest/B15B/path.bas
+++ /dev/null
@@ -1,94 +0,0 @@
-100 REM TRACK A COMET
-105 REM
-110 GOSUB 485
-115 INPUT "NAME OF COMET";N$
-120 INPUT "MONTH (3 LETTERS)";M$
-125 INPUT "HOW MANY DATES (2-5)";L
-130 PRINT "DAY, RA(H.M), DE(D.M):"
-135 FOR I=1 TO L
-140 INPUT " ";C(I,1),C(I,2),C(I,3)
-145 D=C(I,2): GOSUB 430: C(I,2)=D
-150 D=C(I,3): GOSUB 430: C(I,3)=D
-155 NEXT I
-160 INPUT "STARTING DATE";W
-165 PRINT: PRINT N$
-170 FOR N4=1 TO 30
-175 IF W>C(L,1)+18 THEN 545
-180 PRINT: PRINT M$;W;TAB(13);
-185 PRINT " RA(H.M) DE(D.M)"
-190 X=W-2
-195 FOR J=1 TO 3
-200 X=X+1: Y=0: Z=0
-205 FOR N=1 TO L
-210 S=1
-215 FOR K=1 TO L
-220 IF K=N THEN 230
-225 S=S*(X-C(K,1))/(C(N,1)-C(K,1))
-230 NEXT K
-235 Y=Y+S*C(N,2): Z=Z+S*C(N,3)
-240 NEXT N
-245 Q=M1+N1*SIN(Y*15*K9)*TAN(Z*K9)
-250 Q=Y+Z3*Q
-255 R=Z+15*Z3*N1*COS(Y*15*K9)
-260 IF J<>2 THEN 305
-265 P=COS(R*K9)
-270 D=Y: GOSUB 460 : Y1=D
-275 D=Z: GOSUB 460 : Z1=D
-280 D=Q: GOSUB 460 : Q1=D
-285 D=R: GOSUB 460 : R1=D
-290 PRINT Y0$;Y1;TAB(26);Z1
-295 PRINT Y1$;Q1;TAB(26);R1
-300 GOTO 315
-305 IF J<>1 THEN 315
-310 K1=Q: L1=R
-315 NEXT J
-320 Y=R-L1: REM DEGREES
-325 X=(Q-K1)*P*15: REM DEGREES
-330 R=SQR(X*X+Y*Y)/2: REM DEG/DAY
-335 R=R*2.5
-340 PRINT " ARCSEC/MIN ";R
-345 T=ATN(X/Y)/K9
-350 IF Y<0 THEN T=T+180
-355 IF T<0 THEN T=T+360
-360 T=INT(T+0.5)
-365 PRINT " POS ANGLE ";T
-370 Z6=R*U/143.24: Z=Z6: J=0
-375 Z=Z*2
-380 IF Z>8000 THEN 390
-385 J=J+1: IF J<=30 THEN 375
-390 J=J-5: Z=0.001*Z
-395 PRINT " STEPS ";Z6;"HZ"
-400 PRINT " RATIO ";J
-405 PRINT " FREQ ";Z;" KHZ"
-410 W=W+1
-415 NEXT N4
-420 GOTO 545
-425 REM
-430 REM H.M --> HOURS
-435 S1=SGN(D): D=ABS(D)
-440 D1=INT(D): D2=D-D1
-445 D=S1*(D1+D2/0.6)
-450 RETURN
-455 REM
-460 REM HOURS --> H.M
-465 S1=SGN(D): D=ABS(D)
-470 D1=INT(D): D2=D-D1
-475 D=S1*(D1+D2*0.6)
-480 RETURN
-485 REM CONSTANTS
-490 DIM C(5,3)
-495 U=178.27: REM FOCAL LENGTH
-500 Y0=1950: REM INPUT EQUINOX
-505 Y1=1987: REM CURRENT EQUINOX
-510 Z3=Y1-Y0
-515 Y0$=" ("+STR$(Y0)+".0) "
-520 Y1$=" ("+STR$(Y1)+".0) "
-525 M1=0.0008538: N1=0.0003711
-530 P1=3.1415926536: K9=P1/180
-535 RETURN
-536 REM ************************
-537 REM FROM "SKY & TELESCOPE"
-538 REM ASTRONOMICAL COMPUTING
-539 REM FEB. 1987, PAGE 196
-540 REM ************************
-545 END
diff --git a/bwbtest/B15B/path.run b/bwbtest/B15B/path.run
deleted file mode 100644
index 463f38d..0000000
--- a/bwbtest/B15B/path.run
+++ /dev/null
@@ -1,279 +0,0 @@
-NAME OF COMET? AAA
-MONTH (3 LETTERS)? MAR
-HOW MANY DATES (2-5)? 2
-DAY, RA(H.M), DE(D.M):
- ? 1,2.3,4.5
- ? 31,6.7,8.9
-STARTING DATE? 1
-
-AAA
-
-MAR 1 RA(H.M) DE(D.M)
- ( 1950.0) 2.3 4.5
- ( 1987.0) 2.31938 4.59804
- ARCSEC/MIN 5.82557
- POS ANGLE 86
- STEPS 7.25024 HZ
- RATIO 5
- FREQ 14.8485 KHZ
-
-MAR 2 RA(H.M) DE(D.M)
- ( 1950.0) 2.39333 4.59333
- ( 1987.0) 2.41275 5.08823
- ARCSEC/MIN 5.82422
- POS ANGLE 86
- STEPS 7.24856 HZ
- RATIO 5
- FREQ 14.8451 KHZ
-
-MAR 3 RA(H.M) DE(D.M)
- ( 1950.0) 2.48667 5.08667
- ( 1987.0) 2.50612 5.17826
- ARCSEC/MIN 5.82283
- POS ANGLE 86
- STEPS 7.24683 HZ
- RATIO 5
- FREQ 14.8415 KHZ
-
-MAR 4 RA(H.M) DE(D.M)
- ( 1950.0) 2.58 5.18
- ( 1987.0) 2.59949 5.26814
- ARCSEC/MIN 5.8214
- POS ANGLE 86
- STEPS 7.24505 HZ
- RATIO 5
- FREQ 14.8379 KHZ
-
-MAR 5 RA(H.M) DE(D.M)
- ( 1950.0) 3.07333 5.27333
- ( 1987.0) 3.09286 5.35787
- ARCSEC/MIN 5.81992
- POS ANGLE 86
- STEPS 7.24321 HZ
- RATIO 5
- FREQ 14.8341 KHZ
-
-MAR 6 RA(H.M) DE(D.M)
- ( 1950.0) 3.16667 5.36667
- ( 1987.0) 3.18623 5.44747
- ARCSEC/MIN 5.8184
- POS ANGLE 86
- STEPS 7.24131 HZ
- RATIO 5
- FREQ 14.8302 KHZ
-
-MAR 7 RA(H.M) DE(D.M)
- ( 1950.0) 3.26 5.46
- ( 1987.0) 3.27961 5.53693
- ARCSEC/MIN 5.81683
- POS ANGLE 86
- STEPS 7.23937 HZ
- RATIO 5
- FREQ 14.8262 KHZ
-
-MAR 8 RA(H.M) DE(D.M)
- ( 1950.0) 3.35333 5.55333
- ( 1987.0) 3.37298 6.02626
- ARCSEC/MIN 5.81523
- POS ANGLE 86
- STEPS 7.23737 HZ
- RATIO 5
- FREQ 14.8221 KHZ
-
-MAR 9 RA(H.M) DE(D.M)
- ( 1950.0) 3.44667 6.04667
- ( 1987.0) 3.46635 6.11547
- ARCSEC/MIN 5.81358
- POS ANGLE 86
- STEPS 7.23532 HZ
- RATIO 5
- FREQ 14.8179 KHZ
-
-MAR 10 RA(H.M) DE(D.M)
- ( 1950.0) 3.54 6.14
- ( 1987.0) 3.55972 6.20457
- ARCSEC/MIN 5.81189
- POS ANGLE 86
- STEPS 7.23321 HZ
- RATIO 5
- FREQ 14.8136 KHZ
-
-MAR 11 RA(H.M) DE(D.M)
- ( 1950.0) 4.03333 6.23333
- ( 1987.0) 4.05309 6.29356
- ARCSEC/MIN 5.81015
- POS ANGLE 86
- STEPS 7.23105 HZ
- RATIO 5
- FREQ 14.8092 KHZ
-
-MAR 12 RA(H.M) DE(D.M)
- ( 1950.0) 4.12667 6.32667
- ( 1987.0) 4.14646 6.38245
- ARCSEC/MIN 5.80838
- POS ANGLE 86
- STEPS 7.22884 HZ
- RATIO 5
- FREQ 14.8047 KHZ
-
-MAR 13 RA(H.M) DE(D.M)
- ( 1950.0) 4.22 6.42
- ( 1987.0) 4.23984 6.47125
- ARCSEC/MIN 5.80656
- POS ANGLE 86
- STEPS 7.22658 HZ
- RATIO 5
- FREQ 14.8 KHZ
-
-MAR 14 RA(H.M) DE(D.M)
- ( 1950.0) 4.31333 6.51333
- ( 1987.0) 4.3332 6.55996
- ARCSEC/MIN 5.80469
- POS ANGLE 86
- STEPS 7.22426 HZ
- RATIO 5
- FREQ 14.7953 KHZ
-
-MAR 15 RA(H.M) DE(D.M)
- ( 1950.0) 4.40667 7.00667
- ( 1987.0) 4.42657 7.04859
- ARCSEC/MIN 5.80279
- POS ANGLE 86
- STEPS 7.22189 HZ
- RATIO 5
- FREQ 14.7904 KHZ
-
-MAR 16 RA(H.M) DE(D.M)
- ( 1950.0) 4.5 7.1
- ( 1987.0) 4.51994 7.13716
- ARCSEC/MIN 5.80084
- POS ANGLE 86
- STEPS 7.21946 HZ
- RATIO 5
- FREQ 14.7855 KHZ
-
-MAR 17 RA(H.M) DE(D.M)
- ( 1950.0) 4.59333 7.19333
- ( 1987.0) 5.01331 7.22566
- ARCSEC/MIN 5.79885
- POS ANGLE 86
- STEPS 7.21698 HZ
- RATIO 5
- FREQ 14.7804 KHZ
-
-MAR 18 RA(H.M) DE(D.M)
- ( 1950.0) 5.08667 7.28667
- ( 1987.0) 5.10668 7.31411
- ARCSEC/MIN 5.79682
- POS ANGLE 86
- STEPS 7.21445 HZ
- RATIO 5
- FREQ 14.7752 KHZ
-
-MAR 19 RA(H.M) DE(D.M)
- ( 1950.0) 5.18 7.38
- ( 1987.0) 5.20004 7.40252
- ARCSEC/MIN 5.79474
- POS ANGLE 86
- STEPS 7.21187 HZ
- RATIO 5
- FREQ 14.7699 KHZ
-
-MAR 20 RA(H.M) DE(D.M)
- ( 1950.0) 5.27333 7.47333
- ( 1987.0) 5.2934 7.49089
- ARCSEC/MIN 5.79262
- POS ANGLE 86
- STEPS 7.20923 HZ
- RATIO 5
- FREQ 14.7645 KHZ
-
-MAR 21 RA(H.M) DE(D.M)
- ( 1950.0) 5.36667 7.56667
- ( 1987.0) 5.38676 7.57923
- ARCSEC/MIN 5.79046
- POS ANGLE 86
- STEPS 7.20654 HZ
- RATIO 5
- FREQ 14.759 KHZ
-
-MAR 22 RA(H.M) DE(D.M)
- ( 1950.0) 5.46 8.06
- ( 1987.0) 5.48012 8.06754
- ARCSEC/MIN 5.78825
- POS ANGLE 86
- STEPS 7.2038 HZ
- RATIO 5
- FREQ 14.7534 KHZ
-
-MAR 23 RA(H.M) DE(D.M)
- ( 1950.0) 5.55333 8.15333
- ( 1987.0) 5.57348 8.15585
- ARCSEC/MIN 5.78601
- POS ANGLE 86
- STEPS 7.201 HZ
- RATIO 5
- FREQ 14.7476 KHZ
-
-MAR 24 RA(H.M) DE(D.M)
- ( 1950.0) 6.04667 8.24667
- ( 1987.0) 6.06684 8.24415
- ARCSEC/MIN 5.78372
- POS ANGLE 86
- STEPS 7.19815 HZ
- RATIO 5
- FREQ 14.7418 KHZ
-
-MAR 25 RA(H.M) DE(D.M)
- ( 1950.0) 6.14 8.34
- ( 1987.0) 6.16019 8.33246
- ARCSEC/MIN 5.78138
- POS ANGLE 86
- STEPS 7.19525 HZ
- RATIO 5
- FREQ 14.7359 KHZ
-
-MAR 26 RA(H.M) DE(D.M)
- ( 1950.0) 6.23333 8.43333
- ( 1987.0) 6.25355 8.42077
- ARCSEC/MIN 5.77901
- POS ANGLE 86
- STEPS 7.19229 HZ
- RATIO 5
- FREQ 14.7298 KHZ
-
-MAR 27 RA(H.M) DE(D.M)
- ( 1950.0) 6.32667 8.52667
- ( 1987.0) 6.34689 8.50911
- ARCSEC/MIN 5.77659
- POS ANGLE 86
- STEPS 7.18928 HZ
- RATIO 5
- FREQ 14.7236 KHZ
-
-MAR 28 RA(H.M) DE(D.M)
- ( 1950.0) 6.42 9.02
- ( 1987.0) 6.44024 8.59748
- ARCSEC/MIN 5.77413
- POS ANGLE 86
- STEPS 7.18622 HZ
- RATIO 5
- FREQ 14.7174 KHZ
-
-MAR 29 RA(H.M) DE(D.M)
- ( 1950.0) 6.51333 9.11333
- ( 1987.0) 6.53359 9.08589
- ARCSEC/MIN 5.77163
- POS ANGLE 86
- STEPS 7.1831 HZ
- RATIO 5
- FREQ 14.711 KHZ
-
-MAR 30 RA(H.M) DE(D.M)
- ( 1950.0) 7.00667 9.20667
- ( 1987.0) 7.02693 9.17434
- ARCSEC/MIN 5.76908
- POS ANGLE 86
- STEPS 7.17994 HZ
- RATIO 5
- FREQ 14.7045 KHZ
diff --git a/bwbtest/B15B/period.INP b/bwbtest/B15B/period.INP
deleted file mode 100644
index d0da546..0000000
--- a/bwbtest/B15B/period.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-31
-C
-24
-11
diff --git a/bwbtest/B15B/period.bas b/bwbtest/B15B/period.bas
deleted file mode 100644
index 40d44cd..0000000
--- a/bwbtest/B15B/period.bas
+++ /dev/null
@@ -1,76 +0,0 @@
-10 REM PERIOD SEARCH BY A DISCRETE FOURIER
-20 REM TRANSFORM -- MARIA MITCHELL OBSERVATORY
-25 REM
-30 DIM X(100),Y(100)
-40 GOSUB 360
-50 REM
-60 REM ***************** THE DFT *****************
-70 REM
-80 Z9=0: A5=0: F0=F1-F4: C0=(N-1)/(N*Q)
-90 PRINT "TRIAL #";TAB(15);"PERIOD";
-100 PRINT TAB(30);"FREQUENCY";TAB(45);"STRENGTH"
-110 FOR K=1 TO M
-120 F=F0+K*F4: B=P2*F: C=0: S=0
-130 FOR I=1 TO N
-140 A=B*X(I)
-150 S=S+Y(I)*SIN(A): C=C+Y(I)*COS(A)
-160 NEXT I
-170 Z=(C*C+S*S)*C0: A5=A5+Z
-180 IF Z<=Z9 THEN 200
-190 Z9=Z: F9=F: REM NEW MAXIMUM STRENGTH
-200 IF Z rectangular
-1020 SA=SIN(A0): CA=COS(A0)
-1030 SD=SIN(D0): CD=COS(D0)
-1040 X0=CA*CD: Y0=SA*CD: Z0=SD
-1050 REM 3-D transformation
-1060 X1=X0*XX+Y0*YX+Z0*ZX
-1070 Y1=X0*XY+Y0*YY+Z0*ZY
-1080 Z1=X0*XZ+Y0*YZ+Z0*ZZ
-1090 REM Rectangular--> spherical
-1100 A1=ATN(Y1/X1)
-1110 IF X1<0 THEN A1=A1+P1
-1120 IF A1<0 THEN A1=A1+2*P1
-1130 A1=A1/(R1*15): REM Final R.A.
-1140 D1=ATN(Z1/SQR(X1*X1+Y1*Y1))
-1150 D1=D1/R1: REM Final Dec.
-1160 RETURN
-2000 REM
-2010 REM This program for pre-
-2020 REM cessing a star's coor-
-2030 REM dinates is described in
-2040 REM Sky & Telescope for
-2050 REM October, 1991, page 408.
-2060 REM It was written by
-2070 REM Zbigniew S. Krzeminski.
diff --git a/bwbtest/B15B/precess.run b/bwbtest/B15B/precess.run
deleted file mode 100644
index a80890a..0000000
--- a/bwbtest/B15B/precess.run
+++ /dev/null
@@ -1,21 +0,0 @@
-Initial epoch (yr)? 2000
-Final epoch (yr) ? 2015
-Initial epoch 2000
- R.A. (h,m,s)? 1,2,3
- Dec. (d,m,s)? 4,5,6
-Proper motion in
- R.A. (sec/yr) ? 7
- Dec. (arcsec/yr)? 8
-
-Final epoch 2015
- R.A. (h,m,s): 1 4 34.529
- Dec. (d,m,s): + 4 11 54.92
-Proper motion in
- R.A. (sec/yr): 7.0009
- Dec. (arcsec/yr): 7.958
-
-Select one:
- (A)nother star
- (N)ew final epoch
- (Q)uit
-? Q
diff --git a/bwbtest/B15B/refr1.INP b/bwbtest/B15B/refr1.INP
deleted file mode 100644
index f35605d..0000000
--- a/bwbtest/B15B/refr1.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-7654
-87
-0.9
-54
diff --git a/bwbtest/B15B/refr1.bas b/bwbtest/B15B/refr1.bas
deleted file mode 100644
index 915a4c6..0000000
--- a/bwbtest/B15B/refr1.bas
+++ /dev/null
@@ -1,129 +0,0 @@
-10 REM REFRACTION
-20 REM
-30 DEFSNG A-Z: REM <<<<<
-40 INPUT "APPARENT ZENITH DIST";Z0
-50 INPUT "AIR TEMP (F) ";T0
-60 INPUT "REFR INDEX ";N0
-70 INPUT "HEIGHT (FEET)";H
-80 R0=1: REM PLANET RADIUS
-90 M=1: REM PLANET MASS
-100 W=28.97: REM MOL WT OF AIR
-105 P=3.14159: P2=1.5708
-106 RD=57.2957
-110 REM
-120 REM CONVERT TO CGS UNITS
-130 Z0=Z0/RD
-140 H=H*30.48
-150 T0=(T0-32)/1.8+273.1
-160 W=W*1.665E-24
-170 R0=R0*6.378E+08
-180 M=M*5.976E+27
-190 REM
-200 REM CALC ATMOS QUANTITIES AT R0
-210 G=6.67E-08*M/(R0*R0)
-220 S=1.38E-16*T0/(G*W)
-230 LA=-.4*W*G/1.38E-16
-240 GOSUB 350
-250 REM PRINT RESULTS
-260 ZA=Z0*RD
-270 ZR=(Z0+RF)*RD
-280 RF=RF*3600*RD
-290 PRINT "REFRACTION IS ";RF;" ARC SEC"
-300 PRINT "PATHLENGTH IS ";AM;" AIR MASSES"
-310 PRINT "APPAR ZENITH DIST ";ZA
-320 PRINT "REAL ZENITH DIST ";ZR
-330 END
-340 REM
-350 REM REFRACTION SUBR
-360 REM
-370 N=N0: DH=S/200: IF H<0 THEN DH=-DH
-380 H1=0
-390 T=T1: GOSUB 1110: T1=T
-400 IF (H1-H)/DH>=0 THEN 450
-410 H1=H1+DH: GOSUB 1110
-420 EX=-1-(T0/(S*LR))
-430 N=1+(N-1)*((T/T1)^EX)
-440 T1=T: GOTO 400
-450 REM INITIALIZE PARAMETERS
-460 RF=0: L=0: LZ=0: R=R0+H
-470 L1=LR: Z=Z0
-480 REM
-490 REM LAYER THICKNESS
-500 IF R>R0+H+5*S THEN DR=S/10
-510 IF R<=R0+H+5*S THEN DR=S/20
-520 IF R<=R0+H+2*S THEN DR=S/50
-530 IF R<=R0+H+.2*S THEN DR=S/200
-540 F=1-DR/R: GOSUB 1170 : ZG=P-F
-550 IF Z<=P2 THEN IN=1
-560 IF Z>P2 THEN IN=0
-570 IF Z>ZG THEN IN=-1
-580 REM INDEX OF REFR FOR SHELL
-590 H1=R-R0: GOSUB 1110
-600 T1=T-L1*DR*IN
-610 EX=-1-(T0/(S*L1))
-620 N=1+(N-1)*((T/T1)^EX)
-630 L1=LR
-640 IF IN=-1 THEN 690
-650 IF IN=0 THEN 840
-660 IF IN=1 THEN 940
-670 REM
-680 REM
-690 REM INWARD RAY
-700 T1=T-LR*DR
-710 N1=1+(N-1)*((T1/T)^EX)
-720 T2=T-LR*DR*2
-730 N2=1+(N-1)*((T2/T)^EX)
-740 F=SIN(Z)*R/(R-DR): GOSUB 1170 : A=P-F
-750 L=L+(N1-1)*R*SIN(Z-A)/SIN(A)
-760 IF SIN(A)>N2/N1 THEN 800
-770 F=SIN(A)*N1/N2: GOSUB 1170 : Z=P-F
-780 RF=RF+(Z-A)
-790 GOTO 820
-800 Z=P-A
-810 RF=RF-(P-2*Z)
-820 GOTO 1050
-830 REM
-840 REM GRAZING RAY
-850 T1=T-LR*DR
-860 N1=1+(N-1)*((T1/T)^EX)
-870 A=P-Z
-880 L=L+(N1-1)*(-2)*R*COS(Z)
-890 F=SIN(A)*N1/N: IF F>1 THEN F=1
-900 GOSUB 1170 : Z=F
-910 RF=RF+(Z-A)
-920 GOTO 1050
-930 REM
-940 REM OUTGOING RAY
-950 T2=T+LR*DR
-960 N2=1+(N-1)*((T2/T)^EX)
-970 F=SIN(Z)*R/(R+DR): GOSUB 1170 : A=F
-980 L=L+(N-1)*R*SIN(Z-A)/SIN(A)
-990 IF R>=R0+H THEN LZ=LZ+(N-1)*DR
-1000 IF SIN(A)>N2/N THEN 1020
-1010 F=SIN(A)*N/N2: GOSUB 1170 : Z=F: GOTO 1030
-1020 Z=P-A
-1030 RF=RF+(Z-A)
-1040 REM
-1050 REM END SUBROUTINE
-1060 R=R+DR*IN
-1070 IF R<=R0+8*S THEN 490
-1080 AM=L/LZ
-1090 RETURN
-1100 REM
-1110 REM TEMPERATURE SUBR
-1120 LR=.5*LA: T=T0+LR*H1
-1130 IF H1<=2*S THEN 1150
-1135 LR=-.16*LA
-1140 T=T0+S*LA+LR*(H1-2*S)
-1150 RETURN
-1160 REM
-1170 REM ARC SINE FUNCTION
-1180 IF F<1 THEN 1200
-1190 F=P2: GOTO 1210
-1200 F=ATN(F/SQR(1-F*F))
-1210 RETURN
-1220 REM
-1230 REM ************************************
-1240 REM APPEARED IN ASTRONOMICAL COMPUTING
-1250 REM SKY & TELESCOPE - MARCH 1989 ISSUE
-1260 REM ************************************
diff --git a/bwbtest/B15B/refr1.run b/bwbtest/B15B/refr1.run
deleted file mode 100644
index aae1f8a..0000000
--- a/bwbtest/B15B/refr1.run
+++ /dev/null
@@ -1,8 +0,0 @@
-APPARENT ZENITH DIST? 7654
-AIR TEMP (F) ? 87
-REFR INDEX ? 0.9
-HEIGHT (FEET)? 54
-REFRACTION IS -105902. ARC SEC
-PATHLENGTH IS 5.594 AIR MASSES
-APPAR ZENITH DIST 7654.
-REAL ZENITH DIST 7624.58
diff --git a/bwbtest/B15B/rocket.INP b/bwbtest/B15B/rocket.INP
deleted file mode 100644
index f6b91e0..0000000
--- a/bwbtest/B15B/rocket.INP
+++ /dev/null
@@ -1 +0,0 @@
-56
diff --git a/bwbtest/B15B/rocket.bas b/bwbtest/B15B/rocket.bas
deleted file mode 100644
index fb65fdd..0000000
--- a/bwbtest/B15B/rocket.bas
+++ /dev/null
@@ -1,35 +0,0 @@
-10 REM ROCKET.BAS by Brian Tung
-20 REM
-30 DEFDBL A-Z
-40 A=1.032: REM Earth gravity in light-years per year squared
-50 INPUT "Distance in light-years (0-100 million)"; D
-60 IF D>=0 AND D<=100000000 THEN 80
-70 PRINT "Distance must be between 0 and 100 million l-y": GOTO 50
-80 D1=D/2
-90 T=SQR(D1*D1+(2*D1/A))
-100 X=A*T
-110 M=1: REM Lines 110-180 compute inverse sinh
-120 IF X<0 THEN M=-1
-130 S=LOG(ABS(X)+1)
-140 S1=S+1
-150 X1=(EXP(S)-EXP(-S))/2-ABS(X)
-160 S1=X1/(EXP(S)+EXP(-S))/2
-170 S=S-S1
-180 IF ABS(S1)>.0000001 THEN 150
-190 T1=1/A*S*M
-200 V=A*T/SQR(1+(A*T)*(A*T))
-210 PRINT USING "Time on Earth: #########.### years"; 2*T
-220 PRINT USING "Time on board: #########.### years"; 2*T1
-230 Z$ = "Top speed: #.###"
-240 IF D<1 THEN 280
-250 Z1=INT(2*LOG(D)/LOG(10))
-260 IF D>=1 AND D<10000000 THEN Z$=Z$+STRING$(Z1,"#")
-270 IF D>=10000000 THEN Z$=Z$+"#############"
-280 Z$=Z$+" c"
-290 PRINT USING Z$; V
-300 END
-900 REM ---------------------------
-910 REM APPEARED IN COMPUTERS IN
-920 REM ASTRONOMY, SKY & TELESCOPE,
-930 REM FEBRUARY 2002, PAGE 66
-940 REM ---------------------------
diff --git a/bwbtest/B15B/rocket.run b/bwbtest/B15B/rocket.run
deleted file mode 100644
index e1b352e..0000000
--- a/bwbtest/B15B/rocket.run
+++ /dev/null
@@ -1,4 +0,0 @@
-Distance in light-years (0-100 million)? 56
-Time on Earth: 57.906 years
-Time on board: 7.928 years
-Top speed: 0.999440 c
diff --git a/bwbtest/B15B/rotate.INP b/bwbtest/B15B/rotate.INP
deleted file mode 100644
index 10a7326..0000000
--- a/bwbtest/B15B/rotate.INP
+++ /dev/null
@@ -1,7 +0,0 @@
-147
-6
-3
-9,54
-76
-7,54
-6,43
diff --git a/bwbtest/B15B/rotate.bas b/bwbtest/B15B/rotate.bas
deleted file mode 100644
index 791ad6a..0000000
--- a/bwbtest/B15B/rotate.bas
+++ /dev/null
@@ -1,81 +0,0 @@
-10 ' FIELD ROTATION
-20 '
-30 ' PI=ATN(1)*4:
-31 DR=PI/180: RD=180/PI
-40 INPUT "Observer's latitude (deg) ";LA
-50 LA=LA*DR: CL=COS(LA): SL=SIN(LA)
-60 INPUT "Day of the month (1-31)";J
-70 INPUT "Month (1-12) ";M
-80 INPUT "Right ascension (h,m) ";H5,M5
-90 INPUT "Declination (deg) ";DE
-100 AD=H5+M5/60: DE=DE*DR: ' Hours and radians
-110 SD=SIN(DE): CD=COS(DE): TD=SD/CD
-120 GOSUB 650: PRINT
-130 INPUT "From (h,m): ";H1,M1
-140 T1=H1+M1/60: ' Starting time (hours)
-150 INPUT "To (h,m): ";H2,M2
-160 T2=H2+M2/60: ' Ending time (hours)
-170 IF T20 THEN 270
-260 C=SGN(DD)*PI/2: GOTO 280: ' In case DS=0
-270 C=ATN(DD/DS): IF DS<0 THEN C=C+PI
-280 Q=C*RD: ' Parallactic angle in degrees
-290 IF T<>0 THEN 310
-300 Q0=Q: Q1=Q: ' Save initial value of Q
-310 XX=Q-Q1: XT=Q-Q0
-320 IF ABS(XX)<=180 THEN 340
-330 XX=XX-360*SGN(XX): Q=Q-360*SGN(Q)
-340 Q1=Q
-350 IF T<>0 THEN GOSUB 470
-360 IF T=0 THEN GOSUB 700
-370 IF XT>MX THEN MX=XT
-380 IF XT=24 THEN LT=LT-24
-480 PRINT USING " ##h ##m ";INT(LT);(LT-INT(LT))*60;
-490 PRINT USING " Rotation +###.## deg/min ";XX
-500 RETURN
-510 ' Compute hour angle, altitude, and azimuth
-520 HD=15*(1.002737*LT+ST-AD): ' Hour angle (deg)
-530 IF HD>=360 THEN HD=HD-360
-540 AH=HD*DR: CH=COS(AH): SA=SL*SD+CL*CD*CH
-550 IF ABS(SA)<1 THEN 580
-560 IF ABS(SA)>1 THEN SA=1*SGN(SA)
-570 H=SA*90: GOTO 590: ' If zenith or nadir
-580 H=ATN(SA/SQR(1-SA*SA))*RD: ' Altitude (degrees)
-590 A1=SIN(AH): A2=CH*SL-TD*CL: IF A2<>0 THEN 610
-600 AZ=SGN(A1)*PI/2: GOTO 620: ' Special case A2=0
-610 AZ=ATN(A1/A2): IF A2<0 THEN AZ=AZ+PI
-620 AZ=AZ*RD+180: ' Azimuth in degrees from north
-630 IF AZ>=360 THEN AZ=AZ-360
-640 RETURN
-650 ' Find approx. sidereal time at midnight
-660 N=INT(275*M/9)-2*INT((M+9)/12)+J-30
-670 ST=(6.61+.06571*N)/24
-680 ST=(ST-INT(ST))*24: ' Express in hours
-690 RETURN
-700 ' Initialize values
-710 MX=XX: MN=XX: A0=A: H0=H
-720 RETURN
-800 '
-810 ' ROTATE.BAS -- This program by Alphonse
-820 ' Pouplier computes the rate at which
-830 ' the field will rotate for a telescope
-840 ' whose polar axis is misaligned on the
-850 ' celestial pole. This subject is discussed
-860 ' in detail in Sky & Telescope, September
-870 ' 1992, page 318.
diff --git a/bwbtest/B15B/rotate.run b/bwbtest/B15B/rotate.run
deleted file mode 100644
index b476ee4..0000000
--- a/bwbtest/B15B/rotate.run
+++ /dev/null
@@ -1,1384 +0,0 @@
-Observer's latitude (deg) ? 147
-Day of the month (1-31)? 6
-Month (1-12) ? 3
-Right ascension (h,m) ? 9,54
-Declination (deg) ? 76
-
-From (h,m): ? 7,54
-To (h,m): ? 6,43
-
-Positive rotation rates are clockwise:
- 7h 55m Rotation -0.27 deg/min
- 7h 56m Rotation -0.28 deg/min
- 7h 57m Rotation -0.28 deg/min
- 7h 58m Rotation -0.28 deg/min
- 7h 59m Rotation -0.28 deg/min
- 8h 0m Rotation -0.28 deg/min
- 8h 1m Rotation -0.28 deg/min
- 8h 2m Rotation -0.28 deg/min
- 8h 3m Rotation -0.28 deg/min
- 8h 4m Rotation -0.28 deg/min
- 8h 5m Rotation -0.28 deg/min
- 8h 6m Rotation -0.28 deg/min
- 8h 7m Rotation -0.28 deg/min
- 8h 8m Rotation -0.28 deg/min
- 8h 9m Rotation -0.28 deg/min
- 8h 10m Rotation -0.28 deg/min
- 8h 11m Rotation -0.28 deg/min
- 8h 12m Rotation -0.28 deg/min
- 8h 13m Rotation -0.28 deg/min
- 8h 14m Rotation -0.28 deg/min
- 8h 15m Rotation -0.28 deg/min
- 8h 16m Rotation -0.28 deg/min
- 8h 17m Rotation -0.28 deg/min
- 8h 18m Rotation -0.28 deg/min
- 8h 19m Rotation -0.28 deg/min
- 8h 20m Rotation -0.28 deg/min
- 8h 21m Rotation -0.28 deg/min
- 8h 22m Rotation -0.28 deg/min
- 8h 23m Rotation -0.28 deg/min
- 8h 24m Rotation -0.28 deg/min
- 8h 25m Rotation -0.28 deg/min
- 8h 26m Rotation -0.28 deg/min
- 8h 27m Rotation -0.28 deg/min
- 8h 28m Rotation -0.28 deg/min
- 8h 29m Rotation -0.28 deg/min
- 8h 30m Rotation -0.28 deg/min
- 8h 31m Rotation -0.28 deg/min
- 8h 32m Rotation -0.28 deg/min
- 8h 33m Rotation -0.28 deg/min
- 8h 34m Rotation -0.29 deg/min
- 8h 35m Rotation -0.29 deg/min
- 8h 36m Rotation -0.29 deg/min
- 8h 37m Rotation -0.29 deg/min
- 8h 38m Rotation -0.29 deg/min
- 8h 39m Rotation -0.29 deg/min
- 8h 40m Rotation -0.29 deg/min
- 8h 41m Rotation -0.29 deg/min
- 8h 42m Rotation -0.29 deg/min
- 8h 43m Rotation -0.29 deg/min
- 8h 44m Rotation -0.29 deg/min
- 8h 45m Rotation -0.29 deg/min
- 8h 46m Rotation -0.29 deg/min
- 8h 47m Rotation -0.29 deg/min
- 8h 48m Rotation -0.29 deg/min
- 8h 49m Rotation -0.29 deg/min
- 8h 50m Rotation -0.29 deg/min
- 8h 51m Rotation -0.29 deg/min
- 8h 52m Rotation -0.29 deg/min
- 8h 53m Rotation -0.29 deg/min
- 8h 54m Rotation -0.29 deg/min
- 8h 55m Rotation -0.29 deg/min
- 8h 56m Rotation -0.29 deg/min
- 8h 57m Rotation -0.29 deg/min
- 8h 58m Rotation -0.29 deg/min
- 8h 59m Rotation -0.29 deg/min
- 9h 0m Rotation -0.29 deg/min
- 9h 1m Rotation -0.29 deg/min
- 9h 2m Rotation -0.29 deg/min
- 9h 3m Rotation -0.29 deg/min
- 9h 4m Rotation -0.29 deg/min
- 9h 5m Rotation -0.29 deg/min
- 9h 6m Rotation -0.29 deg/min
- 9h 7m Rotation -0.29 deg/min
- 9h 8m Rotation -0.29 deg/min
- 9h 9m Rotation -0.29 deg/min
- 9h 10m Rotation -0.29 deg/min
- 9h 11m Rotation -0.29 deg/min
- 9h 12m Rotation -0.29 deg/min
- 9h 13m Rotation -0.29 deg/min
- 9h 14m Rotation -0.30 deg/min
- 9h 15m Rotation -0.30 deg/min
- 9h 16m Rotation -0.30 deg/min
- 9h 17m Rotation -0.30 deg/min
- 9h 18m Rotation -0.30 deg/min
- 9h 19m Rotation -0.30 deg/min
- 9h 20m Rotation -0.30 deg/min
- 9h 21m Rotation -0.30 deg/min
- 9h 22m Rotation -0.30 deg/min
- 9h 23m Rotation -0.30 deg/min
- 9h 24m Rotation -0.30 deg/min
- 9h 25m Rotation -0.30 deg/min
- 9h 26m Rotation -0.30 deg/min
- 9h 27m Rotation -0.30 deg/min
- 9h 28m Rotation -0.30 deg/min
- 9h 29m Rotation -0.30 deg/min
- 9h 30m Rotation -0.30 deg/min
- 9h 31m Rotation -0.30 deg/min
- 9h 32m Rotation -0.30 deg/min
- 9h 33m Rotation -0.30 deg/min
- 9h 34m Rotation -0.30 deg/min
- 9h 35m Rotation -0.30 deg/min
- 9h 36m Rotation -0.30 deg/min
- 9h 37m Rotation -0.30 deg/min
- 9h 38m Rotation -0.30 deg/min
- 9h 39m Rotation -0.30 deg/min
- 9h 40m Rotation -0.30 deg/min
- 9h 41m Rotation -0.30 deg/min
- 9h 42m Rotation -0.30 deg/min
- 9h 43m Rotation -0.30 deg/min
- 9h 44m Rotation -0.30 deg/min
- 9h 45m Rotation -0.30 deg/min
- 9h 46m Rotation -0.30 deg/min
- 9h 47m Rotation -0.30 deg/min
- 9h 48m Rotation -0.30 deg/min
- 9h 49m Rotation -0.30 deg/min
- 9h 50m Rotation -0.30 deg/min
- 9h 51m Rotation -0.30 deg/min
- 9h 52m Rotation -0.30 deg/min
- 9h 53m Rotation -0.30 deg/min
- 9h 54m Rotation -0.30 deg/min
- 9h 55m Rotation -0.30 deg/min
- 9h 56m Rotation -0.30 deg/min
- 9h 57m Rotation -0.30 deg/min
- 9h 58m Rotation -0.30 deg/min
- 9h 59m Rotation -0.30 deg/min
- 10h 0m Rotation -0.30 deg/min
- 10h 1m Rotation -0.30 deg/min
- 10h 2m Rotation -0.30 deg/min
- 10h 3m Rotation -0.30 deg/min
- 10h 4m Rotation -0.30 deg/min
- 10h 5m Rotation -0.30 deg/min
- 10h 6m Rotation -0.30 deg/min
- 10h 7m Rotation -0.30 deg/min
- 10h 8m Rotation -0.30 deg/min
- 10h 9m Rotation -0.30 deg/min
- 10h 10m Rotation -0.31 deg/min
- 10h 11m Rotation -0.31 deg/min
- 10h 12m Rotation -0.31 deg/min
- 10h 13m Rotation -0.31 deg/min
- 10h 14m Rotation -0.31 deg/min
- 10h 15m Rotation -0.31 deg/min
- 10h 16m Rotation -0.31 deg/min
- 10h 17m Rotation -0.31 deg/min
- 10h 18m Rotation -0.31 deg/min
- 10h 19m Rotation -0.31 deg/min
- 10h 20m Rotation -0.31 deg/min
- 10h 21m Rotation -0.31 deg/min
- 10h 22m Rotation -0.31 deg/min
- 10h 23m Rotation -0.31 deg/min
- 10h 24m Rotation -0.31 deg/min
- 10h 25m Rotation -0.31 deg/min
- 10h 26m Rotation -0.31 deg/min
- 10h 27m Rotation -0.31 deg/min
- 10h 28m Rotation -0.31 deg/min
- 10h 29m Rotation -0.31 deg/min
- 10h 30m Rotation -0.31 deg/min
- 10h 31m Rotation -0.31 deg/min
- 10h 32m Rotation -0.31 deg/min
- 10h 33m Rotation -0.31 deg/min
- 10h 34m Rotation -0.31 deg/min
- 10h 35m Rotation -0.31 deg/min
- 10h 36m Rotation -0.31 deg/min
- 10h 37m Rotation -0.31 deg/min
- 10h 38m Rotation -0.31 deg/min
- 10h 39m Rotation -0.31 deg/min
- 10h 40m Rotation -0.31 deg/min
- 10h 41m Rotation -0.31 deg/min
- 10h 42m Rotation -0.31 deg/min
- 10h 43m Rotation -0.31 deg/min
- 10h 44m Rotation -0.31 deg/min
- 10h 45m Rotation -0.31 deg/min
- 10h 46m Rotation -0.31 deg/min
- 10h 47m Rotation -0.31 deg/min
- 10h 48m Rotation -0.31 deg/min
- 10h 49m Rotation -0.31 deg/min
- 10h 50m Rotation -0.31 deg/min
- 10h 51m Rotation -0.31 deg/min
- 10h 52m Rotation -0.31 deg/min
- 10h 53m Rotation -0.31 deg/min
- 10h 54m Rotation -0.31 deg/min
- 10h 55m Rotation -0.31 deg/min
- 10h 56m Rotation -0.31 deg/min
- 10h 57m Rotation -0.31 deg/min
- 10h 58m Rotation -0.31 deg/min
- 10h 59m Rotation -0.31 deg/min
- 11h 0m Rotation -0.31 deg/min
- 11h 1m Rotation -0.31 deg/min
- 11h 2m Rotation -0.31 deg/min
- 11h 3m Rotation -0.31 deg/min
- 11h 4m Rotation -0.31 deg/min
- 11h 5m Rotation -0.31 deg/min
- 11h 6m Rotation -0.31 deg/min
- 11h 7m Rotation -0.31 deg/min
- 11h 8m Rotation -0.31 deg/min
- 11h 9m Rotation -0.31 deg/min
- 11h 10m Rotation -0.31 deg/min
- 11h 11m Rotation -0.31 deg/min
- 11h 12m Rotation -0.31 deg/min
- 11h 13m Rotation -0.31 deg/min
- 11h 14m Rotation -0.31 deg/min
- 11h 15m Rotation -0.31 deg/min
- 11h 16m Rotation -0.31 deg/min
- 11h 17m Rotation -0.31 deg/min
- 11h 18m Rotation -0.31 deg/min
- 11h 19m Rotation -0.31 deg/min
- 11h 20m Rotation -0.31 deg/min
- 11h 21m Rotation -0.31 deg/min
- 11h 22m Rotation -0.31 deg/min
- 11h 23m Rotation -0.31 deg/min
- 11h 24m Rotation -0.31 deg/min
- 11h 25m Rotation -0.31 deg/min
- 11h 26m Rotation -0.31 deg/min
- 11h 27m Rotation -0.31 deg/min
- 11h 28m Rotation -0.31 deg/min
- 11h 29m Rotation -0.31 deg/min
- 11h 30m Rotation -0.31 deg/min
- 11h 31m Rotation -0.31 deg/min
- 11h 32m Rotation -0.31 deg/min
- 11h 33m Rotation -0.31 deg/min
- 11h 34m Rotation -0.31 deg/min
- 11h 35m Rotation -0.31 deg/min
- 11h 36m Rotation -0.31 deg/min
- 11h 37m Rotation -0.31 deg/min
- 11h 38m Rotation -0.31 deg/min
- 11h 39m Rotation -0.31 deg/min
- 11h 40m Rotation -0.31 deg/min
- 11h 41m Rotation -0.31 deg/min
- 11h 42m Rotation -0.31 deg/min
- 11h 43m Rotation -0.31 deg/min
- 11h 44m Rotation -0.31 deg/min
- 11h 45m Rotation -0.31 deg/min
- 11h 46m Rotation -0.31 deg/min
- 11h 47m Rotation -0.31 deg/min
- 11h 48m Rotation -0.31 deg/min
- 11h 49m Rotation -0.31 deg/min
- 11h 50m Rotation -0.31 deg/min
- 11h 51m Rotation -0.30 deg/min
- 11h 52m Rotation -0.30 deg/min
- 11h 53m Rotation -0.30 deg/min
- 11h 54m Rotation -0.30 deg/min
- 11h 55m Rotation -0.30 deg/min
- 11h 56m Rotation -0.30 deg/min
- 11h 57m Rotation -0.30 deg/min
- 11h 58m Rotation -0.30 deg/min
- 11h 59m Rotation -0.30 deg/min
- 12h 0m Rotation -0.30 deg/min
- 12h 1m Rotation -0.30 deg/min
- 12h 2m Rotation -0.30 deg/min
- 12h 3m Rotation -0.30 deg/min
- 12h 4m Rotation -0.30 deg/min
- 12h 5m Rotation -0.30 deg/min
- 12h 6m Rotation -0.30 deg/min
- 12h 7m Rotation -0.30 deg/min
- 12h 8m Rotation -0.30 deg/min
- 12h 9m Rotation -0.30 deg/min
- 12h 10m Rotation -0.30 deg/min
- 12h 11m Rotation -0.30 deg/min
- 12h 12m Rotation -0.30 deg/min
- 12h 13m Rotation -0.30 deg/min
- 12h 14m Rotation -0.30 deg/min
- 12h 15m Rotation -0.30 deg/min
- 12h 16m Rotation -0.30 deg/min
- 12h 17m Rotation -0.30 deg/min
- 12h 18m Rotation -0.30 deg/min
- 12h 19m Rotation -0.30 deg/min
- 12h 20m Rotation -0.30 deg/min
- 12h 21m Rotation -0.30 deg/min
- 12h 22m Rotation -0.30 deg/min
- 12h 23m Rotation -0.30 deg/min
- 12h 24m Rotation -0.30 deg/min
- 12h 25m Rotation -0.30 deg/min
- 12h 26m Rotation -0.30 deg/min
- 12h 27m Rotation -0.30 deg/min
- 12h 28m Rotation -0.30 deg/min
- 12h 29m Rotation -0.30 deg/min
- 12h 30m Rotation -0.30 deg/min
- 12h 31m Rotation -0.30 deg/min
- 12h 32m Rotation -0.30 deg/min
- 12h 33m Rotation -0.30 deg/min
- 12h 34m Rotation -0.30 deg/min
- 12h 35m Rotation -0.30 deg/min
- 12h 36m Rotation -0.30 deg/min
- 12h 37m Rotation -0.30 deg/min
- 12h 38m Rotation -0.30 deg/min
- 12h 39m Rotation -0.30 deg/min
- 12h 40m Rotation -0.30 deg/min
- 12h 41m Rotation -0.30 deg/min
- 12h 42m Rotation -0.30 deg/min
- 12h 43m Rotation -0.30 deg/min
- 12h 44m Rotation -0.30 deg/min
- 12h 45m Rotation -0.30 deg/min
- 12h 46m Rotation -0.29 deg/min
- 12h 47m Rotation -0.29 deg/min
- 12h 48m Rotation -0.29 deg/min
- 12h 49m Rotation -0.29 deg/min
- 12h 50m Rotation -0.29 deg/min
- 12h 51m Rotation -0.29 deg/min
- 12h 52m Rotation -0.29 deg/min
- 12h 53m Rotation -0.29 deg/min
- 12h 54m Rotation -0.29 deg/min
- 12h 55m Rotation -0.29 deg/min
- 12h 56m Rotation -0.29 deg/min
- 12h 57m Rotation -0.29 deg/min
- 12h 58m Rotation -0.29 deg/min
- 12h 59m Rotation -0.29 deg/min
- 13h 0m Rotation -0.29 deg/min
- 13h 1m Rotation -0.29 deg/min
- 13h 2m Rotation -0.29 deg/min
- 13h 3m Rotation -0.29 deg/min
- 13h 4m Rotation -0.29 deg/min
- 13h 5m Rotation -0.29 deg/min
- 13h 6m Rotation -0.29 deg/min
- 13h 7m Rotation -0.29 deg/min
- 13h 8m Rotation -0.29 deg/min
- 13h 9m Rotation -0.29 deg/min
- 13h 10m Rotation -0.29 deg/min
- 13h 11m Rotation -0.29 deg/min
- 13h 12m Rotation -0.29 deg/min
- 13h 13m Rotation -0.29 deg/min
- 13h 14m Rotation -0.29 deg/min
- 13h 15m Rotation -0.29 deg/min
- 13h 16m Rotation -0.29 deg/min
- 13h 17m Rotation -0.29 deg/min
- 13h 18m Rotation -0.29 deg/min
- 13h 19m Rotation -0.29 deg/min
- 13h 20m Rotation -0.29 deg/min
- 13h 21m Rotation -0.29 deg/min
- 13h 22m Rotation -0.29 deg/min
- 13h 23m Rotation -0.29 deg/min
- 13h 24m Rotation -0.29 deg/min
- 13h 25m Rotation -0.29 deg/min
- 13h 26m Rotation -0.29 deg/min
- 13h 27m Rotation -0.28 deg/min
- 13h 28m Rotation -0.28 deg/min
- 13h 29m Rotation -0.28 deg/min
- 13h 30m Rotation -0.28 deg/min
- 13h 31m Rotation -0.28 deg/min
- 13h 32m Rotation -0.28 deg/min
- 13h 33m Rotation -0.28 deg/min
- 13h 34m Rotation -0.28 deg/min
- 13h 35m Rotation -0.28 deg/min
- 13h 36m Rotation -0.28 deg/min
- 13h 37m Rotation -0.28 deg/min
- 13h 38m Rotation -0.28 deg/min
- 13h 39m Rotation -0.28 deg/min
- 13h 40m Rotation -0.28 deg/min
- 13h 41m Rotation -0.28 deg/min
- 13h 42m Rotation -0.28 deg/min
- 13h 43m Rotation -0.28 deg/min
- 13h 44m Rotation -0.28 deg/min
- 13h 45m Rotation -0.28 deg/min
- 13h 46m Rotation -0.28 deg/min
- 13h 47m Rotation -0.28 deg/min
- 13h 48m Rotation -0.28 deg/min
- 13h 49m Rotation -0.28 deg/min
- 13h 50m Rotation -0.28 deg/min
- 13h 51m Rotation -0.28 deg/min
- 13h 52m Rotation -0.28 deg/min
- 13h 53m Rotation -0.28 deg/min
- 13h 54m Rotation -0.28 deg/min
- 13h 55m Rotation -0.28 deg/min
- 13h 56m Rotation -0.28 deg/min
- 13h 57m Rotation -0.28 deg/min
- 13h 58m Rotation -0.28 deg/min
- 13h 59m Rotation -0.28 deg/min
- 14h 0m Rotation -0.28 deg/min
- 14h 1m Rotation -0.28 deg/min
- 14h 2m Rotation -0.28 deg/min
- 14h 3m Rotation -0.28 deg/min
- 14h 4m Rotation -0.27 deg/min
- 14h 5m Rotation -0.27 deg/min
- 14h 6m Rotation -0.27 deg/min
- 14h 7m Rotation -0.27 deg/min
- 14h 8m Rotation -0.27 deg/min
- 14h 9m Rotation -0.27 deg/min
- 14h 10m Rotation -0.27 deg/min
- 14h 11m Rotation -0.27 deg/min
- 14h 12m Rotation -0.27 deg/min
- 14h 13m Rotation -0.27 deg/min
- 14h 14m Rotation -0.27 deg/min
- 14h 15m Rotation -0.27 deg/min
- 14h 16m Rotation -0.27 deg/min
- 14h 17m Rotation -0.27 deg/min
- 14h 18m Rotation -0.27 deg/min
- 14h 19m Rotation -0.27 deg/min
- 14h 20m Rotation -0.27 deg/min
- 14h 21m Rotation -0.27 deg/min
- 14h 22m Rotation -0.27 deg/min
- 14h 23m Rotation -0.27 deg/min
- 14h 24m Rotation -0.27 deg/min
- 14h 25m Rotation -0.27 deg/min
- 14h 26m Rotation -0.27 deg/min
- 14h 27m Rotation -0.27 deg/min
- 14h 28m Rotation -0.27 deg/min
- 14h 29m Rotation -0.27 deg/min
- 14h 30m Rotation -0.27 deg/min
- 14h 31m Rotation -0.27 deg/min
- 14h 32m Rotation -0.27 deg/min
- 14h 33m Rotation -0.27 deg/min
- 14h 34m Rotation -0.27 deg/min
- 14h 35m Rotation -0.27 deg/min
- 14h 36m Rotation -0.27 deg/min
- 14h 37m Rotation -0.27 deg/min
- 14h 38m Rotation -0.27 deg/min
- 14h 39m Rotation -0.27 deg/min
- 14h 40m Rotation -0.27 deg/min
- 14h 41m Rotation -0.27 deg/min
- 14h 42m Rotation -0.26 deg/min
- 14h 43m Rotation -0.26 deg/min
- 14h 44m Rotation -0.26 deg/min
- 14h 45m Rotation -0.26 deg/min
- 14h 46m Rotation -0.26 deg/min
- 14h 47m Rotation -0.26 deg/min
- 14h 48m Rotation -0.26 deg/min
- 14h 49m Rotation -0.26 deg/min
- 14h 50m Rotation -0.26 deg/min
- 14h 51m Rotation -0.26 deg/min
- 14h 52m Rotation -0.26 deg/min
- 14h 53m Rotation -0.26 deg/min
- 14h 54m Rotation -0.26 deg/min
- 14h 55m Rotation -0.26 deg/min
- 14h 56m Rotation -0.26 deg/min
- 14h 57m Rotation -0.26 deg/min
- 14h 58m Rotation -0.26 deg/min
- 14h 59m Rotation -0.26 deg/min
- 15h 0m Rotation -0.26 deg/min
- 15h 1m Rotation -0.26 deg/min
- 15h 2m Rotation -0.26 deg/min
- 15h 3m Rotation -0.26 deg/min
- 15h 4m Rotation -0.26 deg/min
- 15h 5m Rotation -0.26 deg/min
- 15h 6m Rotation -0.26 deg/min
- 15h 7m Rotation -0.26 deg/min
- 15h 8m Rotation -0.26 deg/min
- 15h 9m Rotation -0.26 deg/min
- 15h 10m Rotation -0.26 deg/min
- 15h 11m Rotation -0.26 deg/min
- 15h 12m Rotation -0.26 deg/min
- 15h 13m Rotation -0.26 deg/min
- 15h 14m Rotation -0.26 deg/min
- 15h 15m Rotation -0.26 deg/min
- 15h 16m Rotation -0.26 deg/min
- 15h 17m Rotation -0.26 deg/min
- 15h 18m Rotation -0.26 deg/min
- 15h 19m Rotation -0.26 deg/min
- 15h 20m Rotation -0.26 deg/min
- 15h 21m Rotation -0.26 deg/min
- 15h 22m Rotation -0.26 deg/min
- 15h 23m Rotation -0.26 deg/min
- 15h 24m Rotation -0.25 deg/min
- 15h 25m Rotation -0.25 deg/min
- 15h 26m Rotation -0.25 deg/min
- 15h 27m Rotation -0.25 deg/min
- 15h 28m Rotation -0.25 deg/min
- 15h 29m Rotation -0.25 deg/min
- 15h 30m Rotation -0.25 deg/min
- 15h 31m Rotation -0.25 deg/min
- 15h 32m Rotation -0.25 deg/min
- 15h 33m Rotation -0.25 deg/min
- 15h 34m Rotation -0.25 deg/min
- 15h 35m Rotation -0.25 deg/min
- 15h 36m Rotation -0.25 deg/min
- 15h 37m Rotation -0.25 deg/min
- 15h 38m Rotation -0.25 deg/min
- 15h 39m Rotation -0.25 deg/min
- 15h 40m Rotation -0.25 deg/min
- 15h 41m Rotation -0.25 deg/min
- 15h 42m Rotation -0.25 deg/min
- 15h 43m Rotation -0.25 deg/min
- 15h 44m Rotation -0.25 deg/min
- 15h 45m Rotation -0.25 deg/min
- 15h 46m Rotation -0.25 deg/min
- 15h 47m Rotation -0.25 deg/min
- 15h 48m Rotation -0.25 deg/min
- 15h 49m Rotation -0.25 deg/min
- 15h 50m Rotation -0.25 deg/min
- 15h 51m Rotation -0.25 deg/min
- 15h 52m Rotation -0.25 deg/min
- 15h 53m Rotation -0.25 deg/min
- 15h 54m Rotation -0.25 deg/min
- 15h 55m Rotation -0.25 deg/min
- 15h 56m Rotation -0.25 deg/min
- 15h 57m Rotation -0.25 deg/min
- 15h 58m Rotation -0.25 deg/min
- 15h 59m Rotation -0.25 deg/min
- 16h 0m Rotation -0.25 deg/min
- 16h 1m Rotation -0.25 deg/min
- 16h 2m Rotation -0.25 deg/min
- 16h 3m Rotation -0.25 deg/min
- 16h 4m Rotation -0.25 deg/min
- 16h 5m Rotation -0.25 deg/min
- 16h 6m Rotation -0.25 deg/min
- 16h 7m Rotation -0.25 deg/min
- 16h 8m Rotation -0.25 deg/min
- 16h 9m Rotation -0.25 deg/min
- 16h 10m Rotation -0.25 deg/min
- 16h 11m Rotation -0.25 deg/min
- 16h 12m Rotation -0.24 deg/min
- 16h 13m Rotation -0.24 deg/min
- 16h 14m Rotation -0.24 deg/min
- 16h 15m Rotation -0.24 deg/min
- 16h 16m Rotation -0.24 deg/min
- 16h 17m Rotation -0.24 deg/min
- 16h 18m Rotation -0.24 deg/min
- 16h 19m Rotation -0.24 deg/min
- 16h 20m Rotation -0.24 deg/min
- 16h 21m Rotation -0.24 deg/min
- 16h 22m Rotation -0.24 deg/min
- 16h 23m Rotation -0.24 deg/min
- 16h 24m Rotation -0.24 deg/min
- 16h 25m Rotation -0.24 deg/min
- 16h 26m Rotation -0.24 deg/min
- 16h 27m Rotation -0.24 deg/min
- 16h 28m Rotation -0.24 deg/min
- 16h 29m Rotation -0.24 deg/min
- 16h 30m Rotation -0.24 deg/min
- 16h 31m Rotation -0.24 deg/min
- 16h 32m Rotation -0.24 deg/min
- 16h 33m Rotation -0.24 deg/min
- 16h 34m Rotation -0.24 deg/min
- 16h 35m Rotation -0.24 deg/min
- 16h 36m Rotation -0.24 deg/min
- 16h 37m Rotation -0.24 deg/min
- 16h 38m Rotation -0.24 deg/min
- 16h 39m Rotation -0.24 deg/min
- 16h 40m Rotation -0.24 deg/min
- 16h 41m Rotation -0.24 deg/min
- 16h 42m Rotation -0.24 deg/min
- 16h 43m Rotation -0.24 deg/min
- 16h 44m Rotation -0.24 deg/min
- 16h 45m Rotation -0.24 deg/min
- 16h 46m Rotation -0.24 deg/min
- 16h 47m Rotation -0.24 deg/min
- 16h 48m Rotation -0.24 deg/min
- 16h 49m Rotation -0.24 deg/min
- 16h 50m Rotation -0.24 deg/min
- 16h 51m Rotation -0.24 deg/min
- 16h 52m Rotation -0.24 deg/min
- 16h 53m Rotation -0.24 deg/min
- 16h 54m Rotation -0.24 deg/min
- 16h 55m Rotation -0.24 deg/min
- 16h 56m Rotation -0.24 deg/min
- 16h 57m Rotation -0.24 deg/min
- 16h 58m Rotation -0.24 deg/min
- 16h 59m Rotation -0.24 deg/min
- 17h 0m Rotation -0.24 deg/min
- 17h 1m Rotation -0.24 deg/min
- 17h 2m Rotation -0.24 deg/min
- 17h 3m Rotation -0.24 deg/min
- 17h 4m Rotation -0.24 deg/min
- 17h 5m Rotation -0.24 deg/min
- 17h 6m Rotation -0.24 deg/min
- 17h 7m Rotation -0.24 deg/min
- 17h 8m Rotation -0.24 deg/min
- 17h 9m Rotation -0.24 deg/min
- 17h 10m Rotation -0.24 deg/min
- 17h 11m Rotation -0.24 deg/min
- 17h 12m Rotation -0.24 deg/min
- 17h 13m Rotation -0.24 deg/min
- 17h 14m Rotation -0.24 deg/min
- 17h 15m Rotation -0.24 deg/min
- 17h 16m Rotation -0.24 deg/min
- 17h 17m Rotation -0.23 deg/min
- 17h 18m Rotation -0.23 deg/min
- 17h 19m Rotation -0.23 deg/min
- 17h 20m Rotation -0.23 deg/min
- 17h 21m Rotation -0.23 deg/min
- 17h 22m Rotation -0.23 deg/min
- 17h 23m Rotation -0.23 deg/min
- 17h 24m Rotation -0.23 deg/min
- 17h 25m Rotation -0.23 deg/min
- 17h 26m Rotation -0.23 deg/min
- 17h 27m Rotation -0.23 deg/min
- 17h 28m Rotation -0.23 deg/min
- 17h 29m Rotation -0.23 deg/min
- 17h 30m Rotation -0.23 deg/min
- 17h 31m Rotation -0.23 deg/min
- 17h 32m Rotation -0.23 deg/min
- 17h 33m Rotation -0.23 deg/min
- 17h 34m Rotation -0.23 deg/min
- 17h 35m Rotation -0.23 deg/min
- 17h 36m Rotation -0.23 deg/min
- 17h 37m Rotation -0.23 deg/min
- 17h 38m Rotation -0.23 deg/min
- 17h 39m Rotation -0.23 deg/min
- 17h 40m Rotation -0.23 deg/min
- 17h 41m Rotation -0.23 deg/min
- 17h 42m Rotation -0.23 deg/min
- 17h 43m Rotation -0.23 deg/min
- 17h 44m Rotation -0.23 deg/min
- 17h 45m Rotation -0.23 deg/min
- 17h 46m Rotation -0.23 deg/min
- 17h 47m Rotation -0.23 deg/min
- 17h 48m Rotation -0.23 deg/min
- 17h 49m Rotation -0.23 deg/min
- 17h 50m Rotation -0.23 deg/min
- 17h 51m Rotation -0.23 deg/min
- 17h 52m Rotation -0.23 deg/min
- 17h 53m Rotation -0.23 deg/min
- 17h 54m Rotation -0.23 deg/min
- 17h 55m Rotation -0.23 deg/min
- 17h 56m Rotation -0.23 deg/min
- 17h 57m Rotation -0.23 deg/min
- 17h 58m Rotation -0.23 deg/min
- 17h 59m Rotation -0.23 deg/min
- 18h 0m Rotation -0.23 deg/min
- 18h 1m Rotation -0.23 deg/min
- 18h 2m Rotation -0.23 deg/min
- 18h 3m Rotation -0.23 deg/min
- 18h 4m Rotation -0.23 deg/min
- 18h 5m Rotation -0.23 deg/min
- 18h 6m Rotation -0.23 deg/min
- 18h 7m Rotation -0.23 deg/min
- 18h 8m Rotation -0.23 deg/min
- 18h 9m Rotation -0.23 deg/min
- 18h 10m Rotation -0.23 deg/min
- 18h 11m Rotation -0.23 deg/min
- 18h 12m Rotation -0.23 deg/min
- 18h 13m Rotation -0.23 deg/min
- 18h 14m Rotation -0.23 deg/min
- 18h 15m Rotation -0.23 deg/min
- 18h 16m Rotation -0.23 deg/min
- 18h 17m Rotation -0.23 deg/min
- 18h 18m Rotation -0.23 deg/min
- 18h 19m Rotation -0.23 deg/min
- 18h 20m Rotation -0.23 deg/min
- 18h 21m Rotation -0.23 deg/min
- 18h 22m Rotation -0.23 deg/min
- 18h 23m Rotation -0.23 deg/min
- 18h 24m Rotation -0.23 deg/min
- 18h 25m Rotation -0.23 deg/min
- 18h 26m Rotation -0.23 deg/min
- 18h 27m Rotation -0.23 deg/min
- 18h 28m Rotation -0.23 deg/min
- 18h 29m Rotation -0.23 deg/min
- 18h 30m Rotation -0.23 deg/min
- 18h 31m Rotation -0.23 deg/min
- 18h 32m Rotation -0.23 deg/min
- 18h 33m Rotation -0.23 deg/min
- 18h 34m Rotation -0.23 deg/min
- 18h 35m Rotation -0.23 deg/min
- 18h 36m Rotation -0.23 deg/min
- 18h 37m Rotation -0.23 deg/min
- 18h 38m Rotation -0.23 deg/min
- 18h 39m Rotation -0.23 deg/min
- 18h 40m Rotation -0.23 deg/min
- 18h 41m Rotation -0.23 deg/min
- 18h 42m Rotation -0.23 deg/min
- 18h 43m Rotation -0.23 deg/min
- 18h 44m Rotation -0.23 deg/min
- 18h 45m Rotation -0.23 deg/min
- 18h 46m Rotation -0.23 deg/min
- 18h 47m Rotation -0.23 deg/min
- 18h 48m Rotation -0.23 deg/min
- 18h 49m Rotation -0.23 deg/min
- 18h 50m Rotation -0.23 deg/min
- 18h 51m Rotation -0.23 deg/min
- 18h 52m Rotation -0.23 deg/min
- 18h 53m Rotation -0.23 deg/min
- 18h 54m Rotation -0.23 deg/min
- 18h 55m Rotation -0.23 deg/min
- 18h 56m Rotation -0.23 deg/min
- 18h 57m Rotation -0.23 deg/min
- 18h 58m Rotation -0.23 deg/min
- 18h 59m Rotation -0.23 deg/min
- 19h 0m Rotation -0.23 deg/min
- 19h 1m Rotation -0.23 deg/min
- 19h 2m Rotation -0.23 deg/min
- 19h 3m Rotation -0.23 deg/min
- 19h 4m Rotation -0.23 deg/min
- 19h 5m Rotation -0.23 deg/min
- 19h 6m Rotation -0.23 deg/min
- 19h 7m Rotation -0.23 deg/min
- 19h 8m Rotation -0.23 deg/min
- 19h 9m Rotation -0.23 deg/min
- 19h 10m Rotation -0.23 deg/min
- 19h 11m Rotation -0.23 deg/min
- 19h 12m Rotation -0.23 deg/min
- 19h 13m Rotation -0.23 deg/min
- 19h 14m Rotation -0.23 deg/min
- 19h 15m Rotation -0.23 deg/min
- 19h 16m Rotation -0.23 deg/min
- 19h 17m Rotation -0.23 deg/min
- 19h 18m Rotation -0.23 deg/min
- 19h 19m Rotation -0.23 deg/min
- 19h 20m Rotation -0.23 deg/min
- 19h 21m Rotation -0.23 deg/min
- 19h 22m Rotation -0.23 deg/min
- 19h 23m Rotation -0.23 deg/min
- 19h 24m Rotation -0.22 deg/min
- 19h 25m Rotation -0.22 deg/min
- 19h 26m Rotation -0.22 deg/min
- 19h 27m Rotation -0.22 deg/min
- 19h 28m Rotation -0.22 deg/min
- 19h 29m Rotation -0.22 deg/min
- 19h 30m Rotation -0.22 deg/min
- 19h 31m Rotation -0.22 deg/min
- 19h 32m Rotation -0.22 deg/min
- 19h 33m Rotation -0.22 deg/min
- 19h 34m Rotation -0.22 deg/min
- 19h 35m Rotation -0.22 deg/min
- 19h 36m Rotation -0.22 deg/min
- 19h 37m Rotation -0.22 deg/min
- 19h 38m Rotation -0.22 deg/min
- 19h 39m Rotation -0.22 deg/min
- 19h 40m Rotation -0.22 deg/min
- 19h 41m Rotation -0.22 deg/min
- 19h 42m Rotation -0.22 deg/min
- 19h 43m Rotation -0.22 deg/min
- 19h 44m Rotation -0.22 deg/min
- 19h 45m Rotation -0.22 deg/min
- 19h 46m Rotation -0.22 deg/min
- 19h 47m Rotation -0.22 deg/min
- 19h 48m Rotation -0.22 deg/min
- 19h 49m Rotation -0.22 deg/min
- 19h 50m Rotation -0.22 deg/min
- 19h 51m Rotation -0.22 deg/min
- 19h 52m Rotation -0.22 deg/min
- 19h 53m Rotation -0.22 deg/min
- 19h 54m Rotation -0.22 deg/min
- 19h 55m Rotation -0.22 deg/min
- 19h 56m Rotation -0.22 deg/min
- 19h 57m Rotation -0.22 deg/min
- 19h 58m Rotation -0.22 deg/min
- 19h 59m Rotation -0.22 deg/min
- 20h 0m Rotation -0.22 deg/min
- 20h 1m Rotation -0.22 deg/min
- 20h 2m Rotation -0.22 deg/min
- 20h 3m Rotation -0.22 deg/min
- 20h 4m Rotation -0.22 deg/min
- 20h 5m Rotation -0.22 deg/min
- 20h 6m Rotation -0.22 deg/min
- 20h 7m Rotation -0.22 deg/min
- 20h 8m Rotation -0.22 deg/min
- 20h 9m Rotation -0.22 deg/min
- 20h 10m Rotation -0.22 deg/min
- 20h 11m Rotation -0.22 deg/min
- 20h 12m Rotation -0.22 deg/min
- 20h 13m Rotation -0.22 deg/min
- 20h 14m Rotation -0.22 deg/min
- 20h 15m Rotation -0.22 deg/min
- 20h 16m Rotation -0.22 deg/min
- 20h 17m Rotation -0.22 deg/min
- 20h 18m Rotation -0.22 deg/min
- 20h 19m Rotation -0.22 deg/min
- 20h 20m Rotation -0.22 deg/min
- 20h 21m Rotation -0.22 deg/min
- 20h 22m Rotation -0.22 deg/min
- 20h 23m Rotation -0.22 deg/min
- 20h 24m Rotation -0.22 deg/min
- 20h 25m Rotation -0.22 deg/min
- 20h 26m Rotation -0.22 deg/min
- 20h 27m Rotation -0.22 deg/min
- 20h 28m Rotation -0.22 deg/min
- 20h 29m Rotation -0.22 deg/min
- 20h 30m Rotation -0.22 deg/min
- 20h 31m Rotation -0.22 deg/min
- 20h 32m Rotation -0.22 deg/min
- 20h 33m Rotation -0.22 deg/min
- 20h 34m Rotation -0.22 deg/min
- 20h 35m Rotation -0.22 deg/min
- 20h 36m Rotation -0.22 deg/min
- 20h 37m Rotation -0.22 deg/min
- 20h 38m Rotation -0.22 deg/min
- 20h 39m Rotation -0.22 deg/min
- 20h 40m Rotation -0.22 deg/min
- 20h 41m Rotation -0.22 deg/min
- 20h 42m Rotation -0.22 deg/min
- 20h 43m Rotation -0.22 deg/min
- 20h 44m Rotation -0.22 deg/min
- 20h 45m Rotation -0.22 deg/min
- 20h 46m Rotation -0.22 deg/min
- 20h 47m Rotation -0.22 deg/min
- 20h 48m Rotation -0.22 deg/min
- 20h 49m Rotation -0.22 deg/min
- 20h 50m Rotation -0.22 deg/min
- 20h 51m Rotation -0.22 deg/min
- 20h 52m Rotation -0.22 deg/min
- 20h 53m Rotation -0.22 deg/min
- 20h 54m Rotation -0.22 deg/min
- 20h 55m Rotation -0.22 deg/min
- 20h 56m Rotation -0.22 deg/min
- 20h 57m Rotation -0.22 deg/min
- 20h 58m Rotation -0.22 deg/min
- 20h 59m Rotation -0.22 deg/min
- 21h 0m Rotation -0.22 deg/min
- 21h 1m Rotation -0.22 deg/min
- 21h 2m Rotation -0.22 deg/min
- 21h 3m Rotation -0.22 deg/min
- 21h 4m Rotation -0.22 deg/min
- 21h 5m Rotation -0.22 deg/min
- 21h 6m Rotation -0.22 deg/min
- 21h 7m Rotation -0.22 deg/min
- 21h 8m Rotation -0.22 deg/min
- 21h 9m Rotation -0.22 deg/min
- 21h 10m Rotation -0.22 deg/min
- 21h 11m Rotation -0.22 deg/min
- 21h 12m Rotation -0.22 deg/min
- 21h 13m Rotation -0.22 deg/min
- 21h 14m Rotation -0.22 deg/min
- 21h 15m Rotation -0.22 deg/min
- 21h 16m Rotation -0.22 deg/min
- 21h 17m Rotation -0.22 deg/min
- 21h 18m Rotation -0.22 deg/min
- 21h 19m Rotation -0.22 deg/min
- 21h 20m Rotation -0.22 deg/min
- 21h 21m Rotation -0.22 deg/min
- 21h 22m Rotation -0.22 deg/min
- 21h 23m Rotation -0.22 deg/min
- 21h 24m Rotation -0.22 deg/min
- 21h 25m Rotation -0.22 deg/min
- 21h 26m Rotation -0.22 deg/min
- 21h 27m Rotation -0.22 deg/min
- 21h 28m Rotation -0.22 deg/min
- 21h 29m Rotation -0.22 deg/min
- 21h 30m Rotation -0.22 deg/min
- 21h 31m Rotation -0.22 deg/min
- 21h 32m Rotation -0.22 deg/min
- 21h 33m Rotation -0.22 deg/min
- 21h 34m Rotation -0.22 deg/min
- 21h 35m Rotation -0.22 deg/min
- 21h 36m Rotation -0.22 deg/min
- 21h 37m Rotation -0.22 deg/min
- 21h 38m Rotation -0.22 deg/min
- 21h 39m Rotation -0.22 deg/min
- 21h 40m Rotation -0.22 deg/min
- 21h 41m Rotation -0.22 deg/min
- 21h 42m Rotation -0.22 deg/min
- 21h 43m Rotation -0.22 deg/min
- 21h 44m Rotation -0.22 deg/min
- 21h 45m Rotation -0.22 deg/min
- 21h 46m Rotation -0.22 deg/min
- 21h 47m Rotation -0.22 deg/min
- 21h 48m Rotation -0.22 deg/min
- 21h 49m Rotation -0.22 deg/min
- 21h 50m Rotation -0.22 deg/min
- 21h 51m Rotation -0.22 deg/min
- 21h 52m Rotation -0.22 deg/min
- 21h 53m Rotation -0.22 deg/min
- 21h 54m Rotation -0.22 deg/min
- 21h 55m Rotation -0.22 deg/min
- 21h 56m Rotation -0.22 deg/min
- 21h 57m Rotation -0.22 deg/min
- 21h 58m Rotation -0.22 deg/min
- 21h 59m Rotation -0.22 deg/min
- 22h 0m Rotation -0.22 deg/min
- 22h 1m Rotation -0.22 deg/min
- 22h 2m Rotation -0.22 deg/min
- 22h 3m Rotation -0.22 deg/min
- 22h 4m Rotation -0.22 deg/min
- 22h 5m Rotation -0.22 deg/min
- 22h 6m Rotation -0.22 deg/min
- 22h 7m Rotation -0.22 deg/min
- 22h 8m Rotation -0.22 deg/min
- 22h 9m Rotation -0.22 deg/min
- 22h 10m Rotation -0.22 deg/min
- 22h 11m Rotation -0.22 deg/min
- 22h 12m Rotation -0.22 deg/min
- 22h 13m Rotation -0.22 deg/min
- 22h 14m Rotation -0.22 deg/min
- 22h 15m Rotation -0.22 deg/min
- 22h 16m Rotation -0.22 deg/min
- 22h 17m Rotation -0.22 deg/min
- 22h 18m Rotation -0.22 deg/min
- 22h 19m Rotation -0.22 deg/min
- 22h 20m Rotation -0.22 deg/min
- 22h 21m Rotation -0.22 deg/min
- 22h 22m Rotation -0.22 deg/min
- 22h 23m Rotation -0.22 deg/min
- 22h 24m Rotation -0.22 deg/min
- 22h 25m Rotation -0.22 deg/min
- 22h 26m Rotation -0.22 deg/min
- 22h 27m Rotation -0.22 deg/min
- 22h 28m Rotation -0.22 deg/min
- 22h 29m Rotation -0.22 deg/min
- 22h 30m Rotation -0.22 deg/min
- 22h 31m Rotation -0.22 deg/min
- 22h 32m Rotation -0.22 deg/min
- 22h 33m Rotation -0.22 deg/min
- 22h 34m Rotation -0.22 deg/min
- 22h 35m Rotation -0.22 deg/min
- 22h 36m Rotation -0.22 deg/min
- 22h 37m Rotation -0.22 deg/min
- 22h 38m Rotation -0.22 deg/min
- 22h 39m Rotation -0.22 deg/min
- 22h 40m Rotation -0.22 deg/min
- 22h 41m Rotation -0.22 deg/min
- 22h 42m Rotation -0.22 deg/min
- 22h 43m Rotation -0.22 deg/min
- 22h 44m Rotation -0.22 deg/min
- 22h 45m Rotation -0.22 deg/min
- 22h 46m Rotation -0.22 deg/min
- 22h 47m Rotation -0.22 deg/min
- 22h 48m Rotation -0.22 deg/min
- 22h 49m Rotation -0.22 deg/min
- 22h 50m Rotation -0.22 deg/min
- 22h 51m Rotation -0.22 deg/min
- 22h 52m Rotation -0.22 deg/min
- 22h 53m Rotation -0.22 deg/min
- 22h 54m Rotation -0.22 deg/min
- 22h 55m Rotation -0.22 deg/min
- 22h 56m Rotation -0.22 deg/min
- 22h 57m Rotation -0.22 deg/min
- 22h 58m Rotation -0.22 deg/min
- 22h 59m Rotation -0.22 deg/min
- 23h 0m Rotation -0.22 deg/min
- 23h 1m Rotation -0.22 deg/min
- 23h 2m Rotation -0.22 deg/min
- 23h 3m Rotation -0.22 deg/min
- 23h 4m Rotation -0.22 deg/min
- 23h 5m Rotation -0.22 deg/min
- 23h 6m Rotation -0.22 deg/min
- 23h 7m Rotation -0.22 deg/min
- 23h 8m Rotation -0.22 deg/min
- 23h 9m Rotation -0.22 deg/min
- 23h 10m Rotation -0.22 deg/min
- 23h 11m Rotation -0.22 deg/min
- 23h 12m Rotation -0.22 deg/min
- 23h 13m Rotation -0.22 deg/min
- 23h 14m Rotation -0.22 deg/min
- 23h 15m Rotation -0.22 deg/min
- 23h 16m Rotation -0.22 deg/min
- 23h 17m Rotation -0.22 deg/min
- 23h 18m Rotation -0.22 deg/min
- 23h 19m Rotation -0.22 deg/min
- 23h 20m Rotation -0.22 deg/min
- 23h 21m Rotation -0.22 deg/min
- 23h 22m Rotation -0.22 deg/min
- 23h 23m Rotation -0.22 deg/min
- 23h 24m Rotation -0.22 deg/min
- 23h 25m Rotation -0.22 deg/min
- 23h 26m Rotation -0.22 deg/min
- 23h 27m Rotation -0.22 deg/min
- 23h 28m Rotation -0.22 deg/min
- 23h 29m Rotation -0.22 deg/min
- 23h 30m Rotation -0.22 deg/min
- 23h 31m Rotation -0.22 deg/min
- 23h 32m Rotation -0.22 deg/min
- 23h 33m Rotation -0.22 deg/min
- 23h 34m Rotation -0.22 deg/min
- 23h 35m Rotation -0.22 deg/min
- 23h 36m Rotation -0.22 deg/min
- 23h 37m Rotation -0.22 deg/min
- 23h 38m Rotation -0.22 deg/min
- 23h 39m Rotation -0.22 deg/min
- 23h 40m Rotation -0.22 deg/min
- 23h 41m Rotation -0.22 deg/min
- 23h 42m Rotation -0.22 deg/min
- 23h 43m Rotation -0.22 deg/min
- 23h 44m Rotation -0.22 deg/min
- 23h 45m Rotation -0.22 deg/min
- 23h 46m Rotation -0.22 deg/min
- 23h 47m Rotation -0.22 deg/min
- 23h 48m Rotation -0.22 deg/min
- 23h 49m Rotation -0.22 deg/min
- 23h 50m Rotation -0.22 deg/min
- 23h 51m Rotation -0.22 deg/min
- 23h 52m Rotation -0.22 deg/min
- 23h 53m Rotation -0.22 deg/min
- 23h 54m Rotation -0.22 deg/min
- 23h 55m Rotation -0.22 deg/min
- 23h 56m Rotation -0.22 deg/min
- 23h 57m Rotation -0.22 deg/min
- 23h 58m Rotation -0.22 deg/min
- 23h 59m Rotation -0.22 deg/min
- 0h 0m Rotation -0.22 deg/min
- 0h 1m Rotation -0.22 deg/min
- 0h 2m Rotation -0.22 deg/min
- 0h 3m Rotation -0.22 deg/min
- 0h 4m Rotation -0.22 deg/min
- 0h 5m Rotation -0.22 deg/min
- 0h 6m Rotation -0.22 deg/min
- 0h 7m Rotation -0.22 deg/min
- 0h 8m Rotation -0.22 deg/min
- 0h 9m Rotation -0.22 deg/min
- 0h 10m Rotation -0.22 deg/min
- 0h 11m Rotation -0.22 deg/min
- 0h 12m Rotation -0.22 deg/min
- 0h 13m Rotation -0.22 deg/min
- 0h 14m Rotation -0.22 deg/min
- 0h 15m Rotation -0.22 deg/min
- 0h 16m Rotation -0.22 deg/min
- 0h 17m Rotation -0.22 deg/min
- 0h 18m Rotation -0.22 deg/min
- 0h 19m Rotation -0.22 deg/min
- 0h 20m Rotation -0.22 deg/min
- 0h 21m Rotation -0.22 deg/min
- 0h 22m Rotation -0.22 deg/min
- 0h 23m Rotation -0.22 deg/min
- 0h 24m Rotation -0.22 deg/min
- 0h 25m Rotation -0.22 deg/min
- 0h 26m Rotation -0.22 deg/min
- 0h 27m Rotation -0.22 deg/min
- 0h 28m Rotation -0.22 deg/min
- 0h 29m Rotation -0.22 deg/min
- 0h 30m Rotation -0.22 deg/min
- 0h 31m Rotation -0.22 deg/min
- 0h 32m Rotation -0.22 deg/min
- 0h 33m Rotation -0.22 deg/min
- 0h 34m Rotation -0.22 deg/min
- 0h 35m Rotation -0.22 deg/min
- 0h 36m Rotation -0.22 deg/min
- 0h 37m Rotation -0.22 deg/min
- 0h 38m Rotation -0.22 deg/min
- 0h 39m Rotation -0.22 deg/min
- 0h 40m Rotation -0.22 deg/min
- 0h 41m Rotation -0.22 deg/min
- 0h 42m Rotation -0.22 deg/min
- 0h 43m Rotation -0.22 deg/min
- 0h 44m Rotation -0.22 deg/min
- 0h 45m Rotation -0.22 deg/min
- 0h 46m Rotation -0.22 deg/min
- 0h 47m Rotation -0.22 deg/min
- 0h 48m Rotation -0.22 deg/min
- 0h 49m Rotation -0.22 deg/min
- 0h 50m Rotation -0.22 deg/min
- 0h 51m Rotation -0.22 deg/min
- 0h 52m Rotation -0.22 deg/min
- 0h 53m Rotation -0.22 deg/min
- 0h 54m Rotation -0.22 deg/min
- 0h 55m Rotation -0.22 deg/min
- 0h 56m Rotation -0.22 deg/min
- 0h 57m Rotation -0.22 deg/min
- 0h 58m Rotation -0.22 deg/min
- 0h 59m Rotation -0.22 deg/min
- 1h 0m Rotation -0.22 deg/min
- 1h 1m Rotation -0.22 deg/min
- 1h 2m Rotation -0.22 deg/min
- 1h 3m Rotation -0.22 deg/min
- 1h 4m Rotation -0.22 deg/min
- 1h 5m Rotation -0.22 deg/min
- 1h 6m Rotation -0.22 deg/min
- 1h 7m Rotation -0.22 deg/min
- 1h 8m Rotation -0.22 deg/min
- 1h 9m Rotation -0.22 deg/min
- 1h 10m Rotation -0.22 deg/min
- 1h 11m Rotation -0.22 deg/min
- 1h 12m Rotation -0.22 deg/min
- 1h 13m Rotation -0.22 deg/min
- 1h 14m Rotation -0.22 deg/min
- 1h 15m Rotation -0.22 deg/min
- 1h 16m Rotation -0.22 deg/min
- 1h 17m Rotation -0.22 deg/min
- 1h 18m Rotation -0.22 deg/min
- 1h 19m Rotation -0.22 deg/min
- 1h 20m Rotation -0.22 deg/min
- 1h 21m Rotation -0.22 deg/min
- 1h 22m Rotation -0.22 deg/min
- 1h 23m Rotation -0.22 deg/min
- 1h 24m Rotation -0.22 deg/min
- 1h 25m Rotation -0.22 deg/min
- 1h 26m Rotation -0.22 deg/min
- 1h 27m Rotation -0.22 deg/min
- 1h 28m Rotation -0.22 deg/min
- 1h 29m Rotation -0.22 deg/min
- 1h 30m Rotation -0.22 deg/min
- 1h 31m Rotation -0.22 deg/min
- 1h 32m Rotation -0.22 deg/min
- 1h 33m Rotation -0.22 deg/min
- 1h 34m Rotation -0.22 deg/min
- 1h 35m Rotation -0.22 deg/min
- 1h 36m Rotation -0.22 deg/min
- 1h 37m Rotation -0.22 deg/min
- 1h 38m Rotation -0.22 deg/min
- 1h 39m Rotation -0.22 deg/min
- 1h 40m Rotation -0.22 deg/min
- 1h 41m Rotation -0.22 deg/min
- 1h 42m Rotation -0.22 deg/min
- 1h 43m Rotation -0.22 deg/min
- 1h 44m Rotation -0.22 deg/min
- 1h 45m Rotation -0.22 deg/min
- 1h 46m Rotation -0.22 deg/min
- 1h 47m Rotation -0.22 deg/min
- 1h 48m Rotation -0.22 deg/min
- 1h 49m Rotation -0.22 deg/min
- 1h 50m Rotation -0.22 deg/min
- 1h 51m Rotation -0.22 deg/min
- 1h 52m Rotation -0.22 deg/min
- 1h 53m Rotation -0.22 deg/min
- 1h 54m Rotation -0.22 deg/min
- 1h 55m Rotation -0.22 deg/min
- 1h 56m Rotation -0.22 deg/min
- 1h 57m Rotation -0.22 deg/min
- 1h 58m Rotation -0.22 deg/min
- 1h 59m Rotation -0.22 deg/min
- 2h 0m Rotation -0.22 deg/min
- 2h 1m Rotation -0.22 deg/min
- 2h 2m Rotation -0.22 deg/min
- 2h 3m Rotation -0.22 deg/min
- 2h 4m Rotation -0.22 deg/min
- 2h 5m Rotation -0.22 deg/min
- 2h 6m Rotation -0.22 deg/min
- 2h 7m Rotation -0.22 deg/min
- 2h 8m Rotation -0.22 deg/min
- 2h 9m Rotation -0.22 deg/min
- 2h 10m Rotation -0.22 deg/min
- 2h 11m Rotation -0.22 deg/min
- 2h 12m Rotation -0.22 deg/min
- 2h 13m Rotation -0.22 deg/min
- 2h 14m Rotation -0.22 deg/min
- 2h 15m Rotation -0.22 deg/min
- 2h 16m Rotation -0.22 deg/min
- 2h 17m Rotation -0.22 deg/min
- 2h 18m Rotation -0.22 deg/min
- 2h 19m Rotation -0.22 deg/min
- 2h 20m Rotation -0.22 deg/min
- 2h 21m Rotation -0.22 deg/min
- 2h 22m Rotation -0.22 deg/min
- 2h 23m Rotation -0.22 deg/min
- 2h 24m Rotation -0.22 deg/min
- 2h 25m Rotation -0.22 deg/min
- 2h 26m Rotation -0.22 deg/min
- 2h 27m Rotation -0.22 deg/min
- 2h 28m Rotation -0.22 deg/min
- 2h 29m Rotation -0.22 deg/min
- 2h 30m Rotation -0.22 deg/min
- 2h 31m Rotation -0.22 deg/min
- 2h 32m Rotation -0.23 deg/min
- 2h 33m Rotation -0.23 deg/min
- 2h 34m Rotation -0.23 deg/min
- 2h 35m Rotation -0.23 deg/min
- 2h 36m Rotation -0.23 deg/min
- 2h 37m Rotation -0.23 deg/min
- 2h 38m Rotation -0.23 deg/min
- 2h 39m Rotation -0.23 deg/min
- 2h 40m Rotation -0.23 deg/min
- 2h 41m Rotation -0.23 deg/min
- 2h 42m Rotation -0.23 deg/min
- 2h 43m Rotation -0.23 deg/min
- 2h 44m Rotation -0.23 deg/min
- 2h 45m Rotation -0.23 deg/min
- 2h 46m Rotation -0.23 deg/min
- 2h 47m Rotation -0.23 deg/min
- 2h 48m Rotation -0.23 deg/min
- 2h 49m Rotation -0.23 deg/min
- 2h 50m Rotation -0.23 deg/min
- 2h 51m Rotation -0.23 deg/min
- 2h 52m Rotation -0.23 deg/min
- 2h 53m Rotation -0.23 deg/min
- 2h 54m Rotation -0.23 deg/min
- 2h 55m Rotation -0.23 deg/min
- 2h 56m Rotation -0.23 deg/min
- 2h 57m Rotation -0.23 deg/min
- 2h 58m Rotation -0.23 deg/min
- 2h 59m Rotation -0.23 deg/min
- 3h 0m Rotation -0.23 deg/min
- 3h 1m Rotation -0.23 deg/min
- 3h 2m Rotation -0.23 deg/min
- 3h 3m Rotation -0.23 deg/min
- 3h 4m Rotation -0.23 deg/min
- 3h 5m Rotation -0.23 deg/min
- 3h 6m Rotation -0.23 deg/min
- 3h 7m Rotation -0.23 deg/min
- 3h 8m Rotation -0.23 deg/min
- 3h 9m Rotation -0.23 deg/min
- 3h 10m Rotation -0.23 deg/min
- 3h 11m Rotation -0.23 deg/min
- 3h 12m Rotation -0.23 deg/min
- 3h 13m Rotation -0.23 deg/min
- 3h 14m Rotation -0.23 deg/min
- 3h 15m Rotation -0.23 deg/min
- 3h 16m Rotation -0.23 deg/min
- 3h 17m Rotation -0.23 deg/min
- 3h 18m Rotation -0.23 deg/min
- 3h 19m Rotation -0.23 deg/min
- 3h 20m Rotation -0.23 deg/min
- 3h 21m Rotation -0.23 deg/min
- 3h 22m Rotation -0.23 deg/min
- 3h 23m Rotation -0.23 deg/min
- 3h 24m Rotation -0.23 deg/min
- 3h 25m Rotation -0.23 deg/min
- 3h 26m Rotation -0.23 deg/min
- 3h 27m Rotation -0.23 deg/min
- 3h 28m Rotation -0.23 deg/min
- 3h 29m Rotation -0.23 deg/min
- 3h 30m Rotation -0.23 deg/min
- 3h 31m Rotation -0.23 deg/min
- 3h 32m Rotation -0.23 deg/min
- 3h 33m Rotation -0.23 deg/min
- 3h 34m Rotation -0.23 deg/min
- 3h 35m Rotation -0.23 deg/min
- 3h 36m Rotation -0.23 deg/min
- 3h 37m Rotation -0.23 deg/min
- 3h 38m Rotation -0.23 deg/min
- 3h 39m Rotation -0.23 deg/min
- 3h 40m Rotation -0.23 deg/min
- 3h 41m Rotation -0.23 deg/min
- 3h 42m Rotation -0.23 deg/min
- 3h 43m Rotation -0.23 deg/min
- 3h 44m Rotation -0.23 deg/min
- 3h 45m Rotation -0.23 deg/min
- 3h 46m Rotation -0.23 deg/min
- 3h 47m Rotation -0.23 deg/min
- 3h 48m Rotation -0.23 deg/min
- 3h 49m Rotation -0.23 deg/min
- 3h 50m Rotation -0.23 deg/min
- 3h 51m Rotation -0.23 deg/min
- 3h 52m Rotation -0.23 deg/min
- 3h 53m Rotation -0.23 deg/min
- 3h 54m Rotation -0.23 deg/min
- 3h 55m Rotation -0.23 deg/min
- 3h 56m Rotation -0.23 deg/min
- 3h 57m Rotation -0.23 deg/min
- 3h 58m Rotation -0.23 deg/min
- 3h 59m Rotation -0.23 deg/min
- 4h 0m Rotation -0.23 deg/min
- 4h 1m Rotation -0.23 deg/min
- 4h 2m Rotation -0.23 deg/min
- 4h 3m Rotation -0.23 deg/min
- 4h 4m Rotation -0.23 deg/min
- 4h 5m Rotation -0.23 deg/min
- 4h 6m Rotation -0.23 deg/min
- 4h 7m Rotation -0.23 deg/min
- 4h 8m Rotation -0.23 deg/min
- 4h 9m Rotation -0.23 deg/min
- 4h 10m Rotation -0.23 deg/min
- 4h 11m Rotation -0.23 deg/min
- 4h 12m Rotation -0.23 deg/min
- 4h 13m Rotation -0.23 deg/min
- 4h 14m Rotation -0.23 deg/min
- 4h 15m Rotation -0.23 deg/min
- 4h 16m Rotation -0.23 deg/min
- 4h 17m Rotation -0.23 deg/min
- 4h 18m Rotation -0.23 deg/min
- 4h 19m Rotation -0.23 deg/min
- 4h 20m Rotation -0.23 deg/min
- 4h 21m Rotation -0.23 deg/min
- 4h 22m Rotation -0.23 deg/min
- 4h 23m Rotation -0.23 deg/min
- 4h 24m Rotation -0.23 deg/min
- 4h 25m Rotation -0.23 deg/min
- 4h 26m Rotation -0.23 deg/min
- 4h 27m Rotation -0.23 deg/min
- 4h 28m Rotation -0.23 deg/min
- 4h 29m Rotation -0.23 deg/min
- 4h 30m Rotation -0.23 deg/min
- 4h 31m Rotation -0.23 deg/min
- 4h 32m Rotation -0.23 deg/min
- 4h 33m Rotation -0.23 deg/min
- 4h 34m Rotation -0.23 deg/min
- 4h 35m Rotation -0.23 deg/min
- 4h 36m Rotation -0.23 deg/min
- 4h 37m Rotation -0.23 deg/min
- 4h 38m Rotation -0.23 deg/min
- 4h 39m Rotation -0.24 deg/min
- 4h 40m Rotation -0.24 deg/min
- 4h 41m Rotation -0.24 deg/min
- 4h 42m Rotation -0.24 deg/min
- 4h 43m Rotation -0.24 deg/min
- 4h 44m Rotation -0.24 deg/min
- 4h 45m Rotation -0.24 deg/min
- 4h 46m Rotation -0.24 deg/min
- 4h 47m Rotation -0.24 deg/min
- 4h 48m Rotation -0.24 deg/min
- 4h 49m Rotation -0.24 deg/min
- 4h 50m Rotation -0.24 deg/min
- 4h 51m Rotation -0.24 deg/min
- 4h 52m Rotation -0.24 deg/min
- 4h 53m Rotation -0.24 deg/min
- 4h 54m Rotation -0.24 deg/min
- 4h 55m Rotation -0.24 deg/min
- 4h 56m Rotation -0.24 deg/min
- 4h 57m Rotation -0.24 deg/min
- 4h 58m Rotation -0.24 deg/min
- 4h 59m Rotation -0.24 deg/min
- 5h 0m Rotation -0.24 deg/min
- 5h 1m Rotation -0.24 deg/min
- 5h 2m Rotation -0.24 deg/min
- 5h 3m Rotation -0.24 deg/min
- 5h 4m Rotation -0.24 deg/min
- 5h 5m Rotation -0.24 deg/min
- 5h 6m Rotation -0.24 deg/min
- 5h 7m Rotation -0.24 deg/min
- 5h 8m Rotation -0.24 deg/min
- 5h 9m Rotation -0.24 deg/min
- 5h 10m Rotation -0.24 deg/min
- 5h 11m Rotation -0.24 deg/min
- 5h 12m Rotation -0.24 deg/min
- 5h 13m Rotation -0.24 deg/min
- 5h 14m Rotation -0.24 deg/min
- 5h 15m Rotation -0.24 deg/min
- 5h 16m Rotation -0.24 deg/min
- 5h 17m Rotation -0.24 deg/min
- 5h 18m Rotation -0.24 deg/min
- 5h 19m Rotation -0.24 deg/min
- 5h 20m Rotation -0.24 deg/min
- 5h 21m Rotation -0.24 deg/min
- 5h 22m Rotation -0.24 deg/min
- 5h 23m Rotation -0.24 deg/min
- 5h 24m Rotation -0.24 deg/min
- 5h 25m Rotation -0.24 deg/min
- 5h 26m Rotation -0.24 deg/min
- 5h 27m Rotation -0.24 deg/min
- 5h 28m Rotation -0.24 deg/min
- 5h 29m Rotation -0.24 deg/min
- 5h 30m Rotation -0.24 deg/min
- 5h 31m Rotation -0.24 deg/min
- 5h 32m Rotation -0.24 deg/min
- 5h 33m Rotation -0.24 deg/min
- 5h 34m Rotation -0.24 deg/min
- 5h 35m Rotation -0.24 deg/min
- 5h 36m Rotation -0.24 deg/min
- 5h 37m Rotation -0.24 deg/min
- 5h 38m Rotation -0.24 deg/min
- 5h 39m Rotation -0.24 deg/min
- 5h 40m Rotation -0.24 deg/min
- 5h 41m Rotation -0.24 deg/min
- 5h 42m Rotation -0.24 deg/min
- 5h 43m Rotation -0.24 deg/min
- 5h 44m Rotation -0.25 deg/min
- 5h 45m Rotation -0.25 deg/min
- 5h 46m Rotation -0.25 deg/min
- 5h 47m Rotation -0.25 deg/min
- 5h 48m Rotation -0.25 deg/min
- 5h 49m Rotation -0.25 deg/min
- 5h 50m Rotation -0.25 deg/min
- 5h 51m Rotation -0.25 deg/min
- 5h 52m Rotation -0.25 deg/min
- 5h 53m Rotation -0.25 deg/min
- 5h 54m Rotation -0.25 deg/min
- 5h 55m Rotation -0.25 deg/min
- 5h 56m Rotation -0.25 deg/min
- 5h 57m Rotation -0.25 deg/min
- 5h 58m Rotation -0.25 deg/min
- 5h 59m Rotation -0.25 deg/min
- 6h 0m Rotation -0.25 deg/min
- 6h 1m Rotation -0.25 deg/min
- 6h 2m Rotation -0.25 deg/min
- 6h 3m Rotation -0.25 deg/min
- 6h 4m Rotation -0.25 deg/min
- 6h 5m Rotation -0.25 deg/min
- 6h 6m Rotation -0.25 deg/min
- 6h 7m Rotation -0.25 deg/min
- 6h 8m Rotation -0.25 deg/min
- 6h 9m Rotation -0.25 deg/min
- 6h 10m Rotation -0.25 deg/min
- 6h 11m Rotation -0.25 deg/min
- 6h 12m Rotation -0.25 deg/min
- 6h 13m Rotation -0.25 deg/min
- 6h 14m Rotation -0.25 deg/min
- 6h 15m Rotation -0.25 deg/min
- 6h 16m Rotation -0.25 deg/min
- 6h 17m Rotation -0.25 deg/min
- 6h 18m Rotation -0.25 deg/min
- 6h 19m Rotation -0.25 deg/min
- 6h 20m Rotation -0.25 deg/min
- 6h 21m Rotation -0.25 deg/min
- 6h 22m Rotation -0.25 deg/min
- 6h 23m Rotation -0.25 deg/min
- 6h 24m Rotation -0.25 deg/min
- 6h 25m Rotation -0.25 deg/min
- 6h 26m Rotation -0.25 deg/min
- 6h 27m Rotation -0.25 deg/min
- 6h 28m Rotation -0.25 deg/min
- 6h 29m Rotation -0.25 deg/min
- 6h 30m Rotation -0.25 deg/min
- 6h 31m Rotation -0.25 deg/min
- 6h 32m Rotation -0.25 deg/min
- 6h 33m Rotation -0.26 deg/min
- 6h 34m Rotation -0.26 deg/min
- 6h 35m Rotation -0.26 deg/min
- 6h 36m Rotation -0.26 deg/min
- 6h 37m Rotation -0.26 deg/min
- 6h 38m Rotation -0.26 deg/min
- 6h 39m Rotation -0.26 deg/min
- 6h 40m Rotation -0.26 deg/min
- 6h 41m Rotation -0.26 deg/min
- 6h 42m Rotation -0.26 deg/min
- 6h 43m Rotation -0.26 deg/min
-
-Cumulative field rotation: 359.76 deg
-
-Start alt. 42 Az. 194
-Ending alt. 38 Az. 196
diff --git a/bwbtest/B15B/saros.INP b/bwbtest/B15B/saros.INP
deleted file mode 100644
index 9c9ddc2..0000000
--- a/bwbtest/B15B/saros.INP
+++ /dev/null
@@ -1 +0,0 @@
-5678
diff --git a/bwbtest/B15B/saros.bas b/bwbtest/B15B/saros.bas
deleted file mode 100644
index 8171ead..0000000
--- a/bwbtest/B15B/saros.bas
+++ /dev/null
@@ -1,27 +0,0 @@
-10 REM SAROS SERIES
-14 REM
-18 PRINT
-22 INPUT "JULIAN DAY NUMBER";J
-26 Q=J/29.530588-82064
-30 B=INT(Q): N=Q-B
-34 IF N>0.28 AND N<0.36 THEN 42
-38 PRINT "WARNING: NOT NEW MOON!"
-42 PRINT " BROWN LUNATION ";B
-46 D=B-848
-50 S=136+38*D
-54 X=-61*D
-58 C=INT(X/358+0.5-D/(12*358*358))
-62 S=S+223*C
-66 X=X-358*C
-70 IF ABS(X-(S-136)/12)<55 THEN 78
-74 PRINT "WARNING: NO ECLIPSE!"
-78 PRINT " SAROS NUMBER ";S
-82 PRINT " RELATIVE ECLIPSE ";
-86 PRINT INT(X-(S-136)/12+0.5)
-90 PRINT
-94 END
-95 REM ------------------------
-96 REM APPEARED IN ASTRONOMICAL
-97 REM COMPUTING, SKY & TELE-
-98 REM SCOPE, OCTOBER, 1985
-99 REM ------------------------
diff --git a/bwbtest/B15B/saros.run b/bwbtest/B15B/saros.run
deleted file mode 100644
index def4f59..0000000
--- a/bwbtest/B15B/saros.run
+++ /dev/null
@@ -1,8 +0,0 @@
-
-JULIAN DAY NUMBER? 5678
-WARNING: NOT NEW MOON!
- BROWN LUNATION -81872
-WARNING: NO ECLIPSE!
- SAROS NUMBER -39
- RELATIVE ECLIPSE -75
-
diff --git a/bwbtest/B15B/satrings.INP b/bwbtest/B15B/satrings.INP
deleted file mode 100644
index 9b3c236..0000000
--- a/bwbtest/B15B/satrings.INP
+++ /dev/null
@@ -1 +0,0 @@
-2015
diff --git a/bwbtest/B15B/satrings.bas b/bwbtest/B15B/satrings.bas
deleted file mode 100644
index a10daca..0000000
--- a/bwbtest/B15B/satrings.bas
+++ /dev/null
@@ -1,136 +0,0 @@
-10 ' RINGS OF SATURN
-20 DEFDBL A-Z
-30 CLS ' : PI=4 *ATN(1 ):
-35 RD=PI/180 : DL=9
-40 INPUT "Year of interest"; Y
-50 A=INT((Y-1 )/100 ): B=2 -A+INT(A/4 )
-60 IF Y<1583 THEN B=0
-70 JD=INT(365.25*(Y+4715))+INT(30.6001*(14))
-80 JD=JD+B-1523.5
-90 JE=JD+365
-100 T=(JD-2451545 )/365250
-110 I=(28.04922 -.13 *T+.0004 *T*T)*RD
-120 OM=(169.53 +13.826 *T+.04 *T*T)*RD
-130 GOSUB 550: ' Get planet positions
-140 X=SR*COS(SB)*COS(SL)-ER*COS(EL)
-150 Y=SR*COS(SB)*SIN(SL)-ER*SIN(EL)
-160 Z=SR*SIN(SB)-ER*SIN(EB)
-170 DL=SQR(X*X+Y*Y+Z*Z)
-180 LA=ATN(Y/X): IF X<0 THEN LA=LA+PI
-190 BE=ATN(Z/SQR(X*X+Y*Y))
-200 S=SIN(I)*COS(BE)*SIN(LA-OM)-COS(I)*SIN(BE)
-210 B=ATN(S/SQR(1 -S*S))
-220 SP=SIN(I)*COS(SB)*SIN(SL-OM)-COS(I)*SIN(SB)
-230 BP=ATN(SP/SQR(1 -SP*SP))
-240 ' Check for crossing of ring plane
-250 IF B*XB>=0 THEN GOTO 280
-260 N$="(N to S)": IF B>0 THEN N$="(S to N)"
-270 PRINT "< Earth crosses ring plane "; N$; " >"
-280 IF BP*XP>=0 THEN GOTO 310
-290 N$="(N to S)": IF BP>0 THEN N$="(S to N)"
-300 PRINT "< Sun crosses ring plane "; N$; " >"
-310 Z=INT(JD+1): AL=INT((Z-1867216.25 )/36524.25 )
-320 AJ=Z+1 +AL-INT(AL/4 ): IF Z<2299161 THEN AJ=Z
-330 BJ=AJ+1524: CJ=INT((BJ-122.1)/365.25)
-340 DJ=INT(365.25 *CJ): EJ=INT((BJ-DJ)/30.6001)
-350 D=BJ-DJ-INT(30.6001*EJ)
-360 M=EJ-1: IF EJ>13.5 THEN M=M-12
-370 Y=CJ-4715: IF M>2 THEN Y=Y-1
-380 PRINT USING "## ## #####"; M; D; Y;
-390 PRINT USING " B =###.## deg"; B/RD;
-400 PRINT USING " B'=###.## deg"; BP/RD;
-440 '
-450 CI=(SR^2+DL^2-ER^2)/(2*SR*DL)
-460 ID=ATN(SQR(1-CI*CI)/CI)/RD
-470 MV=-8.88+5*LOG(SR*DL)/LOG(10)
-480 MV=MV+.044*ID-2.6*ABS(S)+1.25*S*S
-490 PRINT USING " Mv =##.#"; MV
-500 IF B*XB<0 THEN WHILE INKEY$="": WEND
-510 IF BP*XP<0 THEN WHILE INKEY$="": WEND
-520 JD=JD+1 : XB=B: XP=BP
-530 IF JD<=JE THEN GOTO 100
-540 END
-550 ' Calculate position of Earth
-560 L0=175347046
-570 L0=L0+3341656 *COS(4.66926+6283.07585 *T)
-580 L0=L0+34894 *COS(4.6261+12566.1517 *T)
-590 L1=628331966747
-600 L1=L1+206059 *COS(2.67824+6283.07585 *T)
-610 L2=52919
-620 EL=(L0+L1*T+L2*T*T)/(1E+08): EB=0
-630 R0=100013989
-640 R0=R0+1670700 *COS(3.09846+6283.07585 *T)
-650 R0=R0+13956 *COS(3.05525+12566.1517 *T)
-660 R1=103019 *COS(1.10749+6283.07585 *T)
-670 R2=4359 *COS(5.7846+6283.0758 *T)
-680 ER=(R0+R1*T+R2*T*T)/(1E+08)
-690 ' Calculate position of Saturn
-700 T=T-(.00578 *DL)/365250
-710 L0=87401354
-720 L0=L0+11107660 *COS(3.96205+213.2991 *T)
-730 L0=L0+1414151 *COS(4.58582+7.11355*T)
-740 L0=L0+398379 *COS(.52112+206.18555 *T)
-750 L0=L0+350769 *COS(3.3033+426.598191 *T)
-760 L0=L0+206816 *COS(.24658+103.09277 *T)
-770 L0=L0+79271 *COS(3.84007+220.41264 *T)
-780 L0=L0+23990*COS(4.66977+110.20632 *T)
-790 L0=L0+16574*COS(.43719+419.48464 *T)
-800 L0=L0+15820*COS(.93809+632.78374 *T)
-810 L0=L0+15054*COS(2.7167+639.89729 *T)
-820 L0=L0+14907*COS(5.76903+316.39187 *T)
-830 L0=L0+14610*COS(1.56519+3.93215*T)
-840 L0=L0+13160*COS(4.44891+14.22709*T)
-850 L0=L0+13005*COS(5.98119+11.0457*T)
-860 L0=L0+10725*COS(3.1294+202.2534*T)
-870 L1=21354295596
-880 L1=L1+1296855 *COS(1.82821+213.2991 *T)
-890 L1=L1+564348 *COS(2.885+7.11355*T)
-900 L1=L1+107679 *COS(2.2777+206.18555 *T)
-910 L1=L1+98323 *COS(1.0807+426.59819 *T)
-920 L1=L1+40255 *COS(2.04128+220.41264 *T)
-930 L2=116441 *COS(1.17988+7.11355*T)
-940 L2=L2+91921 *COS(.07425+213.2991*T)
-950 L2=L2+90592
-960 L2=L2+15277*COS(4.06492+206.18555 *T)
-970 L3=16039*COS(5.73945+7.11355*T)
-980 L4=1662*COS(3.9983+7.1135*T)
-990 SL=(L0+L1*T+L2*T*T+L3*T^3+L4*T^4)/(1E+08)
-1000 B0=4330678 *COS(3.60284+213.2991 *T)
-1010 B0=B0+240348 *COS(2.85238+426.59819 *T)
-1020 B0=B0+84746
-1030 B0=B0+34116 *COS(.57297+206.18555 *T)
-1040 B0=B0+30863*COS(3.48442+220.41264 *T)
-1050 B0=B0+14734*COS(2.11847+639.89729 *T)
-1060 B0=B0+9917*COS(5.79+419.4846*T)
-1070 B0=B0+6994*COS(4.736+7.1135*T)
-1080 B1=397555 *COS(5.3329+213.2991 *T)
-1090 B1=B1+49479 *COS(3.14159)
-1100 B1=B1+18572*COS(6.09919+426.59819 *T)
-1110 B1=B1+14801*COS(2.30586+206.18555 *T)
-1120 B1=B1+9644*COS(1.6967+220.4126*T)
-1130 B2=20630*COS(.50482+213.2991*T)
-1140 SB=(B0+B1*T+B2*T*T)/(1E+08)
-1150 R0=955758136
-1160 R0=R0+52921382 *COS(2.39226+213.2991 *T)
-1170 R0=R0+1873680 *COS(5.2355+206.18555 *T)
-1180 R0=R0+1464664 *COS(1.64763+426.59819 *T)
-1190 R0=R0+821891 *COS(5.9352+316.39187 *T)
-1200 R0=R0+547507 *COS(5.01533+103.09277 *T)
-1210 R0=R0+371684 *COS(2.27115+220.41264 *T)
-1220 R0=R0+361778 *COS(3.13904+7.11355*T)
-1230 R1=6182981 *COS(.25844+213.2991 *T)
-1240 R1=R1+506578 *COS(.71115+206.18555 *T)
-1250 R1=R1+341394 *COS(5.79636+426.59819 *T)
-1260 R2=436902 *COS(4.78672+213.2991 *T)
-1270 R3=20315*COS(3.02187+213.2991*T)
-1280 SR=(R0+R1*T+R2*T*T+R3*T^3)/(1E+08)
-1290 RETURN
-1300 '
-1310 ' This program by Donald W. Olson, Russell L. Doescher, and
-1320 ' Jonathan Gallmeier appeared in an article titled "The Rings
-1330 ' of Saturn" in Sky & Telescope for May 1995, pages 92-95.
-1340 ' It computes the tilt of the rings as seen from the Earth (B)
-1350 ' and the Sun (B'). The program pauses when ring-plane crossings
-1360 ' occur. It also computes the apparent visual magnitude of
-1370 ' Saturn (Mv), a quantity that depends strongly on the amount
-1380 ' of ring tilt on a given date. Valid for at least 2,000 years.
diff --git a/bwbtest/B15B/satrings.run b/bwbtest/B15B/satrings.run
deleted file mode 100644
index 21a9888..0000000
--- a/bwbtest/B15B/satrings.run
+++ /dev/null
@@ -1,367 +0,0 @@
-Year of interest? 2015
- 1 1 2015 B = 24.52 deg B'= 23.72 deg Mv = 0.6
- 1 2 2015 B = 24.53 deg B'= 23.73 deg Mv = 0.6
- 1 3 2015 B = 24.55 deg B'= 23.74 deg Mv = 0.6
- 1 4 2015 B = 24.56 deg B'= 23.74 deg Mv = 0.6
- 1 5 2015 B = 24.58 deg B'= 23.75 deg Mv = 0.6
- 1 6 2015 B = 24.59 deg B'= 23.76 deg Mv = 0.6
- 1 7 2015 B = 24.61 deg B'= 23.76 deg Mv = 0.6
- 1 8 2015 B = 24.62 deg B'= 23.77 deg Mv = 0.6
- 1 9 2015 B = 24.63 deg B'= 23.78 deg Mv = 0.6
- 1 10 2015 B = 24.65 deg B'= 23.78 deg Mv = 0.6
- 1 11 2015 B = 24.66 deg B'= 23.79 deg Mv = 0.6
- 1 12 2015 B = 24.67 deg B'= 23.80 deg Mv = 0.6
- 1 13 2015 B = 24.68 deg B'= 23.80 deg Mv = 0.6
- 1 14 2015 B = 24.70 deg B'= 23.81 deg Mv = 0.6
- 1 15 2015 B = 24.71 deg B'= 23.82 deg Mv = 0.6
- 1 16 2015 B = 24.72 deg B'= 23.82 deg Mv = 0.6
- 1 17 2015 B = 24.73 deg B'= 23.83 deg Mv = 0.6
- 1 18 2015 B = 24.74 deg B'= 23.84 deg Mv = 0.5
- 1 19 2015 B = 24.75 deg B'= 23.84 deg Mv = 0.5
- 1 20 2015 B = 24.76 deg B'= 23.85 deg Mv = 0.5
- 1 21 2015 B = 24.78 deg B'= 23.86 deg Mv = 0.5
- 1 22 2015 B = 24.79 deg B'= 23.86 deg Mv = 0.5
- 1 23 2015 B = 24.80 deg B'= 23.87 deg Mv = 0.5
- 1 24 2015 B = 24.80 deg B'= 23.88 deg Mv = 0.5
- 1 25 2015 B = 24.81 deg B'= 23.88 deg Mv = 0.5
- 1 26 2015 B = 24.82 deg B'= 23.89 deg Mv = 0.5
- 1 27 2015 B = 24.83 deg B'= 23.90 deg Mv = 0.5
- 1 28 2015 B = 24.84 deg B'= 23.90 deg Mv = 0.5
- 1 29 2015 B = 24.85 deg B'= 23.91 deg Mv = 0.5
- 1 30 2015 B = 24.86 deg B'= 23.92 deg Mv = 0.5
- 1 31 2015 B = 24.86 deg B'= 23.92 deg Mv = 0.5
- 2 1 2015 B = 24.87 deg B'= 23.93 deg Mv = 0.5
- 2 2 2015 B = 24.88 deg B'= 23.93 deg Mv = 0.5
- 2 3 2015 B = 24.89 deg B'= 23.94 deg Mv = 0.5
- 2 4 2015 B = 24.89 deg B'= 23.95 deg Mv = 0.5
- 2 5 2015 B = 24.90 deg B'= 23.95 deg Mv = 0.5
- 2 6 2015 B = 24.90 deg B'= 23.96 deg Mv = 0.5
- 2 7 2015 B = 24.91 deg B'= 23.97 deg Mv = 0.5
- 2 8 2015 B = 24.92 deg B'= 23.97 deg Mv = 0.5
- 2 9 2015 B = 24.92 deg B'= 23.98 deg Mv = 0.5
- 2 10 2015 B = 24.93 deg B'= 23.99 deg Mv = 0.5
- 2 11 2015 B = 24.93 deg B'= 23.99 deg Mv = 0.5
- 2 12 2015 B = 24.94 deg B'= 24.00 deg Mv = 0.5
- 2 13 2015 B = 24.94 deg B'= 24.01 deg Mv = 0.5
- 2 14 2015 B = 24.94 deg B'= 24.01 deg Mv = 0.5
- 2 15 2015 B = 24.95 deg B'= 24.02 deg Mv = 0.5
- 2 16 2015 B = 24.95 deg B'= 24.03 deg Mv = 0.5
- 2 17 2015 B = 24.96 deg B'= 24.03 deg Mv = 0.5
- 2 18 2015 B = 24.96 deg B'= 24.04 deg Mv = 0.5
- 2 19 2015 B = 24.96 deg B'= 24.04 deg Mv = 0.5
- 2 20 2015 B = 24.96 deg B'= 24.05 deg Mv = 0.5
- 2 21 2015 B = 24.97 deg B'= 24.06 deg Mv = 0.5
- 2 22 2015 B = 24.97 deg B'= 24.06 deg Mv = 0.5
- 2 23 2015 B = 24.97 deg B'= 24.07 deg Mv = 0.5
- 2 24 2015 B = 24.97 deg B'= 24.08 deg Mv = 0.5
- 2 25 2015 B = 24.97 deg B'= 24.08 deg Mv = 0.5
- 2 26 2015 B = 24.97 deg B'= 24.09 deg Mv = 0.5
- 2 27 2015 B = 24.98 deg B'= 24.10 deg Mv = 0.5
- 2 28 2015 B = 24.98 deg B'= 24.10 deg Mv = 0.5
- 3 1 2015 B = 24.98 deg B'= 24.11 deg Mv = 0.4
- 3 2 2015 B = 24.98 deg B'= 24.11 deg Mv = 0.4
- 3 3 2015 B = 24.98 deg B'= 24.12 deg Mv = 0.4
- 3 4 2015 B = 24.98 deg B'= 24.13 deg Mv = 0.4
- 3 5 2015 B = 24.98 deg B'= 24.13 deg Mv = 0.4
- 3 6 2015 B = 24.98 deg B'= 24.14 deg Mv = 0.4
- 3 7 2015 B = 24.97 deg B'= 24.15 deg Mv = 0.4
- 3 8 2015 B = 24.97 deg B'= 24.15 deg Mv = 0.4
- 3 9 2015 B = 24.97 deg B'= 24.16 deg Mv = 0.4
- 3 10 2015 B = 24.97 deg B'= 24.16 deg Mv = 0.4
- 3 11 2015 B = 24.97 deg B'= 24.17 deg Mv = 0.4
- 3 12 2015 B = 24.97 deg B'= 24.18 deg Mv = 0.4
- 3 13 2015 B = 24.96 deg B'= 24.18 deg Mv = 0.4
- 3 14 2015 B = 24.96 deg B'= 24.19 deg Mv = 0.4
- 3 15 2015 B = 24.96 deg B'= 24.20 deg Mv = 0.4
- 3 16 2015 B = 24.96 deg B'= 24.20 deg Mv = 0.4
- 3 17 2015 B = 24.95 deg B'= 24.21 deg Mv = 0.4
- 3 18 2015 B = 24.95 deg B'= 24.21 deg Mv = 0.4
- 3 19 2015 B = 24.95 deg B'= 24.22 deg Mv = 0.4
- 3 20 2015 B = 24.94 deg B'= 24.23 deg Mv = 0.4
- 3 21 2015 B = 24.94 deg B'= 24.23 deg Mv = 0.4
- 3 22 2015 B = 24.94 deg B'= 24.24 deg Mv = 0.4
- 3 23 2015 B = 24.93 deg B'= 24.25 deg Mv = 0.3
- 3 24 2015 B = 24.93 deg B'= 24.25 deg Mv = 0.3
- 3 25 2015 B = 24.92 deg B'= 24.26 deg Mv = 0.3
- 3 26 2015 B = 24.92 deg B'= 24.26 deg Mv = 0.3
- 3 27 2015 B = 24.91 deg B'= 24.27 deg Mv = 0.3
- 3 28 2015 B = 24.91 deg B'= 24.28 deg Mv = 0.3
- 3 29 2015 B = 24.90 deg B'= 24.28 deg Mv = 0.3
- 3 30 2015 B = 24.90 deg B'= 24.29 deg Mv = 0.3
- 3 31 2015 B = 24.89 deg B'= 24.29 deg Mv = 0.3
- 4 1 2015 B = 24.88 deg B'= 24.30 deg Mv = 0.3
- 4 2 2015 B = 24.88 deg B'= 24.31 deg Mv = 0.3
- 4 3 2015 B = 24.87 deg B'= 24.31 deg Mv = 0.3
- 4 4 2015 B = 24.86 deg B'= 24.32 deg Mv = 0.3
- 4 5 2015 B = 24.86 deg B'= 24.32 deg Mv = 0.3
- 4 6 2015 B = 24.85 deg B'= 24.33 deg Mv = 0.3
- 4 7 2015 B = 24.84 deg B'= 24.34 deg Mv = 0.3
- 4 8 2015 B = 24.84 deg B'= 24.34 deg Mv = 0.3
- 4 9 2015 B = 24.83 deg B'= 24.35 deg Mv = 0.3
- 4 10 2015 B = 24.82 deg B'= 24.35 deg Mv = 0.2
- 4 11 2015 B = 24.81 deg B'= 24.36 deg Mv = 0.2
- 4 12 2015 B = 24.81 deg B'= 24.37 deg Mv = 0.2
- 4 13 2015 B = 24.80 deg B'= 24.37 deg Mv = 0.2
- 4 14 2015 B = 24.79 deg B'= 24.38 deg Mv = 0.2
- 4 15 2015 B = 24.78 deg B'= 24.38 deg Mv = 0.2
- 4 16 2015 B = 24.77 deg B'= 24.39 deg Mv = 0.2
- 4 17 2015 B = 24.76 deg B'= 24.40 deg Mv = 0.2
- 4 18 2015 B = 24.76 deg B'= 24.40 deg Mv = 0.2
- 4 19 2015 B = 24.75 deg B'= 24.41 deg Mv = 0.2
- 4 20 2015 B = 24.74 deg B'= 24.41 deg Mv = 0.2
- 4 21 2015 B = 24.73 deg B'= 24.42 deg Mv = 0.2
- 4 22 2015 B = 24.72 deg B'= 24.43 deg Mv = 0.2
- 4 23 2015 B = 24.71 deg B'= 24.43 deg Mv = 0.2
- 4 24 2015 B = 24.70 deg B'= 24.44 deg Mv = 0.2
- 4 25 2015 B = 24.69 deg B'= 24.44 deg Mv = 0.2
- 4 26 2015 B = 24.68 deg B'= 24.45 deg Mv = 0.2
- 4 27 2015 B = 24.67 deg B'= 24.46 deg Mv = 0.2
- 4 28 2015 B = 24.66 deg B'= 24.46 deg Mv = 0.1
- 4 29 2015 B = 24.65 deg B'= 24.47 deg Mv = 0.1
- 4 30 2015 B = 24.64 deg B'= 24.47 deg Mv = 0.1
- 5 1 2015 B = 24.63 deg B'= 24.48 deg Mv = 0.1
- 5 2 2015 B = 24.62 deg B'= 24.49 deg Mv = 0.1
- 5 3 2015 B = 24.61 deg B'= 24.49 deg Mv = 0.1
- 5 4 2015 B = 24.60 deg B'= 24.50 deg Mv = 0.1
- 5 5 2015 B = 24.59 deg B'= 24.50 deg Mv = 0.1
- 5 6 2015 B = 24.58 deg B'= 24.51 deg Mv = 0.1
- 5 7 2015 B = 24.57 deg B'= 24.51 deg Mv = 0.1
- 5 8 2015 B = 24.56 deg B'= 24.52 deg Mv = 0.1
- 5 9 2015 B = 24.54 deg B'= 24.53 deg Mv = 0.1
- 5 10 2015 B = 24.53 deg B'= 24.53 deg Mv = 0.1
- 5 11 2015 B = 24.52 deg B'= 24.54 deg Mv = 0.1
- 5 12 2015 B = 24.51 deg B'= 24.54 deg Mv = 0.1
- 5 13 2015 B = 24.50 deg B'= 24.55 deg Mv = 0.1
- 5 14 2015 B = 24.49 deg B'= 24.56 deg Mv = 0.1
- 5 15 2015 B = 24.48 deg B'= 24.56 deg Mv = 0.1
- 5 16 2015 B = 24.47 deg B'= 24.57 deg Mv = 0.1
- 5 17 2015 B = 24.46 deg B'= 24.57 deg Mv = 0.0
- 5 18 2015 B = 24.45 deg B'= 24.58 deg Mv = 0.0
- 5 19 2015 B = 24.43 deg B'= 24.58 deg Mv = 0.0
- 5 20 2015 B = 24.42 deg B'= 24.59 deg Mv = 0.0
- 5 21 2015 B = 24.41 deg B'= 24.60 deg Mv = 0.0
- 5 22 2015 B = 24.40 deg B'= 24.60 deg Mv = 0.0
- 5 23 2015 B = 24.39 deg B'= 24.61 deg Mv = 0.0
- 5 24 2015 B = 24.38 deg B'= 24.61 deg Mv = 0.0
- 5 25 2015 B = 24.37 deg B'= 24.62 deg Mv = 0.0
- 5 26 2015 B = 24.36 deg B'= 24.62 deg Mv = 0.0
- 5 27 2015 B = 24.35 deg B'= 24.63 deg Mv = 0.0
- 5 28 2015 B = 24.33 deg B'= 24.64 deg Mv = 0.0
- 5 29 2015 B = 24.32 deg B'= 24.64 deg Mv = 0.1
- 5 30 2015 B = 24.31 deg B'= 24.65 deg Mv = 0.1
- 5 31 2015 B = 24.30 deg B'= 24.65 deg Mv = 0.1
- 6 1 2015 B = 24.29 deg B'= 24.66 deg Mv = 0.1
- 6 2 2015 B = 24.28 deg B'= 24.66 deg Mv = 0.1
- 6 3 2015 B = 24.27 deg B'= 24.67 deg Mv = 0.1
- 6 4 2015 B = 24.26 deg B'= 24.68 deg Mv = 0.1
- 6 5 2015 B = 24.25 deg B'= 24.68 deg Mv = 0.1
- 6 6 2015 B = 24.24 deg B'= 24.69 deg Mv = 0.1
- 6 7 2015 B = 24.23 deg B'= 24.69 deg Mv = 0.1
- 6 8 2015 B = 24.22 deg B'= 24.70 deg Mv = 0.1
- 6 9 2015 B = 24.21 deg B'= 24.70 deg Mv = 0.1
- 6 10 2015 B = 24.20 deg B'= 24.71 deg Mv = 0.1
- 6 11 2015 B = 24.19 deg B'= 24.71 deg Mv = 0.1
- 6 12 2015 B = 24.18 deg B'= 24.72 deg Mv = 0.1
- 6 13 2015 B = 24.17 deg B'= 24.73 deg Mv = 0.1
- 6 14 2015 B = 24.16 deg B'= 24.73 deg Mv = 0.1
- 6 15 2015 B = 24.15 deg B'= 24.74 deg Mv = 0.1
- 6 16 2015 B = 24.14 deg B'= 24.74 deg Mv = 0.2
- 6 17 2015 B = 24.14 deg B'= 24.75 deg Mv = 0.2
- 6 18 2015 B = 24.13 deg B'= 24.75 deg Mv = 0.2
- 6 19 2015 B = 24.12 deg B'= 24.76 deg Mv = 0.2
- 6 20 2015 B = 24.11 deg B'= 24.76 deg Mv = 0.2
- 6 21 2015 B = 24.10 deg B'= 24.77 deg Mv = 0.2
- 6 22 2015 B = 24.10 deg B'= 24.78 deg Mv = 0.2
- 6 23 2015 B = 24.09 deg B'= 24.78 deg Mv = 0.2
- 6 24 2015 B = 24.08 deg B'= 24.79 deg Mv = 0.2
- 6 25 2015 B = 24.07 deg B'= 24.79 deg Mv = 0.2
- 6 26 2015 B = 24.07 deg B'= 24.80 deg Mv = 0.2
- 6 27 2015 B = 24.06 deg B'= 24.80 deg Mv = 0.2
- 6 28 2015 B = 24.05 deg B'= 24.81 deg Mv = 0.2
- 6 29 2015 B = 24.05 deg B'= 24.81 deg Mv = 0.2
- 6 30 2015 B = 24.04 deg B'= 24.82 deg Mv = 0.2
- 7 1 2015 B = 24.04 deg B'= 24.82 deg Mv = 0.2
- 7 2 2015 B = 24.03 deg B'= 24.83 deg Mv = 0.3
- 7 3 2015 B = 24.03 deg B'= 24.84 deg Mv = 0.3
- 7 4 2015 B = 24.02 deg B'= 24.84 deg Mv = 0.3
- 7 5 2015 B = 24.02 deg B'= 24.85 deg Mv = 0.3
- 7 6 2015 B = 24.01 deg B'= 24.85 deg Mv = 0.3
- 7 7 2015 B = 24.01 deg B'= 24.86 deg Mv = 0.3
- 7 8 2015 B = 24.00 deg B'= 24.86 deg Mv = 0.3
- 7 9 2015 B = 24.00 deg B'= 24.87 deg Mv = 0.3
- 7 10 2015 B = 24.00 deg B'= 24.87 deg Mv = 0.3
- 7 11 2015 B = 24.00 deg B'= 24.88 deg Mv = 0.3
- 7 12 2015 B = 23.99 deg B'= 24.88 deg Mv = 0.3
- 7 13 2015 B = 23.99 deg B'= 24.89 deg Mv = 0.3
- 7 14 2015 B = 23.99 deg B'= 24.89 deg Mv = 0.3
- 7 15 2015 B = 23.99 deg B'= 24.90 deg Mv = 0.3
- 7 16 2015 B = 23.99 deg B'= 24.90 deg Mv = 0.3
- 7 17 2015 B = 23.98 deg B'= 24.91 deg Mv = 0.3
- 7 18 2015 B = 23.98 deg B'= 24.92 deg Mv = 0.3
- 7 19 2015 B = 23.98 deg B'= 24.92 deg Mv = 0.4
- 7 20 2015 B = 23.98 deg B'= 24.93 deg Mv = 0.4
- 7 21 2015 B = 23.98 deg B'= 24.93 deg Mv = 0.4
- 7 22 2015 B = 23.98 deg B'= 24.94 deg Mv = 0.4
- 7 23 2015 B = 23.98 deg B'= 24.94 deg Mv = 0.4
- 7 24 2015 B = 23.98 deg B'= 24.95 deg Mv = 0.4
- 7 25 2015 B = 23.99 deg B'= 24.95 deg Mv = 0.4
- 7 26 2015 B = 23.99 deg B'= 24.96 deg Mv = 0.4
- 7 27 2015 B = 23.99 deg B'= 24.96 deg Mv = 0.4
- 7 28 2015 B = 23.99 deg B'= 24.97 deg Mv = 0.4
- 7 29 2015 B = 23.99 deg B'= 24.97 deg Mv = 0.4
- 7 30 2015 B = 24.00 deg B'= 24.98 deg Mv = 0.4
- 7 31 2015 B = 24.00 deg B'= 24.98 deg Mv = 0.4
- 8 1 2015 B = 24.00 deg B'= 24.99 deg Mv = 0.4
- 8 2 2015 B = 24.01 deg B'= 24.99 deg Mv = 0.4
- 8 3 2015 B = 24.01 deg B'= 25.00 deg Mv = 0.4
- 8 4 2015 B = 24.02 deg B'= 25.00 deg Mv = 0.4
- 8 5 2015 B = 24.02 deg B'= 25.01 deg Mv = 0.4
- 8 6 2015 B = 24.03 deg B'= 25.01 deg Mv = 0.4
- 8 7 2015 B = 24.03 deg B'= 25.02 deg Mv = 0.4
- 8 8 2015 B = 24.04 deg B'= 25.02 deg Mv = 0.5
- 8 9 2015 B = 24.04 deg B'= 25.03 deg Mv = 0.5
- 8 10 2015 B = 24.05 deg B'= 25.04 deg Mv = 0.5
- 8 11 2015 B = 24.06 deg B'= 25.04 deg Mv = 0.5
- 8 12 2015 B = 24.06 deg B'= 25.05 deg Mv = 0.5
- 8 13 2015 B = 24.07 deg B'= 25.05 deg Mv = 0.5
- 8 14 2015 B = 24.08 deg B'= 25.06 deg Mv = 0.5
- 8 15 2015 B = 24.08 deg B'= 25.06 deg Mv = 0.5
- 8 16 2015 B = 24.09 deg B'= 25.07 deg Mv = 0.5
- 8 17 2015 B = 24.10 deg B'= 25.07 deg Mv = 0.5
- 8 18 2015 B = 24.11 deg B'= 25.08 deg Mv = 0.5
- 8 19 2015 B = 24.12 deg B'= 25.08 deg Mv = 0.5
- 8 20 2015 B = 24.13 deg B'= 25.09 deg Mv = 0.5
- 8 21 2015 B = 24.14 deg B'= 25.09 deg Mv = 0.5
- 8 22 2015 B = 24.15 deg B'= 25.10 deg Mv = 0.5
- 8 23 2015 B = 24.16 deg B'= 25.10 deg Mv = 0.5
- 8 24 2015 B = 24.17 deg B'= 25.11 deg Mv = 0.5
- 8 25 2015 B = 24.18 deg B'= 25.11 deg Mv = 0.5
- 8 26 2015 B = 24.19 deg B'= 25.12 deg Mv = 0.5
- 8 27 2015 B = 24.20 deg B'= 25.12 deg Mv = 0.5
- 8 28 2015 B = 24.21 deg B'= 25.13 deg Mv = 0.5
- 8 29 2015 B = 24.22 deg B'= 25.13 deg Mv = 0.5
- 8 30 2015 B = 24.23 deg B'= 25.14 deg Mv = 0.5
- 8 31 2015 B = 24.25 deg B'= 25.14 deg Mv = 0.5
- 9 1 2015 B = 24.26 deg B'= 25.15 deg Mv = 0.5
- 9 2 2015 B = 24.27 deg B'= 25.15 deg Mv = 0.5
- 9 3 2015 B = 24.28 deg B'= 25.16 deg Mv = 0.5
- 9 4 2015 B = 24.30 deg B'= 25.16 deg Mv = 0.5
- 9 5 2015 B = 24.31 deg B'= 25.17 deg Mv = 0.5
- 9 6 2015 B = 24.32 deg B'= 25.17 deg Mv = 0.5
- 9 7 2015 B = 24.34 deg B'= 25.18 deg Mv = 0.5
- 9 8 2015 B = 24.35 deg B'= 25.18 deg Mv = 0.6
- 9 9 2015 B = 24.36 deg B'= 25.19 deg Mv = 0.6
- 9 10 2015 B = 24.38 deg B'= 25.19 deg Mv = 0.6
- 9 11 2015 B = 24.39 deg B'= 25.20 deg Mv = 0.6
- 9 12 2015 B = 24.41 deg B'= 25.20 deg Mv = 0.6
- 9 13 2015 B = 24.42 deg B'= 25.21 deg Mv = 0.6
- 9 14 2015 B = 24.44 deg B'= 25.21 deg Mv = 0.6
- 9 15 2015 B = 24.45 deg B'= 25.21 deg Mv = 0.6
- 9 16 2015 B = 24.47 deg B'= 25.22 deg Mv = 0.6
- 9 17 2015 B = 24.48 deg B'= 25.22 deg Mv = 0.6
- 9 18 2015 B = 24.50 deg B'= 25.23 deg Mv = 0.6
- 9 19 2015 B = 24.51 deg B'= 25.23 deg Mv = 0.6
- 9 20 2015 B = 24.53 deg B'= 25.24 deg Mv = 0.6
- 9 21 2015 B = 24.55 deg B'= 25.24 deg Mv = 0.6
- 9 22 2015 B = 24.56 deg B'= 25.25 deg Mv = 0.6
- 9 23 2015 B = 24.58 deg B'= 25.25 deg Mv = 0.6
- 9 24 2015 B = 24.59 deg B'= 25.26 deg Mv = 0.6
- 9 25 2015 B = 24.61 deg B'= 25.26 deg Mv = 0.6
- 9 26 2015 B = 24.63 deg B'= 25.27 deg Mv = 0.6
- 9 27 2015 B = 24.64 deg B'= 25.27 deg Mv = 0.6
- 9 28 2015 B = 24.66 deg B'= 25.28 deg Mv = 0.6
- 9 29 2015 B = 24.68 deg B'= 25.28 deg Mv = 0.6
- 9 30 2015 B = 24.69 deg B'= 25.29 deg Mv = 0.6
-10 1 2015 B = 24.71 deg B'= 25.29 deg Mv = 0.6
-10 2 2015 B = 24.73 deg B'= 25.30 deg Mv = 0.6
-10 3 2015 B = 24.75 deg B'= 25.30 deg Mv = 0.6
-10 4 2015 B = 24.76 deg B'= 25.31 deg Mv = 0.6
-10 5 2015 B = 24.78 deg B'= 25.31 deg Mv = 0.6
-10 6 2015 B = 24.80 deg B'= 25.31 deg Mv = 0.6
-10 7 2015 B = 24.82 deg B'= 25.32 deg Mv = 0.6
-10 8 2015 B = 24.83 deg B'= 25.32 deg Mv = 0.6
-10 9 2015 B = 24.85 deg B'= 25.33 deg Mv = 0.6
-10 10 2015 B = 24.87 deg B'= 25.33 deg Mv = 0.6
-10 11 2015 B = 24.89 deg B'= 25.34 deg Mv = 0.6
-10 12 2015 B = 24.91 deg B'= 25.34 deg Mv = 0.6
-10 13 2015 B = 24.92 deg B'= 25.35 deg Mv = 0.6
-10 14 2015 B = 24.94 deg B'= 25.35 deg Mv = 0.6
-10 15 2015 B = 24.96 deg B'= 25.36 deg Mv = 0.6
-10 16 2015 B = 24.98 deg B'= 25.36 deg Mv = 0.6
-10 17 2015 B = 24.99 deg B'= 25.37 deg Mv = 0.6
-10 18 2015 B = 25.01 deg B'= 25.37 deg Mv = 0.6
-10 19 2015 B = 25.03 deg B'= 25.38 deg Mv = 0.6
-10 20 2015 B = 25.05 deg B'= 25.38 deg Mv = 0.6
-10 21 2015 B = 25.07 deg B'= 25.38 deg Mv = 0.6
-10 22 2015 B = 25.08 deg B'= 25.39 deg Mv = 0.6
-10 23 2015 B = 25.10 deg B'= 25.39 deg Mv = 0.6
-10 24 2015 B = 25.12 deg B'= 25.40 deg Mv = 0.6
-10 25 2015 B = 25.14 deg B'= 25.40 deg Mv = 0.5
-10 26 2015 B = 25.15 deg B'= 25.41 deg Mv = 0.5
-10 27 2015 B = 25.17 deg B'= 25.41 deg Mv = 0.5
-10 28 2015 B = 25.19 deg B'= 25.42 deg Mv = 0.5
-10 29 2015 B = 25.21 deg B'= 25.42 deg Mv = 0.5
-10 30 2015 B = 25.23 deg B'= 25.43 deg Mv = 0.5
-10 31 2015 B = 25.24 deg B'= 25.43 deg Mv = 0.5
-11 1 2015 B = 25.26 deg B'= 25.43 deg Mv = 0.5
-11 2 2015 B = 25.28 deg B'= 25.44 deg Mv = 0.5
-11 3 2015 B = 25.30 deg B'= 25.44 deg Mv = 0.5
-11 4 2015 B = 25.31 deg B'= 25.45 deg Mv = 0.5
-11 5 2015 B = 25.33 deg B'= 25.45 deg Mv = 0.5
-11 6 2015 B = 25.35 deg B'= 25.46 deg Mv = 0.5
-11 7 2015 B = 25.36 deg B'= 25.46 deg Mv = 0.5
-11 8 2015 B = 25.38 deg B'= 25.47 deg Mv = 0.5
-11 9 2015 B = 25.40 deg B'= 25.47 deg Mv = 0.5
-11 10 2015 B = 25.41 deg B'= 25.47 deg Mv = 0.5
-11 11 2015 B = 25.43 deg B'= 25.48 deg Mv = 0.5
-11 12 2015 B = 25.45 deg B'= 25.48 deg Mv = 0.5
-11 13 2015 B = 25.46 deg B'= 25.49 deg Mv = 0.5
-11 14 2015 B = 25.48 deg B'= 25.49 deg Mv = 0.5
-11 15 2015 B = 25.50 deg B'= 25.50 deg Mv = 0.5
-11 16 2015 B = 25.51 deg B'= 25.50 deg Mv = 0.5
-11 17 2015 B = 25.53 deg B'= 25.51 deg Mv = 0.5
-11 18 2015 B = 25.54 deg B'= 25.51 deg Mv = 0.5
-11 19 2015 B = 25.56 deg B'= 25.51 deg Mv = 0.5
-11 20 2015 B = 25.57 deg B'= 25.52 deg Mv = 0.5
-11 21 2015 B = 25.59 deg B'= 25.52 deg Mv = 0.5
-11 22 2015 B = 25.61 deg B'= 25.53 deg Mv = 0.5
-11 23 2015 B = 25.62 deg B'= 25.53 deg Mv = 0.5
-11 24 2015 B = 25.64 deg B'= 25.54 deg Mv = 0.5
-11 25 2015 B = 25.65 deg B'= 25.54 deg Mv = 0.5
-11 26 2015 B = 25.66 deg B'= 25.54 deg Mv = 0.5
-11 27 2015 B = 25.68 deg B'= 25.55 deg Mv = 0.4
-11 28 2015 B = 25.69 deg B'= 25.55 deg Mv = 0.4
-11 29 2015 B = 25.71 deg B'= 25.56 deg Mv = 0.4
-11 30 2015 B = 25.72 deg B'= 25.56 deg Mv = 0.4
-12 1 2015 B = 25.74 deg B'= 25.57 deg Mv = 0.4
-12 2 2015 B = 25.75 deg B'= 25.57 deg Mv = 0.4
-12 3 2015 B = 25.76 deg B'= 25.57 deg Mv = 0.4
-12 4 2015 B = 25.78 deg B'= 25.58 deg Mv = 0.4
-12 5 2015 B = 25.79 deg B'= 25.58 deg Mv = 0.5
-12 6 2015 B = 25.80 deg B'= 25.59 deg Mv = 0.5
-12 7 2015 B = 25.82 deg B'= 25.59 deg Mv = 0.5
-12 8 2015 B = 25.83 deg B'= 25.60 deg Mv = 0.5
-12 9 2015 B = 25.84 deg B'= 25.60 deg Mv = 0.5
-12 10 2015 B = 25.85 deg B'= 25.60 deg Mv = 0.5
-12 11 2015 B = 25.87 deg B'= 25.61 deg Mv = 0.5
-12 12 2015 B = 25.88 deg B'= 25.61 deg Mv = 0.5
-12 13 2015 B = 25.89 deg B'= 25.62 deg Mv = 0.5
-12 14 2015 B = 25.90 deg B'= 25.62 deg Mv = 0.5
-12 15 2015 B = 25.91 deg B'= 25.62 deg Mv = 0.5
-12 16 2015 B = 25.92 deg B'= 25.63 deg Mv = 0.5
-12 17 2015 B = 25.93 deg B'= 25.63 deg Mv = 0.5
-12 18 2015 B = 25.95 deg B'= 25.64 deg Mv = 0.5
-12 19 2015 B = 25.96 deg B'= 25.64 deg Mv = 0.5
-12 20 2015 B = 25.97 deg B'= 25.65 deg Mv = 0.5
-12 21 2015 B = 25.98 deg B'= 25.65 deg Mv = 0.5
-12 22 2015 B = 25.99 deg B'= 25.65 deg Mv = 0.5
-12 23 2015 B = 26.00 deg B'= 25.66 deg Mv = 0.5
-12 24 2015 B = 26.01 deg B'= 25.66 deg Mv = 0.5
-12 25 2015 B = 26.02 deg B'= 25.67 deg Mv = 0.5
-12 26 2015 B = 26.03 deg B'= 25.67 deg Mv = 0.5
-12 27 2015 B = 26.03 deg B'= 25.67 deg Mv = 0.5
-12 28 2015 B = 26.04 deg B'= 25.68 deg Mv = 0.5
-12 29 2015 B = 26.05 deg B'= 25.68 deg Mv = 0.5
-12 30 2015 B = 26.06 deg B'= 25.69 deg Mv = 0.5
-12 31 2015 B = 26.07 deg B'= 25.69 deg Mv = 0.5
- 1 1 2016 B = 26.08 deg B'= 25.69 deg Mv = 0.5
diff --git a/bwbtest/B15B/scales.INP b/bwbtest/B15B/scales.INP
deleted file mode 100644
index d2500e5..0000000
--- a/bwbtest/B15B/scales.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-250
-d
diff --git a/bwbtest/B15B/scales.bas b/bwbtest/B15B/scales.bas
deleted file mode 100644
index 47482e7..0000000
--- a/bwbtest/B15B/scales.bas
+++ /dev/null
@@ -1,78 +0,0 @@
-10 REM - THIS IS SCALES.BAS
-20 CLS : A = 340: BT = 254: C = BT: DIV = 1: G = A: H1 = 7650: TICK = 127
-30 M = 1016: PLU = 40: CI = 360
-40 INPUT "Please Enter SCALE LENGTH in mm - "; S: S1 = S
-50 IF S > 2000 THEN GOTO 400
-60 IF S1 > 250 THEN S1 = S1 - 250: DIV = DIV + 1: GOTO 60
-70 PRINT : PRINT "Do you want the scale in Degrees or Hours and Minutes?"
-80 INPUT " Please indicate 'd' for Degrees or 'h' for Hours... "; A$: PRINT
-90 IF A$ = "h" OR A$ = "H" THEN CI = 288: QQ = 1
-100 PRINT : PRINT : PRINT "Printing......."
-110 PRINT : PRINT "NOTE: This will take up to 90 seconds to print."
-120 S = S / DIV: SP = S * PLU: REM - Convert Scale Length to plotter units
-130 REM - Clear, set into HP-GL/2 mode, and initialize the printer
-140 LPRINT CHR$(27); "E": LPRINT CHR$(27); "%0B": LPRINT "IN;"
-150 DEGREES = (SP / CI) * DIV: REM - Calculate the # of deg (or hrs) to print per column
-160 LPRINT "SP1;": LPRINT "PW0;": REM - Select a pen and set the width
-170 REM - Using the Scale Length per column, insert tick marks for the whole column
-180 REM - there will be one Tick Mark for each degree
-190 FOR Z = 1 TO DIV
-200 A = A + Q
-210 FOR I = 0 TO SP STEP DEGREES
-220 LPRINT "PU;"
-230 LPRINT "PA"; A + TICK; ","; C + I; ";"
-240 LPRINT "PD;"
-250 LPRINT "PA"; A + BT; ","; C + I; ";"
-260 LPRINT "PU;"
-270 P = P + 1: R = R + 1: T = T + 1
-280 IF QQ = 1 THEN GOTO 330
-290 IF T = 360 THEN T = 0
-300 IF P = 5 THEN GOSUB 540
-310 IF R = 10 THEN GOSUB 620
-320 GOTO 360
-330 IF T = 288 THEN T = 0
-340 IF P = 4 THEN GOSUB 540
-350 IF R = 12 THEN GOSUB 620
-360 NEXT I
-370 A = 340: Q = Q + M
-380 NEXT Z
-390 GOTO 420
-400 PRINT : PRINT "Value is too high for this program,"
-410 PRINT " Please enter another SMALLER value": PRINT : GOTO 40:
-420 REM - Draw registration dots at bottom of the scales
-430 LPRINT "UL8,5,20,5,20,5,20,5,20;"
-440 LPRINT "LT8;"
-450 LPRINT "PU;"
-460 LPRINT "PA"; G; ","; C - DEGREES; ";"
-470 LPRINT "PD;"
-480 LPRINT "PA"; H1; ","; C - DEGREES; ";"
-490 LPRINT "PU;"
-500 REM - Reset the Printer
-510 LPRINT CHR$(27); "%0A": LPRINT CHR$(27); "E"
-520 END
-530 REM - "Make every fifth degree or 20th minute longer" SUB-ROUTINE
-540 LPRINT "PU;"
-550 LPRINT "PA"; A; ","; C + I; ";"
-560 LPRINT "PD;"
-570 LPRINT "PA"; A + BT; ","; C + I; ";"
-580 LPRINT "PU;"
-590 P = 0
-600 RETURN
-610 REM - "Number the scales with degrees or hours" SUB-ROUTINE
-620 LPRINT "SD1,21,2,1,4,10,7,4148;"
-630 IF DIV > 2 THEN LPRINT "DI0,-1;": LPRINT "LO16;": GOTO 650
-640 LPRINT "LO18;"
-650 LPRINT "DT*,1;"
-660 LPRINT "PU;"
-670 LPRINT "PA"; A; ","; C + I; ";"
-680 IF QQ = 1 THEN LPRINT "LB"; (T / 12); "*;": GOTO 710
-690 LPRINT "PD;"
-700 LPRINT "LB"; T; "*;"
-710 LPRINT "PU;"
-720 R = 0
-730 RETURN
-900 REM *********************************************
-910 REM THIS PROGRAM BY RONALD KOCELA PRODUCES LINEAR
-920 REM SETTING CIRCLE SCALES ON HP LASERJET PRINTERS
-930 REM FROM SKY & TELESCOPE, MARCH 1996, PAGE 84.
-940 REM *********************************************
diff --git a/bwbtest/B15B/scales.run b/bwbtest/B15B/scales.run
deleted file mode 100644
index 8e42fef..0000000
--- a/bwbtest/B15B/scales.run
+++ /dev/null
@@ -1,10 +0,0 @@
-Please Enter SCALE LENGTH in mm - ? 250
-
-Do you want the scale in Degrees or Hours and Minutes?
- Please indicate 'd' for Degrees or 'h' for Hours... ? d
-
-
-
-Printing.......
-
-NOTE: This will take up to 90 seconds to print.
diff --git a/bwbtest/B15B/shadow.INP b/bwbtest/B15B/shadow.INP
deleted file mode 100644
index a2209b6..0000000
--- a/bwbtest/B15B/shadow.INP
+++ /dev/null
@@ -1,6 +0,0 @@
-8765
-6
-2
-53
-34
-7
diff --git a/bwbtest/B15B/shadow.bas b/bwbtest/B15B/shadow.bas
deleted file mode 100644
index 1709d01..0000000
--- a/bwbtest/B15B/shadow.bas
+++ /dev/null
@@ -1,68 +0,0 @@
-10 REM MOUNTAIN SHADOWS
-11 REM
-12 DIM M(70): C=-0.4
-13 DR=2*3.14159265/360: FM=1/5280
-14 INPUT "MOUNTAIN HEIGHT (FT)";H1
-15 INPUT "OBSERVER HEIGHT (FT)";H0
-16 INPUT "HORIZON HEIGHT (FT) ";H
-17 H1=H1*FM: H0=H0*FM: H=H*FM
-18 INPUT "SLOPE ";S: S=S*DR
-19 INPUT "SUN ALT";A: A=A*DR
-20 INPUT "OBS'R AZ";Z: Z=Z*DR
-21 E=0.30: B=0.005: B9=0.9+B
-22 H9=60: V9=30: W=1*DR
-23 S9=2.5*LOG(B9)/LOG(10)
-24 S0=2.5*LOG(B)/LOG(10)
-25 REM OBSERVER'S LOCATION
-26 X0=COS(Z)*(H1-H0)/TAN(S)
-27 Y0=SIN(Z)*(H0-H1)/TAN(S)
-28 Z0=H0-H1
-29 REM SET UP GRID OF DIRECTIONS
-30 FOR J=1 TO V9
-31 AL=W*(V9/2-J)
-32 FOR I=1 TO H9
-33 AZ=W*(I-H9/2)
-34 REM DISTANCE TO 'NORTH' SLOPE
-35 REM SHADOW PLANE
-36 A0=SQR(TAN(S)^2-TAN(A)^2)
-37 A1=-1*TAN(AL)/COS(AZ)-TAN(A)
-38 A2=A0*TAN(AZ)
-39 A3=-X0*TAN(AL)/COS(AZ)-Z0
-40 A4=A0*(Y0+X0*TAN(AZ))
-41 XI=(A3+A4)/(A1+A2)
-42 F1=0: D=TAN(AZ)
-43 IF XI>=X0 THEN F1=1
-44 A5=1+D^2+(TAN(AL)/COS(AZ))^2
-45 D1=ABS(XI-X0)*SQR(A5)
-46 REM DIST TO 'SOUTH' SLOPE
-47 REM SHADOW PLANE
-48 XI=(A3-A4)/(A1-A2)
-49 F2=0
-50 IF XI>=X0 THEN F2=1
-51 D2=ABS(XI-X0)*SQR(A5)
-52 REM DISTANCE TO HORIZON PLANE
-53 F3=0: IF AL>=0 THEN F3=1
-54 D3=(H0-H)/SIN(ABS(AL)+0.001)
-55 REM INTEGRATE ALONG ILLUMINATED
-56 REM PORTION OF LINE OF SIGHT
-57 D0=100*E
-58 IF D1B9-B THEN B0=B9-B
-65 G=S9-S0
-66 SK=2.5*LOG(B0+B)/LOG(10)
-67 M(I)=INT(0.05+9.9*(SK-S0)/G)
-68 NEXT I
-69 FOR I9=1 TO H9
-70 PRINT RIGHT$(STR$(M(I9)),1);
-71 NEXT I9: PRINT
-72 NEXT J
-73 END
-74 REM **************************
-75 REM ASTRONOMICAL COMPUTING
-76 REM SKY & TELESCOPE, APRIL 88
-77 REM **************************
diff --git a/bwbtest/B15B/shadow.run b/bwbtest/B15B/shadow.run
deleted file mode 100644
index dbd6347..0000000
--- a/bwbtest/B15B/shadow.run
+++ /dev/null
@@ -1,36 +0,0 @@
-MOUNTAIN HEIGHT (FT)? 8765
-OBSERVER HEIGHT (FT)? 6
-HORIZON HEIGHT (FT) ? 2
-SLOPE ? 53
-SUN ALT? 34
-OBS'R AZ? 7
-999999999999999999999888888888888888888888888888999999999999
-999999999999999999998888888888888888888888888888899999999999
-999999999999999999988888888888888888888888888888889999999999
-999999999999999999888888888888888888888888888888888999999999
-999999999999999999888888888888888888888888888888888899999999
-999999999999999998888888888888888888888888888888888889999999
-999999999999999988888888888888888888888888888888888888999999
-999999999999999888888888888888888888888888888888888888899999
-999999999999998888888888888888888888888888888888888888889999
-999999999999988888888888888888888888888888888888888888888999
-999999999999888888888888888888888888888888888888888888888889
-999999999998888888888888888888888888888888888888888888888888
-999999999988888888888888888888888888888888888888888888888888
-999999999888888888888888888888888888888888888888888888888888
-999999988888888888888888888888888888888888888888888888888888
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000
diff --git a/bwbtest/B15B/shower.INP b/bwbtest/B15B/shower.INP
deleted file mode 100644
index 9b3c236..0000000
--- a/bwbtest/B15B/shower.INP
+++ /dev/null
@@ -1 +0,0 @@
-2015
diff --git a/bwbtest/B15B/shower.bas b/bwbtest/B15B/shower.bas
deleted file mode 100644
index 374e164..0000000
--- a/bwbtest/B15B/shower.bas
+++ /dev/null
@@ -1,67 +0,0 @@
- 10 REM METEOR SHOWERS
- 12 R1=3.1415927/180: DIM M$(12)
- 14 DIM N$(9),S0(9),S1(9),J5(9)
- 16 FOR I=1 TO 12: READ M$(I): NEXT
- 18 DATA JAN,FEB,MAR,APR,MAY,JUN
- 20 DATA JUL,AUG,SEP,OCT,NOV,DEC
- 22 FOR I=1 TO 9
- 24 READ N$(I),S0(I),S1(I),J5(I)
- 26 NEXT I
- 28 INPUT "YEAR";Y: T5=(Y-1950)/100
- 30 FOR I=1 TO 9
- 32 IF ABS(T5)<1.5 THEN 36
- 34 IF I=1 OR I=4 OR I=9 THEN 70
- 36 S=S0(I)+S1(I)*T5
- 38 S=S+1.39663*T5+.0003*T5*T5
- 40 S=S-360*INT(S/360)
- 42 J=J5(I)+36525.636*T5+S1(I)*T5
- 44 FOR K=1 TO 2
- 46 T=(J+2433000-2415020)/36525
- 48 L=279.7+36000.769*T+.0003*T*T
- 50 M=358.48+35999.05*T-.0002*T*T
- 52 S5=L+(1.92-.005*T)*SIN(M*R1)
- 54 S5=S5+.02*SIN(2*M*R1)
- 56 S5=S5-360*INT(S5/360)
- 58 J=J-(S5-S)/(.986+.033*COS(M*R1))
- 60 NEXT K
- 62 F=J-INT(J): J=INT(J)+2433000
- 64 GOSUB 96
- 66 PRINT N$(I);TAB(15);M$(M);
- 68 PRINT USING "###.#";D
- 70 NEXT I
- 72 END
- 74 REM SHOWER DATA
- 76 DATA "QU'DNTDS",282.9,-0.4,285.3
- 78 DATA "LYRIDS ",31.7,0.06,393.9
- 80 DATA "ETA AQR ",44.0,0.3,406.6
- 82 DATA "DLT AQR ",125.0,-1.0,491.2
- 84 DATA "PERSEIDS",139.2,0.03,506.0
- 86 DATA "ORIONIDS",207.7,0.4,576.2
- 88 DATA "TAURIDS ",220.0,0.44,588.5
- 90 DATA "LEONIDS ",234.3,1.5,602.7
- 92 DATA "GEMINIDS",261.4,0,629.5
- 94 REM
- 96 REM JD --> CALENDAR
- 98 G=1: IF J<2299161 THEN G=0
- 100 F=F+.5: IF F<1 THEN 104
- 102 F=F-1: J=J+1
- 104 IF G=1 THEN 108
- 106 A=J: GOTO 112
- 108 A1=INT((J/36524.25)-51.12264)
- 110 A=J+1+A1-INT(A1/4)
- 112 B=A+1524
- 114 C=INT((B/365.25)-.3343)
- 116 D=INT(365.25*C)
- 118 E=INT((B-D)/30.61)
- 120 D=B-D-INT(30.61*E)+F
- 122 M=E-1: Y=C-4716
- 124 IF E>13.5 THEN M=M-12
- 126 IF M<2.5 THEN Y=Y+1
- 128 RETURN
- 200 REM *******************************
- 210 REM FOR ANY GIVEN YEAR, THIS
- 220 REM PROGRAM LISTS THE MAJOR METEOR
- 230 REM SHOWERS AND THE UT DATES OF
- 240 REM MAXIMUM ACTIVITY. FROM SKY
- 250 REM & TELESCOPE, AUG '89, P. 195.
- 260 REM *******************************
diff --git a/bwbtest/B15B/shower.run b/bwbtest/B15B/shower.run
deleted file mode 100644
index cfe5270..0000000
--- a/bwbtest/B15B/shower.run
+++ /dev/null
@@ -1,10 +0,0 @@
-YEAR? 2015
-QU'DNTDS JAN 4.2
-LYRIDS APR 23.1
-ETA AQR MAY 5.9
-DLT AQR JUL 28.6
-PERSEIDS AUG 13.2
-ORIONIDS OCT 22.6
-TAURIDS NOV 3.9
-LEONIDS NOV 18.9
-GEMINIDS DEC 14.6
diff --git a/bwbtest/B15B/shuttr.INP b/bwbtest/B15B/shuttr.INP
deleted file mode 100644
index f2c4df9..0000000
--- a/bwbtest/B15B/shuttr.INP
+++ /dev/null
@@ -1,9 +0,0 @@
-A
-7.89
-1.23
-2.5
-600
-360
-1200
-
-E
diff --git a/bwbtest/B15B/shuttr.bas b/bwbtest/B15B/shuttr.bas
deleted file mode 100644
index 0193f05..0000000
--- a/bwbtest/B15B/shuttr.bas
+++ /dev/null
@@ -1,54 +0,0 @@
-100 REM SHUTTER SPEEDS
-110 REM
-120 PRINT "SELECT PHOTO METHOD--"
-130 PRINT " (A) PRIME FOCUS"
-140 PRINT " (B) BARLOW PROJ."
-150 PRINT " (C) EYEPIECE PROJ."
-160 PRINT " (D) AFOCAL METHOD"
-170 PRINT " (E) QUIT"
-180 INPUT A$: PRINT
-190 IF A$="A" THEN 250
-200 IF A$="B" THEN 250
-210 IF A$="C" THEN 330
-220 IF A$="D" THEN 410
-230 IF A$="E" THEN END
-240 GOTO 120
-250 REM CALCULATE F/NUMBER
-260 INPUT "OBJECTIVE F.L.";A
-270 INPUT "APERTURE";B
-280 C=A/B: IF A$="A" THEN K=C
-290 IF A$="A" THEN 470
-300 INPUT "BARLOW POWER";D
-310 K=C*D: GOTO 470
-320 REM
-330 REM EYEPIECE PROJECTION
-340 PRINT "SPACE FROM EYEPIECE"
-350 INPUT " TO FILM (INCHES)";A
-360 INPUT "EYEPIECE F.L. (IN.)";B
-370 INPUT "OBJECTIVE F.L.(IN.)";D
-380 INPUT "APERTURE (IN.)";F
-390 K=(A*D)/(B*F): GOTO 470
-400 REM
-410 REM AFOCAL METHOD
-420 INPUT "SCOPE POWER";A
-430 INPUT "APERTURE (IN.)";D
-440 INPUT "CAMERA F.L. (IN.)";B
-450 C=A*B: K=C/D
-460 REM
-470 REM CALC. SHUTTER SPEEDS
-480 PRINT
-490 INPUT "EXAMPLE F/NUMBER";L
-500 INPUT "EXAMPLE FILM INDEX";M
-510 INPUT "EXAMPLE TIME";O
-520 PRINT
-530 INPUT "YOUR FILM INDEX";N
-540 R=(K*K)/(L*L)
-550 V=R*O*M/N
-560 PRINT V;" IS YOUR TIME"
-570 PRINT: INPUT "NEXT";A$
-580 GOTO 120
-590 REM ------------------------
-600 REM APPEARED IN ASTRONOMICAL
-610 REM COMPUTING, SKY & TELE-
-620 REM SCOPE, JUNE, 1985
-630 REM ------------------------
diff --git a/bwbtest/B15B/shuttr.run b/bwbtest/B15B/shuttr.run
deleted file mode 100644
index 7166739..0000000
--- a/bwbtest/B15B/shuttr.run
+++ /dev/null
@@ -1,27 +0,0 @@
-SELECT PHOTO METHOD--
- (A) PRIME FOCUS
- (B) BARLOW PROJ.
- (C) EYEPIECE PROJ.
- (D) AFOCAL METHOD
- (E) QUIT
-? A
-
-OBJECTIVE F.L.? 7.89
-APERTURE? 1.23
-
-EXAMPLE F/NUMBER? 2.5
-EXAMPLE FILM INDEX? 600
-EXAMPLE TIME? 360
-
-YOUR FILM INDEX? 1200
- 1185.05 IS YOUR TIME
-
-NEXT?
-SELECT PHOTO METHOD--
- (A) PRIME FOCUS
- (B) BARLOW PROJ.
- (C) EYEPIECE PROJ.
- (D) AFOCAL METHOD
- (E) QUIT
-? E
-
diff --git a/bwbtest/B15B/solarecl.INP b/bwbtest/B15B/solarecl.INP
deleted file mode 100644
index 4414262..0000000
--- a/bwbtest/B15B/solarecl.INP
+++ /dev/null
@@ -1,7 +0,0 @@
-56
-43
-765
-6,25
-11,37
-21,45
-99,99
diff --git a/bwbtest/B15B/solarecl.bas b/bwbtest/B15B/solarecl.bas
deleted file mode 100644
index b0f2497..0000000
--- a/bwbtest/B15B/solarecl.bas
+++ /dev/null
@@ -1,109 +0,0 @@
-10 REM LOCAL CIRCUMSTANCES OF A
-20 REM SOLAR ECLIPSE
-30 REM
-40 DEFDBL A-Z
-50 GOSUB 760: PRINT D$: PRINT
-60 GOSUB 630
-70 INPUT "Universal time (h,m)";HH,MM
-80 IF HH=99 THEN 110
-90 UT=HH+MM/60: REM UT in hours
-100 GOSUB 140: GOTO 70
-110 END
-120 REM **** SUBROUTINES ****
-130 REM
-140 REM Compute details at time UT
-150 T=UT+DT/3600-T0: REM "Element time"
-160 X=FNX(T): REM x
-170 Y=FNY(T): REM y
-180 CD=FNC(T): REM cos(d)
-190 SD=FNS(T): REM sin(d)
-200 M=DR*FNM(T): REM mu
-210 REM
-220 REM Now find H.A. in radians
-230 H=M+LO-DT/13713
-240 REM
-250 REM Now find xi, eta, zeta
-260 X8=P9*SIN(H)
-270 Y8=P8*CD-P9*SD*COS(H)
-280 Z8=P8*SD+P9*CD*COS(H)
-290 U0=X-X8: REM u
-300 V0=Y-Y8: REM v
-310 L1=FNL1(T): REM l1
-320 L2=FNL2(T): REM l2
-330 W1=L1-Z8*F1: REM L1
-340 W2=L2-Z8*F2: REM L2
-350 REM
-360 REM Magnitude
-370 G1=SQR(U0*U0+V0*V0)
-380 G=(W1-G1)/(W1+W2)
-390 REM
-400 REM Position angle
-410 PA=RD*ATN(U0/V0)
-420 IF V0<0 THEN PA=PA+180
-430 IF PA<0 THEN PA=PA+360
-440 IF PA>360 THEN PA=PA-360
-450 REM
-460 REM Sun's altitude
-470 A8=SD*SIN(LA)
-480 A8=A8+CD*COS(LA)*COS(H)
-490 AL=RD*ATN(A8/SQR(1-A8*A8))
-500 REM
-505 REM
-510 REM Print out a line of data
-520 REM
-530 UT=T-DT/3600+T0: REM "Element time" back to UT
-540 UT=UT+.5/3600: REM Round to whole second
-550 HH=INT(UT): M3=60*(UT-HH): MM=INT(M3)
-560 SS=INT(60*(M3-MM))
-570 PA=INT(PA+.5): AR=INT(AL+.5): REM Whole degrees
-580 IF AL<0 THEN PRINT "Sun below horizon": GOTO 610
-590 IF G<0 THEN PRINT "No eclipse at this time": GOTO 610
-600 PRINT USING A2$;HH;MM;SS;PA;AR;G
-610 RETURN
-620 REM
-630 REM Geocentric Coordinates of Observer
-640 REM
-650 INPUT "North latitude (deg) ";LA
-660 INPUT "East longitude (deg) ";LO
-670 INPUT "Elevation (feet) ";EL
-680 LA=LA*DR: LO=LO*DR: REM Lat, long in radians
-690 EL=EL*12/39.37: REM Elevation in meters
-700 U=ATN(.99664719#*TAN(LA))
-710 P8=.99664719#*SIN(U)+EL*SIN(LA)/6378140#
-720 P9=COS(U)+EL*COS(LA)/6378140#
-730 REM P8 = rho sin(phi'); P9 = rho cos(phi')
-740 RETURN
-750 REM
-760 REM Constants
-770 ' PI=3.141592653589793#:
-775 DR=PI/180: RD=1/DR
-780 A2$=" UT ##:##:## PA ### Alt ### Mag #.###"
-790 REM
-800 REM
-810 REM Eclipse elements
-820 D$="Total Solar Eclipse of July 11, 1991"
-830 T0=16: REM Reference time (hr)
-840 DT=0: REM Delta-T (sec) in sense ET-UT
-850 DEF FNX(T)=-1.75954169#+T*(+.56710171#+T*(+4.902E-05-T*9.60E-06))
-860 DEF FNY(T)=+.42232901#+T*(-.13699808#+T*(-1.7527E-04+T*.0000025))
-870 DEF FNS(T)=+.37643393#+T*(-8.389E-05+T*(-.0000001))
-880 DEF FNC(T)=+.92644352#+T*(+3.404E-05+T*(+4E-08))
-890 DEF FNM(T)=58.6389581#+T*(15.0000486#+T*(+1.65E-06-T*2E-08))
-900 DEF FNL1(T)=.53024501#+T*(+1.0153E-04+T*(-1.278E-05))
-910 DEF FNL2(T)=-.01606+T*(.000101+T*(-1.272E-05))
-920 F1=.004599: REM tan(f1)
-930 F2=.004576: REM tan(f2)
-940 M1=.2618: REM mu' (radians/hr)
-950 D1=-.000091: REM d' (radians/hr)
-960 RETURN
-1000 REM For the partial and total phases of the July 11, 1991,
-1010 REM solar eclipse, when you enter a series of Universal times,
-1020 REM this program computes the position angle of the Moon's
-1030 REM center from the Sun, the Sun's altitude, and the "magnitude"
-1040 REM of the eclipse (that is, the fraction of the solar disk
-1050 REM diameter that is hidden). When entering your longitude and
-1060 REM longitude, use positive degrees for north latitude and
-1070 REM *negative* degrees for west longitude. The results of this
-1080 REM program agree exactly with those published by the U. S. Naval
-1090 REM Observatory in its eclipse circular. The program was written
-1100 REM by Roger W. Sinnott.
diff --git a/bwbtest/B15B/solarecl.run b/bwbtest/B15B/solarecl.run
deleted file mode 100644
index 781670f..0000000
--- a/bwbtest/B15B/solarecl.run
+++ /dev/null
@@ -1,12 +0,0 @@
-Total Solar Eclipse of July 11, 1991
-
-North latitude (deg) ? 56
-East longitude (deg) ? 43
-Elevation (feet) ? 765
-Universal time (h,m)? 6,25
-No eclipse at this time
-Universal time (h,m)? 11,37
-No eclipse at this time
-Universal time (h,m)? 21,45
-Sun below horizon
-Universal time (h,m)? 99,99
diff --git a/bwbtest/B15B/space.INP b/bwbtest/B15B/space.INP
deleted file mode 100644
index 2b72b90..0000000
--- a/bwbtest/B15B/space.INP
+++ /dev/null
@@ -1,9 +0,0 @@
-5,34
-7
-9,32
-8
-2345
-2.1
-8.9
-1
-N
diff --git a/bwbtest/B15B/space.bas b/bwbtest/B15B/space.bas
deleted file mode 100644
index 54f45f0..0000000
--- a/bwbtest/B15B/space.bas
+++ /dev/null
@@ -1,54 +0,0 @@
-10 REM SPACE MOTION OF A STAR
-12 REM
-14 P1=3.14159265
-16 INPUT "R.A. (H,M)";H,M
-18 A=(H+M/60)*15*P1/180
-20 INPUT "ANNUAL PM (SEC)";DA
-22 INPUT "DEC. (D,M)";D$,M
-24 D=ABS(VAL(D$)): S=1
-26 IF LEFT$(D$,1)="-" THEN S=-1
-28 D=S*(D+M/60)*P1/180
-30 INPUT "ANNUAL PM (ARCSEC)";DD
-32 DA=DA/13751: DD=DD/206265
-34 INPUT "R.V. (KM/SEC)";DR
-36 DR=DR/977820
-38 INPUT "DISTANCE (LY)";R
-40 R=R/3.2616: REM LY TO PARSECS
-42 INPUT "MAGNITUDE";M0
-44 X=R*COS(D)*COS(A)
-46 Y=R*COS(D)*SIN(A)
-48 Z=R*SIN(D)
-50 DX=(X/R)*DR-Z*COS(A)*DD-Y*DA
-52 DY=(Y/R)*DR-Z*SIN(A)*DD+X*DA
-54 DZ=(Z/R)*DR+R*COS(D)*DD
-56 REM
-58 PRINT: REM LOOP
-60 INPUT "YEARS FROM PRESENT";T
-62 X1=X+T*DX:Y1=Y+T*DY:Z1=Z+T*DZ
-64 R1=SQR(X1*X1+Y1*Y1+Z1*Z1)
-66 B=(R1/R)*(R1/R)
-68 M1=M0+2.5*LOG(B)/LOG(10)
-70 S5=Z1/R1: C5=SQR(1-S5*S5)
-72 D1=ATN(S5/C5)*180/P1
-74 A1=ATN(Y1/X1)*180/(P1*15)
-76 IF X1<0 THEN A1=A1+12
-78 IF A1>24 THEN A1=A1-24
-80 IF A1<0 THEN A1=A1+24
-82 PRINT "R.A. (HOURS) ";A1
-84 PRINT "DEC. (DEGREES)";D1
-86 PRINT "DISTANCE ";R1*3.2616
-88 PRINT "MAGNITUDE ";M1
-90 PRINT
-92 INPUT "AGAIN (Y OR N)";Q$
-94 IF Q$<>"N" THEN 58
-96 END
-100 REM ************************
-110 REM THIS PROGRAM USES A STAR'S
-120 REM CURRENT POSITION, PROPER
-130 REM MOTION, DISTANCE, AND BRIGHT-
-140 REM NESS TO COMPUTE ITS PATH
-150 REM ACROSS THE SKY IN THE REMOTE
-160 REM PAST OR FUTURE. DESCRIBED IN
-170 REM SKY & TELESCOPE MAGAZINE FOR
-180 REM MAY, 1989, PAGE 531.
-190 REM *************************
diff --git a/bwbtest/B15B/space.run b/bwbtest/B15B/space.run
deleted file mode 100644
index c67c023..0000000
--- a/bwbtest/B15B/space.run
+++ /dev/null
@@ -1,15 +0,0 @@
-R.A. (H,M)? 5,34
-ANNUAL PM (SEC)? 7
-DEC. (D,M)? 9,32
-ANNUAL PM (ARCSEC)? 8
-R.V. (KM/SEC)? 2345
-DISTANCE (LY)? 2.1
-MAGNITUDE? 8.9
-
-YEARS FROM PRESENT? 1
-R.A. (HOURS) 5.5686
-DEC. (DEGREES) 9.53555
-DISTANCE 2.10782
-MAGNITUDE 8.90807
-
-AGAIN (Y OR N)? N
diff --git a/bwbtest/B15B/sphe.INP b/bwbtest/B15B/sphe.INP
deleted file mode 100644
index 010880a..0000000
--- a/bwbtest/B15B/sphe.INP
+++ /dev/null
@@ -1,5 +0,0 @@
-2
-9876
-54
-1
-1234
diff --git a/bwbtest/B15B/sphe.bas b/bwbtest/B15B/sphe.bas
deleted file mode 100644
index 314f65a..0000000
--- a/bwbtest/B15B/sphe.bas
+++ /dev/null
@@ -1,47 +0,0 @@
-10 REM SPHEROMETER PROGRAM
-12 REM
-14 PRINT "WHICH DO YOU WANT --"
-16 PRINT " (1) SAGITTA"
-18 PRINT " (2) RADIUS OF CURV."
-20 PRINT " (3) SPHEROMETER SPAN"
-22 INPUT Q
-24 IF Q<1 OR Q>3 THEN 22
-26 IF Q=3 THEN 30
-28 INPUT "SPHEROMETER SPAN";C
-30 INPUT "BALL DIAMETER ";B
-32 PRINT "TYPE OF SURFACE --"
-34 PRINT " (1) CONCAVE"
-36 PRINT " (2) CONVEX"
-38 INPUT T
-40 IF T<>1 AND T<>2 THEN 38
-42 IF T=2 THEN T=-1
-44 IF Q=1 THEN 50
-46 INPUT "MEASURED SAGITTA";S
-48 IF Q=2 THEN 52
-50 INPUT "RADIUS OF CURVATURE";R
-52 IF Q=1 AND R>0 AND C>0 THEN 62
-54 IF Q=2 AND S>0 AND C>0 THEN 72
-56 IF Q=3 AND R>0 AND S>0 THEN 86
-58 PRINT "INPUT ERROR": GOTO 14
-60 REM
-62 REM COMPUTE THE SAGITTA
-64 R=R-T*B/2: S=R-SQR(R*R-C*C/4)
-66 PRINT "SAGITTA FOR SPHERE ";S
-68 GOTO 92
-70 REM
-72 REM COMPUTE THE R.O.C.
-74 R=(C*C/4+S*S)/(2*S)+T*B/2
-76 PRINT "RADIUS OF CURVATURE ";R
-78 IF T=-1 THEN 82
-80 PRINT "MIRROR F.L. ";R/2
-82 GOTO 92
-84 REM
-86 REM COMPUTE THE SPAN
-88 R=R-T*B/2: C=2*SQR(2*R*S+S*S)
-90 PRINT "SPHEROMETER SPAN ";C
-92 END
-100 REM ==============================
-110 REM FROM SKY & TELESCOPE'S ASTRO-
-120 REM COMPUTING DEPARTMENT FOR
-130 REM SEPTEMBER, 1986, PAGE 278
-140 REM =============================
diff --git a/bwbtest/B15B/sphe.run b/bwbtest/B15B/sphe.run
deleted file mode 100644
index 2fb1208..0000000
--- a/bwbtest/B15B/sphe.run
+++ /dev/null
@@ -1,14 +0,0 @@
-WHICH DO YOU WANT --
- (1) SAGITTA
- (2) RADIUS OF CURV.
- (3) SPHEROMETER SPAN
-? 2
-SPHEROMETER SPAN? 9876
-BALL DIAMETER ? 54
-TYPE OF SURFACE --
- (1) CONCAVE
- (2) CONVEX
-? 1
-MEASURED SAGITTA? 1234
-RADIUS OF CURVATURE 10524.
-MIRROR F.L. 5262.
diff --git a/bwbtest/B15B/stay.INP b/bwbtest/B15B/stay.INP
deleted file mode 100644
index e75a0ac..0000000
--- a/bwbtest/B15B/stay.INP
+++ /dev/null
@@ -1,2 +0,0 @@
-987
-0.123
diff --git a/bwbtest/B15B/stay.bas b/bwbtest/B15B/stay.bas
deleted file mode 100644
index 21b6567..0000000
--- a/bwbtest/B15B/stay.bas
+++ /dev/null
@@ -1,45 +0,0 @@
-10 REM LENGTH OF STAY
-12 REM INSIDE 1 A.U.
-14 REM
-16 K=0.01720209895
-18 P=3.1415926536
-20 INPUT "PERIHELION DIST. ";Q
-22 INPUT "ECCENTRICITY ";E
-24 PRINT
-26 T=0
-28 IF E>1 OR E<0 THEN 22
-30 IF Q>=1 THEN 78
-32 IF Q<0.0046524 THEN 82
-34 IF E<1 THEN 54
-36 REM
-38 REM PARABOLIC CASE
-40 REM
-42 T2=1/Q-1
-44 T1=SQR(T2)
-46 Q3=Q*Q*Q
-48 T=SQR(2*Q3)*(3*T1+T1*T2)/(3*K)
-50 GOTO 78
-52 REM
-54 REM ELLIPTICAL CASE
-56 REM
-58 IF E=0 THEN 86
-60 IF Q*(1+E)/(1-E)<=1 THEN 86
-62 A=Q/(1-E)
-64 C=(A-1)/(A*E)
-66 IF C<>0 THEN 70
-68 E1=P/2: GOTO 76
-70 S=SQR(1-C*C)
-72 E1=ATN(S/C)
-74 IF C<0 THEN E1=E1+P
-76 T=A*SQR(A)*(E1-E*SIN(E1))/K
-78 PRINT "DAYS: ";2*T
-80 GOTO 88
-82 PRINT "COLLISION WITH SUN"
-84 GOTO 88
-86 PRINT "ALWAYS INSIDE 1 A.U."
-88 END
-90 REM ------------------------
-92 REM APPEARED IN ASTRONOMICAL
-94 REM COMPUTING, SKY & TELE-
-96 REM SCOPE, JULY, 1984
-98 REM ------------------------
diff --git a/bwbtest/B15B/stay.run b/bwbtest/B15B/stay.run
deleted file mode 100644
index df261ba..0000000
--- a/bwbtest/B15B/stay.run
+++ /dev/null
@@ -1,4 +0,0 @@
-PERIHELION DIST. ? 987
-ECCENTRICITY ? 0.123
-
-DAYS: 0
diff --git a/bwbtest/B15B/steppr.INP b/bwbtest/B15B/steppr.INP
deleted file mode 100644
index c1efc75..0000000
--- a/bwbtest/B15B/steppr.INP
+++ /dev/null
@@ -1 +0,0 @@
-13,87
diff --git a/bwbtest/B15B/steppr.bas b/bwbtest/B15B/steppr.bas
deleted file mode 100644
index 1701979..0000000
--- a/bwbtest/B15B/steppr.bas
+++ /dev/null
@@ -1,21 +0,0 @@
-1 SUB POKE( X, Y )
-2 PRINT "Address=";X,"Byte=";Y
-3 END SUB
-4 ' ---------------------------
-10 REM STEPPER-MOTOR DEMO
-15 REM
-20 X=49152: REM PORT ADDRESS
-25 DATA 9,1,3,2,6,4,12,8
-30 DIM A(8)
-35 FOR I=0 TO 7: READ A(I): NEXT I
-40 INPUT "START, STOP ";C,D
-45 FOR J=C TO D STEP SGN(D-C)
-50 K=8*((J/8)-INT(J/8))
-55 POKE X,A(K)
-60 NEXT J
-65 END
-70 REM ------------------------
-80 REM APPEARED IN ASTRONOMICAL
-90 REM COMPUTING, SKY & TELE-
-95 REM SCOPE, APRIL, 1985
-99 REM ------------------------
diff --git a/bwbtest/B15B/steppr.run b/bwbtest/B15B/steppr.run
deleted file mode 100644
index f262bff..0000000
--- a/bwbtest/B15B/steppr.run
+++ /dev/null
@@ -1,76 +0,0 @@
-START, STOP ? 13,87
-Address= 49152 Byte= 4
-Address= 49152 Byte= 12
-Address= 49152 Byte= 8
-Address= 49152 Byte= 9
-Address= 49152 Byte= 1
-Address= 49152 Byte= 3
-Address= 49152 Byte= 2
-Address= 49152 Byte= 6
-Address= 49152 Byte= 4
-Address= 49152 Byte= 12
-Address= 49152 Byte= 8
-Address= 49152 Byte= 9
-Address= 49152 Byte= 1
-Address= 49152 Byte= 3
-Address= 49152 Byte= 2
-Address= 49152 Byte= 6
-Address= 49152 Byte= 4
-Address= 49152 Byte= 12
-Address= 49152 Byte= 8
-Address= 49152 Byte= 9
-Address= 49152 Byte= 1
-Address= 49152 Byte= 3
-Address= 49152 Byte= 2
-Address= 49152 Byte= 6
-Address= 49152 Byte= 4
-Address= 49152 Byte= 12
-Address= 49152 Byte= 8
-Address= 49152 Byte= 9
-Address= 49152 Byte= 1
-Address= 49152 Byte= 3
-Address= 49152 Byte= 2
-Address= 49152 Byte= 6
-Address= 49152 Byte= 4
-Address= 49152 Byte= 12
-Address= 49152 Byte= 8
-Address= 49152 Byte= 9
-Address= 49152 Byte= 1
-Address= 49152 Byte= 3
-Address= 49152 Byte= 2
-Address= 49152 Byte= 6
-Address= 49152 Byte= 4
-Address= 49152 Byte= 12
-Address= 49152 Byte= 8
-Address= 49152 Byte= 9
-Address= 49152 Byte= 1
-Address= 49152 Byte= 3
-Address= 49152 Byte= 2
-Address= 49152 Byte= 6
-Address= 49152 Byte= 4
-Address= 49152 Byte= 12
-Address= 49152 Byte= 8
-Address= 49152 Byte= 9
-Address= 49152 Byte= 1
-Address= 49152 Byte= 3
-Address= 49152 Byte= 2
-Address= 49152 Byte= 6
-Address= 49152 Byte= 4
-Address= 49152 Byte= 12
-Address= 49152 Byte= 8
-Address= 49152 Byte= 9
-Address= 49152 Byte= 1
-Address= 49152 Byte= 3
-Address= 49152 Byte= 2
-Address= 49152 Byte= 6
-Address= 49152 Byte= 4
-Address= 49152 Byte= 12
-Address= 49152 Byte= 8
-Address= 49152 Byte= 9
-Address= 49152 Byte= 1
-Address= 49152 Byte= 3
-Address= 49152 Byte= 2
-Address= 49152 Byte= 6
-Address= 49152 Byte= 4
-Address= 49152 Byte= 12
-Address= 49152 Byte= 8
diff --git a/bwbtest/B15B/stereo.INP b/bwbtest/B15B/stereo.INP
deleted file mode 100644
index 50e467b..0000000
--- a/bwbtest/B15B/stereo.INP
+++ /dev/null
@@ -1,6 +0,0 @@
-987
-123,87
-11,22,33
-ABC
-9,8,7
-6,5,4
diff --git a/bwbtest/B15B/stereo.bas b/bwbtest/B15B/stereo.bas
deleted file mode 100644
index 00b57d6..0000000
--- a/bwbtest/B15B/stereo.bas
+++ /dev/null
@@ -1,64 +0,0 @@
-1 REM STEREOGRAPHIC SKY PROJECTION
-2 P=3.14159265: R1=P/180
-3 INPUT "RADIUS ";K
-4 INPUT "LAT, LONG ";B,L
-5 REM W LONG NEG, E LONG POSITIVE
-6 B=B*R1: L=L*R1
-7 INPUT "LST (H,M,S) ";A$,A2,A3
-8 GOSUB 72: T=A*15*R1-L
-10 INPUT "OBJECT NAME ";B$
-12 INPUT "RA (H,M,S) ";A$,A2,A3
-14 GOSUB 72: R=A*15*R1
-16 INPUT "DEC (D,M,S) ";A$,A2,A3
-17 GOSUB 72: D=A*R1
-18 PRINT: PRINT B$
-19 GOSUB 32: GOSUB 100
-20 PRINT: PRINT "STARS"
-21 N=8: REM NUMBER OF STARS
-22 FOR I=1 TO N
-23 READ R,D
-24 R=R*15*R1: D=D*R1
-25 GOSUB 32: GOSUB 100
-26 NEXT I
-29 END
-30 REM ALTITUDE AND AZIMUTH
-32 T5=T-R+L: REM LOCAL HR ANGLE
-34 S1=SIN(B)*SIN(D)
-36 S1=S1+COS(B)*COS(D)*COS(T5)
-38 C1=1-S1*S1
-40 IF C1>0 THEN C1=SQR(C1)
-42 IF C1<=0 THEN 46
-44 H=ATN(S1/C1): GOTO 48
-46 H=SGN(S1)*P/2
-48 C2=COS(B)*SIN(D)
-50 C2=C2-SIN(B)*COS(D)*COS(T5)
-52 S2=-COS(D)*SIN(T5)
-54 IF C2=0 THEN A=SGN(S2)*P/2
-56 IF C2=0 THEN 62
-58 A=ATN(S2/C2)
-60 IF C2<0 THEN A=A+P
-62 IF A<0 THEN A=A+2*P
-70 RETURN
-72 REM SEXAGESIMAL TO DECIMAL
-76 S=1: A1=ABS(VAL(A$))
-78 IF LEFT$(A$,1)="-" THEN S=-1
-80 A=S*(A1+A2/60+A3/3600)
-82 RETURN
-100 REM STEREOGRAPHIC PROJECTION
-105 REM H=ALTITUDE, A=AZIMUTH
-110 Q=P/4-H/2
-115 X=K*SIN(Q)/COS(Q)*SIN(2*P-A)
-120 Y=K*SIN(Q)/COS(Q)*COS(2*P-A)
-125 PRINT " X= ";INT(X*1000)/1000;
-126 PRINT " Y= ";INT(Y*1000)/1000
-130 RETURN
-200 REM STAR DATA FOR TAURUS
-205 REM RA, DEC
-210 DATA 5.58, 21.0, 5.38, 28.5
-215 DATA 4.55, 16.3, 4.43, 15.9
-220 DATA 4.43, 19.0, 4.38, 18.0
-225 DATA 4.33, 17.5, 4.29, 15.5
-230 REM ************************
-235 REM FROM SKY & TELESCOPE,
-240 REM OCTOBER, 1987, P. 408
-245 REM ************************
diff --git a/bwbtest/B15B/stereo.run b/bwbtest/B15B/stereo.run
deleted file mode 100644
index 4bd9cf3..0000000
--- a/bwbtest/B15B/stereo.run
+++ /dev/null
@@ -1,19 +0,0 @@
-RADIUS ? 987
-LAT, LONG ? 123,87
-LST (H,M,S) ? 11,22,33
-OBJECT NAME ? ABC
-RA (H,M,S) ? 9,8,7
-DEC (D,M,S) ? 6,5,4
-
-ABC
- X= 851.67 Y= -1164.05
-
-STARS
- X= 722.582 Y= -183.707
- X= 619.717 Y= -183.827
- X= 686.644 Y= 14.517
- X= 677.605 Y= 35.232
- X= 646.6 Y= 12.018
- X= 651.241 Y= 26.432
- X= 650.745 Y= 37.205
- X= 665.733 Y= 58.377
diff --git a/bwbtest/B15B/sunshine.INP b/bwbtest/B15B/sunshine.INP
deleted file mode 100644
index 9738964..0000000
--- a/bwbtest/B15B/sunshine.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-38
-74
-91
diff --git a/bwbtest/B15B/sunshine.bas b/bwbtest/B15B/sunshine.bas
deleted file mode 100644
index 9d50945..0000000
--- a/bwbtest/B15B/sunshine.bas
+++ /dev/null
@@ -1,41 +0,0 @@
-10 REM SUNSHINE
-12 REM
-14 P=3.14159265: R=P/180
-16 INPUT "LATITUDE (DEGREES)";F
-18 F=F*R
-20 S=SIN(F): C=COS(F)
-22 INPUT "START DAY IN 1986 ";J1
-24 INPUT "END DAY IN 1986 ";J2
-26 IF J21 THEN 70
-56 Z=Z+1440: GOTO 70
-58 F=0.9043+0.03023*COS(M)
-60 F=F/(1-0.15825*SIN(L)*SIN(L))
-62 A=ATN(SQR(1-U*U)/U)
-64 A=A/R
-66 IF U<0 THEN A=A+180
-68 Z=Z+2880*A/(360.985647-F)
-70 NEXT D
-72 PRINT
-74 PRINT "SUNSHINE = "
-76 PRINT INT(Z+0.5);" MINUTES"
-78 PRINT INT((Z+30)/60);" HOURS"
-80 END
-85 REM ------------------------
-88 REM APPEARED IN ASTRONOMICAL
-89 REM COMPUTING, SKY & TELE-
-90 REM SCOPE, SEPTERMBER, 1984
-92 REM ------------------------
diff --git a/bwbtest/B15B/sunshine.run b/bwbtest/B15B/sunshine.run
deleted file mode 100644
index f7490b8..0000000
--- a/bwbtest/B15B/sunshine.run
+++ /dev/null
@@ -1,7 +0,0 @@
-LATITUDE (DEGREES)? 38
-START DAY IN 1986 ? 74
-END DAY IN 1986 ? 91
-
-SUNSHINE =
- 13246 MINUTES
- 221 HOURS
diff --git a/bwbtest/B15B/suntan.INP b/bwbtest/B15B/suntan.INP
deleted file mode 100644
index 1d2f7cc..0000000
--- a/bwbtest/B15B/suntan.INP
+++ /dev/null
@@ -1,6 +0,0 @@
-45
-6
-2
-5432
-2.2
-75
diff --git a/bwbtest/B15B/suntan.bas b/bwbtest/B15B/suntan.bas
deleted file mode 100644
index d4a6181..0000000
--- a/bwbtest/B15B/suntan.bas
+++ /dev/null
@@ -1,121 +0,0 @@
-10 ' Suntan Program
-20 '
-30 GOSUB 920: ' Initialize data arrays
-40 '
-50 INPUT "Latitude in degrees";L: LA=L/57.296
-60 INPUT "Month (1-12)";M
-70 INPUT "Hours from local noon";T: T=ABS(T)
-80 DS=.408*SIN(.523*(M-3.7)): ' Decl. of Sun (radians)
-90 HA=.262*T: ' Hour angle of Sun (radians)
-100 CZ=SIN(LA)*SIN(DS)+COS(LA)*COS(DS)*COS(HA)
-110 IF CZ<=0 THEN 70
-120 ZS=ATN(SQR(1-CZ*CZ)/CZ): ' Sun's zenith dist. (rad)
-130 '
-140 ' OPTION -- These two lines could replace 50-120:
-150 ' INPUT "Altitude of Sun (deg)";AL
-160 ' ZS=(90-AL)/57.296
-170 '
-180 INPUT "Height above sea level (feet)";HH: H=HH/3280
-190 INPUT "Aerosol extinction (V mag/airmass)";KK
-200 BE=KK/2.36
-210 INPUT "Surface albedo (%)";S1: SA=S1/100
-220 '
-230 ' Other adjustable parameters
-240 '
-250 ET=3600: ' Exposure time (seconds)
-260 ZP=ZS: ' Angle (rad), zenith to surface normal
-270 SS=0: ' Angle (rad), Sun to surface normal
-280 TW=1: ' UV frac. transmitted by window, lotion...
-290 F1=1: ' Fraction of sky that is clear
-300 F2=1: ' Fraction of ground in sunlight
-310 SH=1: ' Is Sun being shaded? (no=1, yes=0)
-320 N=1: ' Normalization for skin type
-330 RE=6378: ' Earth radius (km)
-340 OL=0: ' Ozone loss (%)
-350 HO=23: ' Height of ozone layer (km)
-360 HG=8.2: ' Gas scale height (km)
-370 HA=1.5: ' Aerosol scale height (km)
-380 DS=1: ' Distance from Sun (a.u.)
-390 '
-400 ' Thickness of ozone layer
-410 '
-420 RA=30*(M-3.7)/57.296
-430 DOSE=(1-OL/100)*(3+.4*(LA*COS(RA)-COS(3*LA)))
-440 '
-450 ' Airmass for each component
-460 '
-470 XO=(1-(SIN(ZS)/(1+((HO-H)/RE)))^2)^(-.5)
-480 XG=1/(COS(ZS)+.01*SQR(HG)*EXP(-30*COS(ZS)/SQR(HG)))
-490 XA=1/(COS(ZS)+.01*SQR(HA)*EXP(-30*COS(ZS)/SQR(HA)))
-500 '
-510 ' Do for each wavelength
-520 '
-530 PRINT "Wavelength Ozone Air Action Dose"
-540 PRINT "(angstroms) trans. trans. spectr. "
-550 ED=0
-560 FOR J=1 TO 20
-570 W=.275+J*.005: ' Wavelength (microns)
-580 '
-590 ' Brightness of sunlight, diffuse sky light,
-600 ' and ground light
-610 KO=OZ(J)*(DOSE/3)
-620 KG=.0107*EXP(-H/HG)*(W^(-4))
-630 KA=BE*(W^(-1.3))
-640 OT=10^(-.4*(KO*XO))
-650 TA=10^(-.4*(KG*XG+KA*XA))
-660 D=.5*(COS(ZS)^.33)
-670 IS=FS(J)*OT*TA*TW*SH*COS(SS)*(DS^(-2))
-680 ID=FS(J)*OT*(1-TA)*D
-690 ID=FS(J)*OT*(1-TA)*D*TA*SA+ID
-700 ID=FS(J)*OT*((1-TA)^2)*SA*(D^2)+ID
-710 ID=ID*TW*F1*(COS(ZS/2)^2)*(DS^(-2))
-720 IG=FS(J)*OT*SA*(TA+D*(1-TA))
-730 IG=IG*TW*F2*(SIN(ZS/2)^2)*(DS^(-2))
-740 I=IS+ID+IG: ' Total flux on skin (erg/cm^2/sec/A)
-750 '
-760 ' Find effective dose by numerical integration
-770 ' The "minimum erythema dose" at 2900A
-780 ' is 2.3E6 erg/cm^2 (Parrish)
-790 '
-800 EF=I*ET*(AX(J)*N)*50/2.3E6
-810 ED=ED+EF
-820 PRINT USING F1$;W*10000;OT;TA;AX(J);EF
-830 NEXT J
-840 '
-850 ' Report result
-860 '
-870 PRINT
-880 PRINT USING "Total effective dose: ##.###";ED
-890 PRINT USING " (exposure time ##.## hr)";ET/3600
-895 PRINT USING "Burning starts after ##.## hr";ET/(3600*ED)
-899 '
-900 END
-910 '
-920 ' Set up data arrays
-930 '
-940 F1$= " ##### ##.#### ##.#### ##.## ##.###"
-950 DIM OZ(20),FS(20),AX(20)
-960 FOR J=1 TO 20: READ OZ(J): NEXT J
-970 FOR J=1 TO 20: READ FS(J): NEXT J
-980 FOR J=1 TO 20: READ AX(J): NEXT J
-990 RETURN
-1000 '
-1010 ' OZ array (ozone effect)
-1020 DATA 34, 25, 18, 9, 3.2, 1.8, .9, .46, .24, .17
-1030 DATA .06, .05, .02, .01, .002, .001, 0, 0, 0, 0
-1040 '
-1050 ' FS array (solar flux at 1 A.U. in erg/cm^2/sec/A)
-1060 DATA 24, 31, 38, 45, 52, 58, 64, 70, 75, 79
-1070 DATA 83, 87, 91, 93, 95, 97, 99, 104, 107, 104
-1080 '
-1090 ' AX array (action spectrum, McKinley & Diffey)
-1100 DATA 1, 1, 1, 1, .65, .22, .074, .025, .0086, .003
-1110 DATA .0014, .0012, .00097, .00081, .00068, .00057
-1120 DATA .00048, .0004, .00034, .00029
-1200 '
-1210 ' Bradley E. Schaefer's program takes into account many factors,
-1220 ' including the ozone content of the atmosphere, and calculates
-1230 ' the risk of getting a sunburn at any month of the year, at any
-1240 ' hour of the day, and at any latitude on Earth. He explained how
-1250 ' to interpret the results in the July 1993 issue of Sky & Telescope,
-1260 ' page 83.
diff --git a/bwbtest/B15B/suntan.run b/bwbtest/B15B/suntan.run
deleted file mode 100644
index a894dcc..0000000
--- a/bwbtest/B15B/suntan.run
+++ /dev/null
@@ -1,32 +0,0 @@
-Latitude in degrees? 45
-Month (1-12)? 6
-Hours from local noon? 2
-Height above sea level (feet)? 5432
-Aerosol extinction (V mag/airmass)? 2.2
-Surface albedo (%)? 75
-Wavelength Ozone Air Action Dose
-(angstroms) trans. trans. spectr.
- 2800 0.0000 0.0009 1.00 0.000
- 2850 0.0000 0.0012 1.00 0.000
- 2900 0.0000 0.0015 1.00 0.000
- 2950 0.0000 0.0018 1.00 0.000
- 3000 0.0182 0.0022 0.65 0.030
- 3050 0.1050 0.0026 0.22 0.064
- 3100 0.3240 0.0031 0.07 0.074
- 3150 0.5621 0.0036 0.03 0.047
- 3200 0.7404 0.0042 0.01 0.023
- 3250 0.8082 0.0049 0.00 0.009
- 3300 0.9276 0.0056 0.00 0.005
- 3350 0.9393 0.0064 0.00 0.005
- 3400 0.9753 0.0073 0.00 0.004
- 3450 0.9876 0.0082 0.00 0.004
- 3500 0.9975 0.0092 0.00 0.003
- 3550 0.9987 0.0103 0.00 0.003
- 3600 1.0000 0.0114 0.00 0.002
- 3650 1.0000 0.0126 0.00 0.002
- 3700 1.0000 0.0139 0.00 0.002
- 3750 1.0000 0.0152 0.00 0.001
-
-Total effective dose: 0.278
- (exposure time 1.00 hr)
-Burning starts after 3.59 hr
diff --git a/bwbtest/B15B/sunup.INP b/bwbtest/B15B/sunup.INP
deleted file mode 100644
index 13a5e07..0000000
--- a/bwbtest/B15B/sunup.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-45,134
-6
-2015,03,01
diff --git a/bwbtest/B15B/sunup.bas b/bwbtest/B15B/sunup.bas
deleted file mode 100644
index 8a4cc87..0000000
--- a/bwbtest/B15B/sunup.bas
+++ /dev/null
@@ -1,140 +0,0 @@
-10 ' Sunrise-Sunset
-20 GOSUB 300
-30 INPUT "Lat, Long (deg)";B5,L5
-40 INPUT "Time zone (hrs)";H
-50 L5=L5/360: Z0=H/24
-60 GOSUB 1170: T=(J-2451545)+F
-70 TT=T/36525+1: ' TT = centuries
-80 ' from 1900.0
-90 GOSUB 410: T=T+Z0
-100 '
-110 ' Get Sun's Position
-120 GOSUB 910: A(1)=A5: D(1)=D5
-130 T=T+1
-140 GOSUB 910: A(2)=A5: D(2)=D5
-150 IF A(2)0 THEN 570
-560 V0=S*SIN(D0)+C*COS(D0)*COS(H0)-Z
-570 V2=S*SIN(D2)+C*COS(D2)*COS(H2)-Z
-580 IF SGN(V0)=SGN(V2) THEN 800
-590 V1=S*SIN(D1)+C*COS(D1)*COS(H1)-Z
-600 A=2*V2-4*V1+2*V0: B=4*V1-3*V0-V2
-610 D=B*B-4*A*V0: IF D<0 THEN 800
-620 D=SQR(D)
-630 IF V0<0 AND V2>0 THEN PRINT R$;
-640 IF V0<0 AND V2>0 THEN M8=1
-650 IF V0>0 AND V2<0 THEN PRINT S$;
-660 IF V0>0 AND V2<0 THEN W8=1
-670 E=(-B+D)/(2*A)
-680 IF E>1 OR E<0 THEN E=(-B-D)/(2*A)
-690 T3=C0+E+1/120: ' Round off
-700 H3=INT(T3): M3=INT((T3-H3)*60)
-710 PRINT USING "##:##";H3;M3;
-720 H7=H0+E*(H2-H0)
-730 N7=-COS(D1)*SIN(H7)
-740 D7=C*SIN(D1)-S*COS(D1)*COS(H7)
-750 AZ=ATN(N7/D7)/DR
-760 IF D7<0 THEN AZ=AZ+180
-770 IF AZ<0 THEN AZ=AZ+360
-780 IF AZ>360 THEN AZ=AZ-360
-790 PRINT USING ", azimuth ###.#";AZ
-800 RETURN
-810 '
-820 ' Special-message routine
-830 IF M8=0 AND W8=0 THEN 870
-840 IF M8=0 THEN PRINT M1$
-850 IF W8=0 THEN PRINT M2$
-860 GOTO 890
-870 IF V2<0 THEN PRINT M3$
-880 IF V2>0 THEN PRINT M4$
-890 RETURN
-900 '
-910 ' Fundamental arguments
-920 ' (Van Flandern &
-930 ' Pulkkinen, 1979)
-940 L=.779072+.00273790931*T
-950 G=.993126+.0027377785*T
-960 L=L-INT(L): G=G-INT(G)
-970 L=L*P2: G=G*P2
-980 V=.39785*SIN(L)
-990 V=V-.01000*SIN(L-G)
-1000 V=V+.00333*SIN(L+G)
-1010 V=V-.00021*TT*SIN(L)
-1020 U=1-.03349*COS(G)
-1030 U=U-.00014*COS(2*L)
-1040 U=U+.00008*COS(L)
-1050 W=-.00010-.04129*SIN(2*L)
-1060 W=W+.03211*SIN(G)
-1070 W=W+.00104*SIN(2*L-G)
-1080 W=W-.00035*SIN(2*L+G)
-1090 W=W-.00008*TT*SIN(G)
-1100 '
-1110 ' Compute Sun's RA and Dec
-1120 S=W/SQR(U-V*V)
-1130 A5=L+ATN(S/SQR(1-S*S))
-1140 S=V/SQR(U):D5=ATN(S/SQR(1-S*S))
-1150 R5=1.00021*SQR(U)
-1160 RETURN
-1165 '
-1170 ' Calendar --> JD
-1180 INPUT "Year, Month, Day";Y,M,D
-1190 G=1: IF Y<1583 THEN G=0
-1200 D1=INT(D): F=D-D1-.5
-1210 J=-INT(7*(INT((M+9)/12)+Y)/4)
-1220 IF G=0 THEN 1260
-1230 S=SGN(M-9): A=ABS(M-9)
-1240 J3=INT(Y+S*INT(A/7))
-1250 J3=-INT((INT(J3/100)+1)*3/4)
-1260 J=J+INT(275*M/9)+D1+G*J3
-1270 J=J+1721027+2*G+367*Y
-1280 IF F>=0 THEN 1300
-1290 F=F+1: J=J-1
-1300 RETURN
-1310 '
-1320 ' This program by Roger W. Sinnott calculates the times of sunrise
-1330 ' and sunset on any date, accurate to the minute within several
-1340 ' centuries of the present. It correctly describes what happens in the
-1350 ' arctic and antarctic regions, where the Sun may not rise or set on
-1360 ' a given date. Enter north latitudes positive, west longitudes
-1370 ' negative. For the time zone, enter the number of hours west of
-1380 ' Greenwich (e.g., 5 for EST, 4 for EDT). The calculation is
-1390 ' discussed in Sky & Telescope for August 1994, page 84.
diff --git a/bwbtest/B15B/sunup.run b/bwbtest/B15B/sunup.run
deleted file mode 100644
index bf84b40..0000000
--- a/bwbtest/B15B/sunup.run
+++ /dev/null
@@ -1,6 +0,0 @@
-Lat, Long (deg)? 45,134
-Time zone (hrs)? 6
-Year, Month, Day? 2015,03,01
-
-Sunset at 2:50, azimuth 260.0
-Sunrise at 15:42, azimuth 99.7
diff --git a/bwbtest/B15B/supernum.INP b/bwbtest/B15B/supernum.INP
deleted file mode 100644
index e69de29..0000000
diff --git a/bwbtest/B15B/supernum.bas b/bwbtest/B15B/supernum.bas
deleted file mode 100644
index 40a7967..0000000
--- a/bwbtest/B15B/supernum.bas
+++ /dev/null
@@ -1,72 +0,0 @@
-10 REM SUPERNUM.BAS
-20 REM by Rodney Kubesh
-30 OPEN "BOW.DAT" FOR OUTPUT AS #1
-40 CLS
-50 ' PI=3.14159
-60 A0=1.5707288# : A1=-.2121144
-70 A2=.074261 : A3=-.0187293
-80 N=1.3318 : REM Refractive index
-90 RA=250 : REM Drop radius in microns
-100 L=.6563 : REM Wavelength in microns
-110 FOR J=450 TO 550
-120 REM Choose angle of incidence for ray A
-130 I=J*.1*PI/180
-140 AN=SIN(I)/N
-150 REM Snell's Law gives angle of refraction
-160 R=PI/2-(1-AN)^.5*(A0+A1*AN+A2*AN^2+A3*AN^3)
-170 TH=4*R-2*I
-180 LOCATE 12,15
-190 PRINT "Computing intensity for emergence angle = ";
-200 PRINT USING "###.##"; TH*180/PI
-210 REM D and S are path lengths outside the drop for ray A
-220 D=1-COS(I)
-230 X0=-COS(4*R-I) : Y0=-SIN(4*R-I)
-240 X1=X0 : X2=X0-1 : X3=X0-2
-250 Y1=Y0-1/TAN(TH)
-260 Y2=Y0
-270 Y3=Y0-2*TAN(TH)
-280 S1=(Y2-Y1)/(X2-X1)
-290 S2=(Y3-Y0)/(X3-X0)
-300 I2=I
-310 X=(Y0-Y1+S1*X1-S2*X0)/(S1-S2)
-320 Y=(X-X1)*S1+Y1
-330 S=((Y-Y0)^2+(X-X0)^2)^.5
-340 REM Find total path length
-350 P1=RA*(D+S+4*N*COS(R))
-360 IN=59.5
-370 REM Choose possible angles of incidence for ray B
-380 IN=IN+.05
-390 I=IN*PI/180
-400 AN=SIN(I)/N
-410 R=PI/2-(1-AN)^.5*(A0+A1*AN+A2*AN^2+A3*AN^3)
-420 REM Find companion rays emerging in same direction
-430 TL=ABS(TH-4*R+2*I)
-440 IF TL>.001 GOTO 380
-450 TH=4*R-2*I
-460 REM Path lengths D and S for ray B
-470 D=1-COS(I)
-480 X0=-COS(4*R-I) : Y0=-SIN(4*R-I)
-490 X3=X0-2
-500 Y3=Y0-2*TAN(TH)
-510 S1=(Y2-Y1)/(X2-X1)
-520 S2=(Y3-Y0)/(X3-X0)
-530 X=(Y0-Y1+S1*X1-S2*X0)/(S1-S2)
-540 Y=(X-X1)*S1+Y1
-550 S=((Y-Y0)^2+(X-X0)^2)^.5
-560 REM Total path length for ray B
-570 P2=RA*(D+S+4*N*COS(R))
-580 REM Find difference in path length
-590 PD=P1-P2
-600 PH=2*PI*PD/L-PI/2
-610 REM Find amplitude
-620 AM=COS(PH/2)
-630 REM Print emergence angle and intensity
-640 PRINT#1, USING "###.###"; TH*180/PI; AM^2
-650 NEXT J
-660 CLOSE#1
-670 END
-900 REM ---------------------------
-910 REM APPEARED IN ASTRONOMICAL
-920 REM COMPUTING, SKY & TELESCOPE,
-930 REM SEPTEMBER 1998, PAGE 70
-940 REM ---------------------------
diff --git a/bwbtest/B15B/supernum.run b/bwbtest/B15B/supernum.run
deleted file mode 100644
index c412ff2..0000000
--- a/bwbtest/B15B/supernum.run
+++ /dev/null
@@ -1,101 +0,0 @@
-Computing intensity for emergence angle = 38.29
-Computing intensity for emergence angle = 38.34
-Computing intensity for emergence angle = 38.39
-Computing intensity for emergence angle = 38.44
-Computing intensity for emergence angle = 38.49
-Computing intensity for emergence angle = 38.53
-Computing intensity for emergence angle = 38.58
-Computing intensity for emergence angle = 38.63
-Computing intensity for emergence angle = 38.68
-Computing intensity for emergence angle = 38.73
-Computing intensity for emergence angle = 38.78
-Computing intensity for emergence angle = 38.83
-Computing intensity for emergence angle = 38.87
-Computing intensity for emergence angle = 38.92
-Computing intensity for emergence angle = 38.97
-Computing intensity for emergence angle = 39.01
-Computing intensity for emergence angle = 39.06
-Computing intensity for emergence angle = 39.11
-Computing intensity for emergence angle = 39.15
-Computing intensity for emergence angle = 39.20
-Computing intensity for emergence angle = 39.24
-Computing intensity for emergence angle = 39.29
-Computing intensity for emergence angle = 39.33
-Computing intensity for emergence angle = 39.38
-Computing intensity for emergence angle = 39.42
-Computing intensity for emergence angle = 39.46
-Computing intensity for emergence angle = 39.51
-Computing intensity for emergence angle = 39.55
-Computing intensity for emergence angle = 39.59
-Computing intensity for emergence angle = 39.64
-Computing intensity for emergence angle = 39.68
-Computing intensity for emergence angle = 39.72
-Computing intensity for emergence angle = 39.76
-Computing intensity for emergence angle = 39.80
-Computing intensity for emergence angle = 39.84
-Computing intensity for emergence angle = 39.89
-Computing intensity for emergence angle = 39.93
-Computing intensity for emergence angle = 39.97
-Computing intensity for emergence angle = 40.01
-Computing intensity for emergence angle = 40.05
-Computing intensity for emergence angle = 40.08
-Computing intensity for emergence angle = 40.12
-Computing intensity for emergence angle = 40.16
-Computing intensity for emergence angle = 40.20
-Computing intensity for emergence angle = 40.24
-Computing intensity for emergence angle = 40.28
-Computing intensity for emergence angle = 40.31
-Computing intensity for emergence angle = 40.35
-Computing intensity for emergence angle = 40.39
-Computing intensity for emergence angle = 40.42
-Computing intensity for emergence angle = 40.46
-Computing intensity for emergence angle = 40.50
-Computing intensity for emergence angle = 40.53
-Computing intensity for emergence angle = 40.57
-Computing intensity for emergence angle = 40.60
-Computing intensity for emergence angle = 40.64
-Computing intensity for emergence angle = 40.67
-Computing intensity for emergence angle = 40.70
-Computing intensity for emergence angle = 40.74
-Computing intensity for emergence angle = 40.77
-Computing intensity for emergence angle = 40.80
-Computing intensity for emergence angle = 40.84
-Computing intensity for emergence angle = 40.87
-Computing intensity for emergence angle = 40.90
-Computing intensity for emergence angle = 40.93
-Computing intensity for emergence angle = 40.96
-Computing intensity for emergence angle = 40.99
-Computing intensity for emergence angle = 41.02
-Computing intensity for emergence angle = 41.05
-Computing intensity for emergence angle = 41.08
-Computing intensity for emergence angle = 41.11
-Computing intensity for emergence angle = 41.14
-Computing intensity for emergence angle = 41.17
-Computing intensity for emergence angle = 41.20
-Computing intensity for emergence angle = 41.23
-Computing intensity for emergence angle = 41.26
-Computing intensity for emergence angle = 41.28
-Computing intensity for emergence angle = 41.31
-Computing intensity for emergence angle = 41.34
-Computing intensity for emergence angle = 41.36
-Computing intensity for emergence angle = 41.39
-Computing intensity for emergence angle = 41.41
-Computing intensity for emergence angle = 41.44
-Computing intensity for emergence angle = 41.46
-Computing intensity for emergence angle = 41.49
-Computing intensity for emergence angle = 41.51
-Computing intensity for emergence angle = 41.54
-Computing intensity for emergence angle = 41.56
-Computing intensity for emergence angle = 41.58
-Computing intensity for emergence angle = 41.61
-Computing intensity for emergence angle = 41.63
-Computing intensity for emergence angle = 41.65
-Computing intensity for emergence angle = 41.67
-Computing intensity for emergence angle = 41.69
-Computing intensity for emergence angle = 41.71
-Computing intensity for emergence angle = 41.74
-Computing intensity for emergence angle = 41.76
-Computing intensity for emergence angle = 41.78
-Computing intensity for emergence angle = 41.79
-Computing intensity for emergence angle = 41.81
-Computing intensity for emergence angle = 41.83
diff --git a/bwbtest/B15B/surf.INP b/bwbtest/B15B/surf.INP
deleted file mode 100644
index ba0aaab..0000000
--- a/bwbtest/B15B/surf.INP
+++ /dev/null
@@ -1,4 +0,0 @@
-8
-C
-46
-X
diff --git a/bwbtest/B15B/surf.bas b/bwbtest/B15B/surf.bas
deleted file mode 100644
index bf7678a..0000000
--- a/bwbtest/B15B/surf.bas
+++ /dev/null
@@ -1,46 +0,0 @@
-10 REM SURFACE BRIGHTNESS
-12 PRINT
-14 INPUT "TOTAL MAGNITUDE";M$
-16 IF M$="X" THEN 88
-18 M=VAL(M$): PRINT
-20 PRINT "TYPE OF AREA:"
-22 PRINT " (C) CIRCULAR"
-24 PRINT " (E) ELLIPTICAL"
-26 PRINT " (R) RECTANGULAR"
-28 PRINT " (I) IRREGULAR"
-30 INPUT "CHOICE";C$: PRINT
-32 IF C$="C" THEN 42
-34 IF C$="E" THEN 48
-36 IF C$="R" THEN 58
-38 IF C$="I" THEN 68
-40 GOTO 30
-42 REM CIRCULAR
-44 INPUT "DIAM IN ARC MIN";D
-46 A=3.14159265*D*D/4: GOTO 72
-48 REM ELLIPTICAL
-50 PRINT "ENTER ARC MIN --"
-52 INPUT " MAJOR AXIS";A1
-54 INPUT " MINOR AXIS";A2
-56 A=3.14159265*A1*A2/4: GOTO 72
-58 REM RECTANGULAR
-60 PRINT "ENTER ARC MIN --"
-62 INPUT " LONG SIDE";A1
-64 INPUT " SHORT SIDE";A2
-66 A=A1*A2: GOTO 72
-68 REM IRREGULAR
-70 INPUT "AREA IN SQ ARC MIN";A
-72 PRINT: IF A>=1/3600 THEN 76
-74 PRINT "STARLIKE": GOTO 86
-76 S1=M+LOG(A)/LOG(100^(1/5))
-78 S2=S1+8.890756
-80 PRINT "SURFACE MAGNITUDE --"
-82 PRINT " PER SQ ARC MIN: ";S1
-84 PRINT " PER SQ ARC SEC: ";S2
-86 GOTO 12
-88 END
-90 REM ==========================
-100 REM FROM SKY & TELESCOPE'S
-110 REM ASTRONOMICAL COMPUTING
-120 REM DEPARTMENT FOR OCTOBER,
-130 REM 1986, PAGE 392
-140 REM =========================
diff --git a/bwbtest/B15B/surf.run b/bwbtest/B15B/surf.run
deleted file mode 100644
index f01b5af..0000000
--- a/bwbtest/B15B/surf.run
+++ /dev/null
@@ -1,17 +0,0 @@
-
-TOTAL MAGNITUDE? 8
-
-TYPE OF AREA:
- (C) CIRCULAR
- (E) ELLIPTICAL
- (R) RECTANGULAR
- (I) IRREGULAR
-CHOICE? C
-
-DIAM IN ARC MIN? 46
-
-SURFACE MAGNITUDE --
- PER SQ ARC MIN: 16.0515
- PER SQ ARC SEC: 24.9423
-
-TOTAL MAGNITUDE? X
diff --git a/bwbtest/B15B/taki.INP b/bwbtest/B15B/taki.INP
deleted file mode 100644
index 27ebbc8..0000000
--- a/bwbtest/B15B/taki.INP
+++ /dev/null
@@ -1,17 +0,0 @@
-B GEM
-7
-120
-30
-A VIR
-8
-202
--11
-1
-100
-30
-9
-2
-100
-30
-9
--999
diff --git a/bwbtest/B15B/taki.bas b/bwbtest/B15B/taki.bas
deleted file mode 100644
index 3d154a8..0000000
--- a/bwbtest/B15B/taki.bas
+++ /dev/null
@@ -1,180 +0,0 @@
-100 REM PROGRAM FOR POINTING A TELESCOPE
-105 REM BY T. TAKI
-110 REM
-111 REM
-115 DIM S$(17),B(17),D(17),Q(3,3)
-120 DIM V(3,3),R(3,3),X(3,3),Y(3,3)
-125 REM
-130 REM STAR DATA
-135 FOR J=1 TO 17: READ S$(J),B(J),D(J): NEXT J
-140 REM
-145 REM CONSTANTS
-150 K=1.002738: G=57.2958
-155 Z1=0: Z2=0: Z3=0: REM MOUNT ERROR, IF ANY <<<<<<<<<
-160 REM
-165 FOR I=1 TO 2
-166 PRINT
-170 INPUT "NAME OF BASIC STAR ";S$(0)
-175 INPUT "TIME (MIN) ";T
-180 INPUT "TELESCOPE DIRECTION ";F
-185 INPUT "TELESCOPE ELEVATION ";H
-195 N=0
-200 N=N+1: IF S$(0)=S$(N) THEN 215
-205 IF N=17 THEN 170
-210 GOTO 200
-215 D(0)=D(N)/G: B(0)=(B(N)-K*T*0.25)/G
-220 X(1,I)=COS(D(0))*COS(B(0))
-225 X(2,I)=COS(D(0))*SIN(B(0))
-230 X(3,I)=SIN(D(0))
-235 F=F/G: H=(H+Z3)/G: GOSUB 750
-240 Y(1,I)=Y(1,0): Y(2,I)=Y(2,0): Y(3,I)=Y(3,0)
-245 NEXT I
-250 REM
-255 X(1,3)=X(2,1)*X(3,2)-X(3,1)*X(2,2)
-260 X(2,3)=X(3,1)*X(1,2)-X(1,1)*X(3,2)
-265 X(3,3)=X(1,1)*X(2,2)-X(2,1)*X(1,2)
-270 A=SQR(X(1,3)^2+X(2,3)^2+X(3,3)^2)
-275 FOR I=1 TO 3: X(I,3)=X(I,3)/A: NEXT I
-280 REM
-285 Y(1,3)=Y(2,1)*Y(3,2)-Y(3,1)*Y(2,2)
-290 Y(2,3)=Y(3,1)*Y(1,2)-Y(1,1)*Y(3,2)
-295 Y(3,3)=Y(1,1)*Y(2,2)-Y(2,1)*Y(1,2)
-300 A=SQR(Y(1,3)^2+Y(2,3)^2+Y(3,3)^2)
-305 FOR I=1 TO 3: Y(I,3)=Y(I,3)/A: NEXT I
-310 REM
-311 REM
-315 REM TRANSFORM MATRIX
-320 FOR I=1 TO 3: FOR J=1 TO 3
-325 V(I,J)=X(I,J)
-330 NEXT J: NEXT I
-335 GOSUB 650: E=W
-340 REM
-345 FOR M=1 TO 3: FOR I=1 TO 3: FOR J=1 TO 3
-350 V(I,J)=X(I,J)
-355 NEXT J: NEXT I
-360 FOR N=1 TO 3
-365 V(1,M)=0: V(2,M)=0: V(3,M)=0: V(N,M)=1
-370 GOSUB 650: Q(M,N)=W/E
-375 NEXT N
-380 NEXT M
-385 REM
-390 FOR I=1 TO 3: FOR J=1 TO 3: R(I,J)=0: NEXT J: NEXT I
-395 FOR I=1 TO 3: FOR J=1 TO 3: FOR L=1 TO 3
-400 R(I,J)=R(I,J)+Y(I,L)*Q(L,J)
-405 NEXT L: NEXT J: NEXT I
-410 REM
-415 FOR M=1 TO 3
-420 FOR I=1 TO 3: FOR J=1 TO 3
-425 V(I,J)=R(I,J)
-430 NEXT J: NEXT I
-435 GOSUB 650: E=W
-440 FOR N=1 TO 3
-445 V(1,M)=0: V(2,M)=0: V(3,M)=0: V(N,M)=1
-450 GOSUB 650: Q(M,N)=W/E
-455 NEXT N
-460 NEXT M
-461 REM
-462 REM
-465 REM TRANSFORMATION
-470 PRINT " ------"
-475 INPUT "OPTION 1 OR 2";E
-480 IF E=2 THEN 570
-481 IF E = -999 THEN 9999
-482 IF E<>1 THEN 475
-483 REM
-485 REM CONVERT EQUATORIAL --> TELESCOPE
-490 INPUT " RIGHT ASCENSION (DEG) ";B(0)
-495 INPUT " DECLINATION (DEG) ";D(0)
-500 INPUT " TIME (MIN) ";T
-505 D(0)=D(0)/G: B(0)=(B(0)-K*T*0.25)/G
-510 X(1,1)=COS(D(0))*COS(B(0))
-515 X(2,1)=COS(D(0))*SIN(B(0))
-520 X(3,1)=SIN(D(0))
-525 Y(1,1)=0: Y(2,1)=0: Y(3,1)=0
-530 FOR I=1 TO 3: FOR J=1 TO 3
-535 Y(I,1)=Y(I,1)+R(I,J)*X(J,1)
-540 NEXT J: NEXT I
-545 GOSUB 685: F=F/G: H=H/G: GOSUB 785
-550 GOSUB 685: H=H-Z3
-555 PRINT USING "TELESCOPE DIRECTION (DEG):####.##";F
-560 PRINT USING "TELESCOPE ELEVATION (DEG):####.##";H
-565 GOTO 465
-566 REM
-570 REM CONVERT TELESCOPE --> EQUATORIAL
-575 INPUT " TELESCOPE DIRECTION (DEG) ";F
-580 INPUT " TELESCOPE ELEVATION (DEG) ";H
-585 INPUT " TIME (MIN) ";T
-590 F=F/G: H=(H+Z3)/G: GOSUB 750
-595 X(1,1)=Y(1,0): X(2,1)=Y(2,0): X(3,1)=Y(3,0)
-600 Y(1,1)=0: Y(2,1)=0: Y(3,1)=0
-605 FOR I=1 TO 3: FOR J=1 TO 3
-610 Y(I,1)=Y(I,1)+Q(I,J)*X(J,1)
-615 NEXT J: NEXT I
-620 GOSUB 685: F=F+K*T*0.25: F=F-INT(F/360)*360
-625 PRINT USING "RIGHT ASCENSION (DEG):####.##";F
-630 PRINT USING "DECLINATION (DEG): ####.##";H
-635 GOTO 465
-640 END
-645 REM
-650 REM DETERMINANT SUBROUTINE
-655 W=V(1,1)*V(2,2)*V(3,3)+V(1,2)*V(2,3)*V(3,1)
-660 W=W+V(1,3)*V(3,2)*V(2,1)
-665 W=W-V(1,3)*V(2,2)*V(3,1)-V(1,1)*V(3,2)*V(2,3)
-670 W=W-V(1,2)*V(2,1)*V(3,3)
-675 RETURN
-680 REM
-685 REM ANGLE SUBROUTINE
-690 C=SQR(Y(1,1)*Y(1,1)+Y(2,1)*Y(2,1))
-695 IF C=0 AND Y(3,1)>0 THEN H=90
-700 IF C=0 AND Y(3,1)<0 THEN H=-90
-705 IF C<>0 THEN H=ATN(Y(3,1)/C)*G
-710 REM
-715 IF C=0 THEN F=1000
-720 IF C<>0 AND Y(1,1)=0 AND Y(2,1)>0 THEN F=90
-725 IF C<>0 AND Y(1,1)=0 AND Y(2,1)<0 THEN F=270
-730 IF Y(1,1)>0 THEN F=ATN(Y(2,1)/Y(1,1))*G
-735 IF Y(1,1)<0 THEN F=ATN(Y(2,1)/Y(1,1))*G+180
-740 F=F-INT(F/360)*360
-745 RETURN
-746 REM
-750 REM SUBROUTINE
-755 Y(1,0)=COS(F)*COS(H)-SIN(F)*(Z2/G)
-760 Y(1,0)=Y(1,0)+SIN(F)*SIN(H)*(Z1/G)
-765 Y(2,0)=SIN(F)*COS(H)+COS(F)*(Z2/G)
-770 Y(2,0)=Y(2,0)-COS(F)*SIN(H)*(Z1/G)
-775 Y(3,0)=SIN(H)
-780 RETURN
-781 REM
-785 REM SUBROUTINE
-790 Y(1,1)=COS(F)*COS(H)+SIN(F)*(Z2/G)
-795 Y(1,1)=Y(1,1)-SIN(F)*SIN(H)*(Z1/G)
-800 Y(2,1)=SIN(F)*COS(H)-COS(F)*(Z2/G)
-805 Y(2,1)=Y(2,1)+COS(F)*SIN(H)*(Z1/G)
-810 Y(3,1)=SIN(H)
-815 RETURN
-816 REM
-817 REM STAR LIST
-820 DATA "A UMI", 37.960, 89.264
-825 DATA "A TAU", 68.980, 16.509
-830 DATA "B ORI", 78.634, -8.202
-835 DATA "A AUR", 79.172, 45.998
-840 DATA "A ORI", 88.793, 7.407
-845 DATA "A CMA", 101.287, -16.716
-850 DATA "A GEM", 113.650, 31.888
-855 DATA "A CMI", 114.825, 5.225
-860 DATA "B GEM", 116.329, 28.026
-865 DATA "A LEO", 152.093, 11.967
-870 DATA "A VIR", 201.298, -11.161
-875 DATA "A BOO", 213.915, 19.183
-880 DATA "A SCO", 247.352, -26.432
-885 DATA "A LYR", 279.234, 38.784
-890 DATA "A AQL", 297.695, 8.868
-895 DATA "A CYG", 310.358, 45.280
-900 DATA "A PSA", 344.413, -29.622
-1000 REM *****************************************
-1010 REM FROM SKY & TELESCOPE, FEBRUARY, 1989,
-1020 REM PAGES 194-196. LINES 760 AND 795
-1030 REM CONTAINED ERRORS AS PRINTED IN THE
-1040 REM MAGAZINE; THEY ARE CORRECTED HERE.
-1050 REM *****************************************
-9999 END
diff --git a/bwbtest/B15B/taki.run b/bwbtest/B15B/taki.run
deleted file mode 100644
index b9d7a5d..0000000
--- a/bwbtest/B15B/taki.run
+++ /dev/null
@@ -1,26 +0,0 @@
-
-NAME OF BASIC STAR ? B GEM
-TIME (MIN) ? 7
-TELESCOPE DIRECTION ? 120
-TELESCOPE ELEVATION ? 30
-
-NAME OF BASIC STAR ? A VIR
-TIME (MIN) ? 8
-TELESCOPE DIRECTION ? 202
-TELESCOPE ELEVATION ? -11
- ------
-OPTION 1 OR 2? 1
- RIGHT ASCENSION (DEG) ? 100
- DECLINATION (DEG) ? 30
- TIME (MIN) ? 9
-TELESCOPE DIRECTION (DEG): 102.70
-TELESCOPE ELEVATION (DEG): 32.20
- ------
-OPTION 1 OR 2? 2
- TELESCOPE DIRECTION (DEG) ? 100
- TELESCOPE ELEVATION (DEG) ? 30
- TIME (MIN) ? 9
-RIGHT ASCENSION (DEG): 97.42
-DECLINATION (DEG): 27.81
- ------
-OPTION 1 OR 2? -999
diff --git a/bwbtest/B15B/track.INP b/bwbtest/B15B/track.INP
deleted file mode 100644
index d5576f3..0000000
--- a/bwbtest/B15B/track.INP
+++ /dev/null
@@ -1,6 +0,0 @@
-Y
-4.56
-23.4
-F
-2.345
-360
diff --git a/bwbtest/B15B/track.bas b/bwbtest/B15B/track.bas
deleted file mode 100644
index b9e015a..0000000
--- a/bwbtest/B15B/track.bas
+++ /dev/null
@@ -1,35 +0,0 @@
-10 REM TRACKING TOLERANCES
-12 REM
-14 R=3.14159265/180: REM RAD/DEG
-16 K=206265: REM ARC SEC/RAD
-18 INPUT "WITH DRIVE (Y OR N)";Q$
-20 IF Q$="Y" THEN 26
-22 INPUT "DECLINATION (DEG)";D
-24 M=360*COS(D*R): GOTO 30
-26 INPUT "MOTION (DEG/DAY)";M
-28 IF M=0 THEN 26
-30 INPUT "E.F.L. (MM)";F
-32 INPUT "FILM GRAIN (F OR C)";A$
-34 IF A$<>"F" AND A$<>"C" THEN 32
-36 INPUT "ENLARGEMENT FACTOR";E
-38 INPUT "PLANNED EXP (MIN)";T
-40 S=1/(R*F*E): REM DEG/MM
-42 R1=M/(S*24*60): REM MM/MIN
-44 IF A$="F" THEN G=K/(F*100)
-46 IF A$="C" THEN G=K/(F*20)
-48 PRINT
-50 PRINT "MOTION IN ";T;" MIN EXP:"
-52 PRINT " ";INT(T*R1*S*3600+0.5);
-54 PRINT " ARC SEC, OR"
-56 PRINT " ";T*R1;" MM ON PRINT"
-58 PRINT "LIMITS BASED ON GRAIN:"
-60 PRINT " MAX EXPOSURE ";
-62 PRINT G/(S*3600*R1);" MIN"
-64 PRINT " RESOLUTION ";
-66 PRINT INT(G+0.5);" ARC SEC"
-68 END
-70 REM ------------------------
-80 REM APPEARED IN ASTRONOMICAL
-90 REM COMPUTING, SKY & TELE-
-95 REM SCOPE, FEBRUARY, 1986
-99 REM ------------------------
diff --git a/bwbtest/B15B/track.run b/bwbtest/B15B/track.run
deleted file mode 100644
index 22dc0f1..0000000
--- a/bwbtest/B15B/track.run
+++ /dev/null
@@ -1,13 +0,0 @@
-WITH DRIVE (Y OR N)? Y
-MOTION (DEG/DAY)? 4.56
-E.F.L. (MM)? 23.4
-FILM GRAIN (F OR C)? F
-ENLARGEMENT FACTOR? 2.345
-PLANNED EXP (MIN)? 360
-
-MOTION IN 360 MIN EXP:
- 4104 ARC SEC, OR
- 1.09179 MM ON PRINT
-LIMITS BASED ON GRAIN:
- MAX EXPOSURE 7.73223 MIN
- RESOLUTION 88 ARC SEC
diff --git a/bwbtest/B15B/vislimit.INP b/bwbtest/B15B/vislimit.INP
deleted file mode 100644
index c5356ba..0000000
--- a/bwbtest/B15B/vislimit.INP
+++ /dev/null
@@ -1 +0,0 @@
-174
diff --git a/bwbtest/B15B/vislimit.bas b/bwbtest/B15B/vislimit.bas
deleted file mode 100644
index 91f0fca..0000000
--- a/bwbtest/B15B/vislimit.bas
+++ /dev/null
@@ -1,118 +0,0 @@
-10 REM VISLIMIT.BAS Visual Limits
-20 REM by Bradley E. Schaefer
-30 FOR I=1 TO 5 : READ WA(I) : NEXT I
-40 DATA 0.365, 0.44, 0.55, 0.7, 0.9
-50 FOR I=1 TO 5 : READ MO(I) : NEXT I
-60 DATA -10.93, -10.45, -11.05, -11.90, -12.70
-70 RD=3.14159/180.0
-80 REM Input for Moon and Sun
-90 AM=180.0 : REM Moon phase (deg.; 0=FM, 90=FQ/LQ, 180=NM)
-100 ZM=180.0 : REM Zenith distance of Moon (deg.)
-110 RM=180.0 : REM Angular distance to Moon (deg.)
-120 ZS=180.0 : REM Zenith distance of Sun (deg.)
-130 RS=180.0 : REM Angular distance to Sun (deg.)
-140 REM Input for the Site, Date, Observer
-150 RH=40.0 : REM relative humidity (%)
-160 TE=15.0 : REM Air temperature (deg. C)
-170 LA=30.0 : REM Latitude (deg.)
-180 AL=1000.0 : REM Altitude above sea level (m)
-190 M=2.0 : REM Month (1=Jan, 12=Dec)
-200 Y=1998.0 : REM Year
-210 SN=1.0 : REM Snellen Ratio (20/20=1.0, good 20/10=2.0)
-220 INPUT "Zenith distance (deg.): ";Z
-230 GOSUB 1000 : REM Extinction
-240 GOSUB 2000 : REM Sky
-250 REM Visual limiting magnitude
-260 BL=B(3)/1.11E-15 : REM in nanolamberts
-270 IF BL>1500.0 THEN GOTO 300
-280 C1=10.0^(-9.8): C2=10.0^(-1.9)
-290 GOTO 310
-300 C1=10.0^(-8.350001) : C2=10.0^(-5.9)
-310 TH=C1*((1.0+SQR(C2*BL))^2.0) : REM in foot-candles
-320 MN=-16.57-2.5*(LOG(TH)/LOG(10))-DM(3)+5.0*(LOG(SN)/LOG(10))
-330 PRINT : REM Write results and stop program
-340 PRINT USING "Visual Sky Brightness (nL): ######"; BL
-350 PRINT USING "Visual Limiting Magnitude: ###.##"; MN
-360 END
-1000 REM Extinction Subroutine
-1010 FOR I=1 TO 5: READ OZ(I): NEXT I
-1020 DATA 0.000, 0.000, 0.031, 0.008, 0.000
-1030 FOR I=1 TO 5: READ WT(I): NEXT I
-1040 DATA 0.074, 0.045, 0.031, 0.020, 0.015
-1050 LT=LA*RD
-1060 RA=(M-3)*30.0*RD
-1070 SL=LA/ABS(LA)
-1080 REM Airmass for each component
-1090 ZZ=Z*RD
-1100 XG=1/(COS(ZZ)+.0286*EXP(-10.5*COS(ZZ)))
-1110 XA=1/(COS(ZZ)+.0123*EXP(-24.5*COS(ZZ)))
-1120 XO=1/SQR(1.0-(SIN(ZZ)/(1.0+(20.0/6378.0)))^2)
-1130 REM UBVRI extinction for each component
-1140 FOR I=1 TO 5
-1150 KR=.1066*EXP(-1*AL/8200)*((WA(I)/.55)^(-4))
-1160 KA=.1*((WA(I)/.55)^(-1.3))*EXP(-1*AL/1500)
-1170 KA=KA*((1-.32/LOG(RH/100.0))^1.33)*(1+0.33*SL*SIN(RA))
-1180 KO=OZ(I)*(3.0+.4*(LT*COS(RA)-COS(3*LT)))/3.0
-1190 KW=WT(I)*.94*(RH/100.0)*EXP(TE/15)*EXP(-1*AL/8200)
-1200 K(I)=KR+KA+KO+KW
-1210 DM(I)=KR*XG+KA*XA+KO*XO+KW*XG
-1220 NEXT I
-1230 REM Write results and return
-1240 PRINT : PRINT "Airmass (gas, aerosol, ozone): ";
-1250 PRINT USING "####.## "; XG, XA, XO
-1260 PRINT "Extinction Coefficients (UBVRI): ";
-1270 PRINT USING "####.## "; K(1), K(2), K(3), K(4), K(5)
-1280 PRINT "Total Extinction (UBVRI): ";
-1290 PRINT USING "####.## "; DM(1), DM(2), DM(3), DM(4), DM(5)
-1300 RETURN
-2000 REM SKY Subroutine
-2010 FOR I=1 TO 5: READ BO(I): NEXT I
-2020 DATA 8.0E-14, 7.0E-14, 1.0E-13, 1.0E-13, 3.0E-13
-2030 FOR I=1 TO 5: READ CM(I): NEXT I
-2040 DATA 1.36, 0.91, 0.00, -0.76, -1.17
-2050 FOR I=1 TO 5: READ MS(I): NEXT I
-2060 DATA -25.96, -26.09, -26.74, -27.26, -27.55
-2070 X=1/(COS(ZZ)+.025*EXP(-11*COS(ZZ))) : REM air mass
-2080 XM=1/(COS(ZM*RD)+.025*EXP(-11*COS(ZM*RD))) : REM air mass Moon
-2090 IF ZM>90.0 THEN XM=40.0
-2100 XS=1/(COS(ZS*RD)+.025*EXP(-11*COS(ZS*RD))) : REM air mass Sun
-2110 IF ZS>90.0 THEN XS=40.0
-2120 FOR I=1 TO 5
-2130 REM Dark night sky brightness
-2140 BN=BO(I)*(1+.3*COS(6.283*(Y-1992)/11))
-2150 BN=BN*(.4+.6/SQR(1.0-.96*((SIN(ZZ))^2)))
-2160 BN=BN*(10^(-.4*K(I)*X))
-2170 REM Moonlight brightness
-2180 MM=-12.73+.026*ABS(AM)+4E-09*(AM^4) : REM moon mag in V
-2190 MM=MM+CM(I) : REM Moon mag
-2200 C3=10.0^(-.4*K(I)*XM)
-2210 FM=6.2E+07*(RM^(-2))+(10^(6.15-RM/40))
-2220 FM=FM+(10^5.36)*(1.06+((COS(RM*RD))^2))
-2230 BM=10^(-.4*(MM-MO(I)+43.27))
-2240 BM=BM*(1-10^(-.4*K(I)*X))
-2250 BM=BM*(FM*C3+440000.0*(1-C3))
-2260 REM Twilight brightness
-2270 HS=90.0-ZS : REM Height of Sun
-2280 BT=10^(-.4*(MS(I)-MO(I)+32.5-HS-(Z/(360*K(I)))))
-2290 BT=BT*(100/RS)*(1.0-10.0^(-.4*K(I)*X))
-2300 REM Daylight brightness
-2310 C4=10.0^(-.4*K(I)*XS)
-2320 FS=6.2E+07*(RS^(-2))+(10^(6.15-RS/40))
-2330 FS=FS+(10^5.36)*(1.06+((COS(RS*RD))^2))
-2340 BD=10^(-.4*(MS(I)-MO(I)+43.27))
-2350 BD=BD*(1-10^(-.4*K(I)*X))
-2360 BD=BD*(FS*C4+440000.0*(1-C4))
-2370 REM Total sky brightness
-2380 IF BD>BT THEN GOTO 2410
-2390 B(I)=BN+BD
-2400 GOTO 2420
-2410 B(I)=BN+BT
-2420 IF ZM<90.0 THEN B(I)=B(I)+BM
-2430 NEXT I
-2440 PRINT "Sky brightness (UBVRI):";
-2450 PRINT USING " ##.#^^^^"; B(1), B(2), B(3), B(4), B(5)
-2460 RETURN
-9991 REM ==============================
-9992 REM FROM "ASTRONOMICAL COMPUTING,"
-9993 REM SKY & TELESCOPE, MAY 1998
-9994 REM ==============================
diff --git a/bwbtest/B15B/vislimit.run b/bwbtest/B15B/vislimit.run
deleted file mode 100644
index 8b10ca0..0000000
--- a/bwbtest/B15B/vislimit.run
+++ /dev/null
@@ -1,10 +0,0 @@
-Zenith distance (deg.): ? 174
-
-Airmass (gas, aerosol, ozone): 0.00 0.00 1.01
-Extinction Coefficients (UBVRI): 0.66 0.36 0.22 0.11 0.06
-Total Extinction (UBVRI): 0.00 0.00 0.03 0.01 0.00
-Sky brightness (UBVRI): 5.71274e-14 4.99965e-14 7.14300e-14 7.14351e-14
-2.14312e-13
-
-Visual Sky Brightness (nL): 64
-Visual Limiting Magnitude: 6.50
diff --git a/bwbtest/B15B/wavel.INP b/bwbtest/B15B/wavel.INP
deleted file mode 100644
index 9381451..0000000
--- a/bwbtest/B15B/wavel.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-98765
-43321
--1
diff --git a/bwbtest/B15B/wavel.bas b/bwbtest/B15B/wavel.bas
deleted file mode 100644
index ac70da8..0000000
--- a/bwbtest/B15B/wavel.bas
+++ /dev/null
@@ -1,27 +0,0 @@
-100 REM WAVELENGTHS
-110 REM
-120 DATA 6563,14.5
-130 DATA 4861,49.0
-140 DATA 3889,85.0
-150 READ W1,S1
-160 READ W2,S2
-170 READ W3,S3
-180 P=W2-W1: Q=W3-W1: R=S2-S1
-190 S=S3-S1: T=S3-S2
-200 A=R/P: B=S/Q
-210 U=A-B: V=T/U: L=W1-V
-220 D1=A*(W2-L): D2=D1+S1
-230 C=(D1*T)/U
-240 PRINT
-250 INPUT "DISTANCE";D
-260 IF D<0 THEN 310
-270 W=L+(C/(D2-D))
-280 W=INT(W+0.5)
-290 PRINT "WAVELENGTH = ";W
-300 GOTO 240
-310 END
-320 REM ------------------------
-330 REM APPEARED IN ASTRONOMICAL
-340 REM COMPUTING, SKY & TELE-
-350 REM SCOPE, JUNE, 1985
-360 REM ------------------------
diff --git a/bwbtest/B15B/wavel.run b/bwbtest/B15B/wavel.run
deleted file mode 100644
index c67527d..0000000
--- a/bwbtest/B15B/wavel.run
+++ /dev/null
@@ -1,8 +0,0 @@
-
-DISTANCE? 98765
-WAVELENGTH = 661
-
-DISTANCE? 43321
-WAVELENGTH = 668
-
-DISTANCE? -1
diff --git a/bwbtest/B15B/xyz.INP b/bwbtest/B15B/xyz.INP
deleted file mode 100644
index 3de7669..0000000
--- a/bwbtest/B15B/xyz.INP
+++ /dev/null
@@ -1 +0,0 @@
-2.3456,6.789
diff --git a/bwbtest/B15B/xyz.bas b/bwbtest/B15B/xyz.bas
deleted file mode 100644
index 469bbab..0000000
--- a/bwbtest/B15B/xyz.bas
+++ /dev/null
@@ -1,79 +0,0 @@
-500 REM X,Y,Z OF THE SUN
-501 REM (EQUINOX 1950.0)
-502 REM
-503 INPUT "J,F ";J,F
-504 J8=J-2415020: R1=3.14159265/180
-505 T=(J8+F)/36525
-506 P0=1.396041+0.000308*(T+0.5)
-507 P0=P0*(T-0.499998)
-508 A=100: GOSUB 529: G0=A+358.475833
-509 L0=A+279.696678-P0
-510 A=1336: GOSUB 529
-511 C0=A+270.434164-P0
-512 A=162: GOSUB 529
-513 V0=A+212.603219
-514 A=53: GOSUB 529: M0=A+319.529425
-515 A=8: GOSUB 529: J0=A+225.444651
-516 G=G0+T*(-0.950250-0.000150*T)
-517 C=C0+T*(307.883142-0.001133*T)
-518 L=L0+T*(0.768920+0.000303*T)
-519 V=V0+T*(197.803875+0.001286*T)
-520 M=M0+T*(59.8585+0.000181*T)
-521 J=J0+T*154.906654
-522 G=G*R1: C=C*R1: L=L*R1
-523 V=V*R1: M=M*R1: J=J*R1
-524 GOSUB 532
-525 PRINT "X: ";X
-526 PRINT "Y: ";Y
-527 PRINT "Z: ";Z
-528 END
-529 REM NORMALIZATION
-530 A=360*(A*T-INT(A*T)): RETURN
-531 REM
-532 X=0.000011*COS(2*G-L-2*J)
-533 X=X+0.000011*COS(2*G+L-2*V)
-534 X=X-0.000012*COS(G+L-V)
-535 X=X-0.000012*COS(4*G-L-8*M+3*J)
-536 X=X+0.000012*COS(4*G+L-8*M+3*J)
-537 X=X-0.000014*COS(C-2*L)
-538 X=X+0.000017*COS(C)
-539 X=X+0.000018*SIN(2*G+L-2*V)
-540 X=X-0.000021*T*COS(G+L)
-541 X=X-0.000026*SIN(G-L-J)
-542 X=X+0.000035*COS(2*G-L)
-543 X=X+0.000063*T*COS(G-L)
-544 X=X+0.000105*COS(2*G+L)
-545 X=X+0.008374*COS(G+L)
-546 X=X-0.025127*COS(G-L)
-547 X=X+0.999860*COS(L)
-548 REM
-549 Y=0.000010*SIN(2*G+L-2*V)
-550 Y=Y-0.000010*SIN(2*G-L-2*J)
-551 Y=Y-0.000011*SIN(G+L-V)
-552 Y=Y+0.000011*SIN(4*G-L-8*M+3*J)
-553 Y=Y+0.000011*SIN(4*G+L-8*M+3*J)
-554 Y=Y+0.000013*SIN(C-2*L)
-555 Y=Y+0.000016*SIN(C)
-556 Y=Y-0.000017*COS(2*G+L-2*V)
-557 Y=Y-0.000019*T*SIN(G+L)
-558 Y=Y-0.000024*COS(G-L-J)
-559 Y=Y-0.000032*SIN(2*G-L)
-560 Y=Y-0.000057*T*SIN(G-L)
-561 Y=Y+0.000097*SIN(2*G+L)
-562 Y=Y+0.007683*SIN(G+L)
-563 Y=Y+0.023053*SIN(G-L)
-564 Y=Y+0.917308*SIN(L)
-565 REM
-566 Z=-0.000010*COS(G-L-J)
-567 Z=Z-0.000014*SIN(2*G-L)
-568 Z=Z-0.000025*T*SIN(G-L)
-569 Z=Z+0.000042*SIN(2*G+L)
-570 Z=Z+0.003332*SIN(G+L)
-571 Z=Z+0.009998*SIN(G-L)
-572 Z=Z+0.397825*SIN(L)
-573 RETURN
-575 REM ------------------------
-576 REM APPEARED IN ASTRONOMICAL
-577 REM COMPUTING, SKY & TELE-
-578 REM SCOPE, NOVEMBER, 1985
-579 REM ------------------------
diff --git a/bwbtest/B15B/xyz.run b/bwbtest/B15B/xyz.run
deleted file mode 100644
index af19c2f..0000000
--- a/bwbtest/B15B/xyz.run
+++ /dev/null
@@ -1,4 +0,0 @@
-J,F ? 2.3456,6.789
-X: .96775
-Y: -.223455
-Z: -9.73883E-2
diff --git a/bwbtest/B84/SUBSGEN.BAS b/bwbtest/B84/SUBSGEN.BAS
deleted file mode 100644
index 4bc0fea..0000000
--- a/bwbtest/B84/SUBSGEN.BAS
+++ /dev/null
@@ -1,59 +0,0 @@
- 100 REM Filename: SUBSGEN.BAS
- 110 REM Purpose: Generate sub-string assignment tests
- 120 REM Author: Howarsd Wulf, AF5NE
- 130 REM Date: 2017-06-23
- 140 REM Notes: OPTION VERSION "BYWATER"
- 150 REM
- 160 REM
- 170 REM
- 180 REM
- 190 LET Q$ = """"
- 200 REM --------------------------------------------------
- 210 LET L = 1000
- 220 LET A$ = "ABCDEFG"
- 230 LET B$ = "WXYZ"
- 240 GOSUB 900
- 300 REM --------------------------------------------------
- 310 LET L = 3000
- 320 LET A$ = "ABCDEFG"
- 330 LET B$ = ""
- 340 GOSUB 900
- 400 REM --------------------------------------------------
- 410 LET L = 5000
- 420 LET A$ = ""
- 430 LET B$ = "WXYZ"
- 440 GOSUB 900
- 500 REM --------------------------------------------------
- 510 LET L = 7000
- 520 LET A$ = ""
- 530 LET B$ = ""
- 540 GOSUB 900
- 600 REM --------------------------------------------------
- 610 LET L = 7500
- 620 LET A$ = "A"
- 630 LET B$ = "W"
- 640 GOSUB 900
- 700 REM --------------------------------------------------
- 710 LET L = 8000
- 720 LET A$ = "A"
- 730 LET B$ = ""
- 740 GOSUB 900
- 800 REM --------------------------------------------------
- 810 LET L = 8500
- 820 LET A$ = ""
- 830 LET B$ = "W"
- 840 GOSUB 900
- 850 REM --------------------------------------------------
- 860 GOTO 999
- 900 REM --------------------------------------------------
- 910 LET A = LEN( A$ )
- 920 FOR M = -2 TO A + 2
- 930 FOR N = -2 TO A + 2
- 940 PRINT L; " DATA "; Q$; A$; Q$; ","; M; ","; N; ","; Q$; B$; Q$
- 950 LET L = L + 10
- 960 NEXT N
- 970 NEXT M
- 980 RETURN
- 990 REM --------------------------------------------------
- 999 END
-
diff --git a/bwbtest/B84/SUBSTR1.BAS b/bwbtest/B84/SUBSTR1.BAS
deleted file mode 100644
index 8e25771..0000000
--- a/bwbtest/B84/SUBSTR1.BAS
+++ /dev/null
@@ -1,462 +0,0 @@
- 90 REM Filename: SUBSTR1.BAS
- 100 REM Purpose: Verify sub-string assignments
- 110 REM Author: Howard Wulf, AF5NE
- 120 REM Date: 2017-06-23
- 130 REM Notes: OPTION VERSION "BYWATER"
- 140 REM
- 150 REM
- 160 REM
- 170 REM
- 180 RESTORE
- 190 READ A$
- 200 IF A$ = "*" THEN 9999
- 210 READ M, N, B$
- 220 PRINT "A$=["; A$; "], M="; M ; ", N="; N; ", B$=["; B$; "], ";
- 230 LET A$ [ M, N ] = B$
- 240 PRINT "RESULT=["; A$; "]"
- 250 GOTO 190
- 260 REM
- 270 REM
- 280 REM
- 290 REM
- 300 REM ------------------------------------------------
- 310 REM DATA FORMAT:
- 320 REM A$, M, N, B$
- 340 REM
- 1000 DATA "ABCDEFG",-2 ,-2 ,"WXYZ"
- 1010 DATA "ABCDEFG",-2 ,-1 ,"WXYZ"
- 1020 DATA "ABCDEFG",-2 , 0 ,"WXYZ"
- 1030 DATA "ABCDEFG",-2 , 1 ,"WXYZ"
- 1040 DATA "ABCDEFG",-2 , 2 ,"WXYZ"
- 1050 DATA "ABCDEFG",-2 , 3 ,"WXYZ"
- 1060 DATA "ABCDEFG",-2 , 4 ,"WXYZ"
- 1070 DATA "ABCDEFG",-2 , 5 ,"WXYZ"
- 1080 DATA "ABCDEFG",-2 , 6 ,"WXYZ"
- 1090 DATA "ABCDEFG",-2 , 7 ,"WXYZ"
- 1100 DATA "ABCDEFG",-2 , 8 ,"WXYZ"
- 1110 DATA "ABCDEFG",-2 , 9 ,"WXYZ"
- 1120 DATA "ABCDEFG",-1 ,-2 ,"WXYZ"
- 1130 DATA "ABCDEFG",-1 ,-1 ,"WXYZ"
- 1140 DATA "ABCDEFG",-1 , 0 ,"WXYZ"
- 1150 DATA "ABCDEFG",-1 , 1 ,"WXYZ"
- 1160 DATA "ABCDEFG",-1 , 2 ,"WXYZ"
- 1170 DATA "ABCDEFG",-1 , 3 ,"WXYZ"
- 1180 DATA "ABCDEFG",-1 , 4 ,"WXYZ"
- 1190 DATA "ABCDEFG",-1 , 5 ,"WXYZ"
- 1200 DATA "ABCDEFG",-1 , 6 ,"WXYZ"
- 1210 DATA "ABCDEFG",-1 , 7 ,"WXYZ"
- 1220 DATA "ABCDEFG",-1 , 8 ,"WXYZ"
- 1230 DATA "ABCDEFG",-1 , 9 ,"WXYZ"
- 1240 DATA "ABCDEFG", 0 ,-2 ,"WXYZ"
- 1250 DATA "ABCDEFG", 0 ,-1 ,"WXYZ"
- 1260 DATA "ABCDEFG", 0 , 0 ,"WXYZ"
- 1270 DATA "ABCDEFG", 0 , 1 ,"WXYZ"
- 1280 DATA "ABCDEFG", 0 , 2 ,"WXYZ"
- 1290 DATA "ABCDEFG", 0 , 3 ,"WXYZ"
- 1300 DATA "ABCDEFG", 0 , 4 ,"WXYZ"
- 1310 DATA "ABCDEFG", 0 , 5 ,"WXYZ"
- 1320 DATA "ABCDEFG", 0 , 6 ,"WXYZ"
- 1330 DATA "ABCDEFG", 0 , 7 ,"WXYZ"
- 1340 DATA "ABCDEFG", 0 , 8 ,"WXYZ"
- 1350 DATA "ABCDEFG", 0 , 9 ,"WXYZ"
- 1360 DATA "ABCDEFG", 1 ,-2 ,"WXYZ"
- 1370 DATA "ABCDEFG", 1 ,-1 ,"WXYZ"
- 1380 DATA "ABCDEFG", 1 , 0 ,"WXYZ"
- 1390 DATA "ABCDEFG", 1 , 1 ,"WXYZ"
- 1400 DATA "ABCDEFG", 1 , 2 ,"WXYZ"
- 1410 DATA "ABCDEFG", 1 , 3 ,"WXYZ"
- 1420 DATA "ABCDEFG", 1 , 4 ,"WXYZ"
- 1430 DATA "ABCDEFG", 1 , 5 ,"WXYZ"
- 1440 DATA "ABCDEFG", 1 , 6 ,"WXYZ"
- 1450 DATA "ABCDEFG", 1 , 7 ,"WXYZ"
- 1460 DATA "ABCDEFG", 1 , 8 ,"WXYZ"
- 1470 DATA "ABCDEFG", 1 , 9 ,"WXYZ"
- 1480 DATA "ABCDEFG", 2 ,-2 ,"WXYZ"
- 1490 DATA "ABCDEFG", 2 ,-1 ,"WXYZ"
- 1500 DATA "ABCDEFG", 2 , 0 ,"WXYZ"
- 1510 DATA "ABCDEFG", 2 , 1 ,"WXYZ"
- 1520 DATA "ABCDEFG", 2 , 2 ,"WXYZ"
- 1530 DATA "ABCDEFG", 2 , 3 ,"WXYZ"
- 1540 DATA "ABCDEFG", 2 , 4 ,"WXYZ"
- 1550 DATA "ABCDEFG", 2 , 5 ,"WXYZ"
- 1560 DATA "ABCDEFG", 2 , 6 ,"WXYZ"
- 1570 DATA "ABCDEFG", 2 , 7 ,"WXYZ"
- 1580 DATA "ABCDEFG", 2 , 8 ,"WXYZ"
- 1590 DATA "ABCDEFG", 2 , 9 ,"WXYZ"
- 1600 DATA "ABCDEFG", 3 ,-2 ,"WXYZ"
- 1610 DATA "ABCDEFG", 3 ,-1 ,"WXYZ"
- 1620 DATA "ABCDEFG", 3 , 0 ,"WXYZ"
- 1630 DATA "ABCDEFG", 3 , 1 ,"WXYZ"
- 1640 DATA "ABCDEFG", 3 , 2 ,"WXYZ"
- 1650 DATA "ABCDEFG", 3 , 3 ,"WXYZ"
- 1660 DATA "ABCDEFG", 3 , 4 ,"WXYZ"
- 1670 DATA "ABCDEFG", 3 , 5 ,"WXYZ"
- 1680 DATA "ABCDEFG", 3 , 6 ,"WXYZ"
- 1690 DATA "ABCDEFG", 3 , 7 ,"WXYZ"
- 1700 DATA "ABCDEFG", 3 , 8 ,"WXYZ"
- 1710 DATA "ABCDEFG", 3 , 9 ,"WXYZ"
- 1720 DATA "ABCDEFG", 4 ,-2 ,"WXYZ"
- 1730 DATA "ABCDEFG", 4 ,-1 ,"WXYZ"
- 1740 DATA "ABCDEFG", 4 , 0 ,"WXYZ"
- 1750 DATA "ABCDEFG", 4 , 1 ,"WXYZ"
- 1760 DATA "ABCDEFG", 4 , 2 ,"WXYZ"
- 1770 DATA "ABCDEFG", 4 , 3 ,"WXYZ"
- 1780 DATA "ABCDEFG", 4 , 4 ,"WXYZ"
- 1790 DATA "ABCDEFG", 4 , 5 ,"WXYZ"
- 1800 DATA "ABCDEFG", 4 , 6 ,"WXYZ"
- 1810 DATA "ABCDEFG", 4 , 7 ,"WXYZ"
- 1820 DATA "ABCDEFG", 4 , 8 ,"WXYZ"
- 1830 DATA "ABCDEFG", 4 , 9 ,"WXYZ"
- 1840 DATA "ABCDEFG", 5 ,-2 ,"WXYZ"
- 1850 DATA "ABCDEFG", 5 ,-1 ,"WXYZ"
- 1860 DATA "ABCDEFG", 5 , 0 ,"WXYZ"
- 1870 DATA "ABCDEFG", 5 , 1 ,"WXYZ"
- 1880 DATA "ABCDEFG", 5 , 2 ,"WXYZ"
- 1890 DATA "ABCDEFG", 5 , 3 ,"WXYZ"
- 1900 DATA "ABCDEFG", 5 , 4 ,"WXYZ"
- 1910 DATA "ABCDEFG", 5 , 5 ,"WXYZ"
- 1920 DATA "ABCDEFG", 5 , 6 ,"WXYZ"
- 1930 DATA "ABCDEFG", 5 , 7 ,"WXYZ"
- 1940 DATA "ABCDEFG", 5 , 8 ,"WXYZ"
- 1950 DATA "ABCDEFG", 5 , 9 ,"WXYZ"
- 1960 DATA "ABCDEFG", 6 ,-2 ,"WXYZ"
- 1970 DATA "ABCDEFG", 6 ,-1 ,"WXYZ"
- 1980 DATA "ABCDEFG", 6 , 0 ,"WXYZ"
- 1990 DATA "ABCDEFG", 6 , 1 ,"WXYZ"
- 2000 DATA "ABCDEFG", 6 , 2 ,"WXYZ"
- 2010 DATA "ABCDEFG", 6 , 3 ,"WXYZ"
- 2020 DATA "ABCDEFG", 6 , 4 ,"WXYZ"
- 2030 DATA "ABCDEFG", 6 , 5 ,"WXYZ"
- 2040 DATA "ABCDEFG", 6 , 6 ,"WXYZ"
- 2050 DATA "ABCDEFG", 6 , 7 ,"WXYZ"
- 2060 DATA "ABCDEFG", 6 , 8 ,"WXYZ"
- 2070 DATA "ABCDEFG", 6 , 9 ,"WXYZ"
- 2080 DATA "ABCDEFG", 7 ,-2 ,"WXYZ"
- 2090 DATA "ABCDEFG", 7 ,-1 ,"WXYZ"
- 2100 DATA "ABCDEFG", 7 , 0 ,"WXYZ"
- 2110 DATA "ABCDEFG", 7 , 1 ,"WXYZ"
- 2120 DATA "ABCDEFG", 7 , 2 ,"WXYZ"
- 2130 DATA "ABCDEFG", 7 , 3 ,"WXYZ"
- 2140 DATA "ABCDEFG", 7 , 4 ,"WXYZ"
- 2150 DATA "ABCDEFG", 7 , 5 ,"WXYZ"
- 2160 DATA "ABCDEFG", 7 , 6 ,"WXYZ"
- 2170 DATA "ABCDEFG", 7 , 7 ,"WXYZ"
- 2180 DATA "ABCDEFG", 7 , 8 ,"WXYZ"
- 2190 DATA "ABCDEFG", 7 , 9 ,"WXYZ"
- 2200 DATA "ABCDEFG", 8 ,-2 ,"WXYZ"
- 2210 DATA "ABCDEFG", 8 ,-1 ,"WXYZ"
- 2220 DATA "ABCDEFG", 8 , 0 ,"WXYZ"
- 2230 DATA "ABCDEFG", 8 , 1 ,"WXYZ"
- 2240 DATA "ABCDEFG", 8 , 2 ,"WXYZ"
- 2250 DATA "ABCDEFG", 8 , 3 ,"WXYZ"
- 2260 DATA "ABCDEFG", 8 , 4 ,"WXYZ"
- 2270 DATA "ABCDEFG", 8 , 5 ,"WXYZ"
- 2280 DATA "ABCDEFG", 8 , 6 ,"WXYZ"
- 2290 DATA "ABCDEFG", 8 , 7 ,"WXYZ"
- 2300 DATA "ABCDEFG", 8 , 8 ,"WXYZ"
- 2310 DATA "ABCDEFG", 8 , 9 ,"WXYZ"
- 2320 DATA "ABCDEFG", 9 ,-2 ,"WXYZ"
- 2330 DATA "ABCDEFG", 9 ,-1 ,"WXYZ"
- 2340 DATA "ABCDEFG", 9 , 0 ,"WXYZ"
- 2350 DATA "ABCDEFG", 9 , 1 ,"WXYZ"
- 2360 DATA "ABCDEFG", 9 , 2 ,"WXYZ"
- 2370 DATA "ABCDEFG", 9 , 3 ,"WXYZ"
- 2380 DATA "ABCDEFG", 9 , 4 ,"WXYZ"
- 2390 DATA "ABCDEFG", 9 , 5 ,"WXYZ"
- 2400 DATA "ABCDEFG", 9 , 6 ,"WXYZ"
- 2410 DATA "ABCDEFG", 9 , 7 ,"WXYZ"
- 2420 DATA "ABCDEFG", 9 , 8 ,"WXYZ"
- 2430 DATA "ABCDEFG", 9 , 9 ,"WXYZ"
- 3000 DATA "ABCDEFG",-2 ,-2 ,""
- 3010 DATA "ABCDEFG",-2 ,-1 ,""
- 3020 DATA "ABCDEFG",-2 , 0 ,""
- 3030 DATA "ABCDEFG",-2 , 1 ,""
- 3040 DATA "ABCDEFG",-2 , 2 ,""
- 3050 DATA "ABCDEFG",-2 , 3 ,""
- 3060 DATA "ABCDEFG",-2 , 4 ,""
- 3070 DATA "ABCDEFG",-2 , 5 ,""
- 3080 DATA "ABCDEFG",-2 , 6 ,""
- 3090 DATA "ABCDEFG",-2 , 7 ,""
- 3100 DATA "ABCDEFG",-2 , 8 ,""
- 3110 DATA "ABCDEFG",-2 , 9 ,""
- 3120 DATA "ABCDEFG",-1 ,-2 ,""
- 3130 DATA "ABCDEFG",-1 ,-1 ,""
- 3140 DATA "ABCDEFG",-1 , 0 ,""
- 3150 DATA "ABCDEFG",-1 , 1 ,""
- 3160 DATA "ABCDEFG",-1 , 2 ,""
- 3170 DATA "ABCDEFG",-1 , 3 ,""
- 3180 DATA "ABCDEFG",-1 , 4 ,""
- 3190 DATA "ABCDEFG",-1 , 5 ,""
- 3200 DATA "ABCDEFG",-1 , 6 ,""
- 3210 DATA "ABCDEFG",-1 , 7 ,""
- 3220 DATA "ABCDEFG",-1 , 8 ,""
- 3230 DATA "ABCDEFG",-1 , 9 ,""
- 3240 DATA "ABCDEFG", 0 ,-2 ,""
- 3250 DATA "ABCDEFG", 0 ,-1 ,""
- 3260 DATA "ABCDEFG", 0 , 0 ,""
- 3270 DATA "ABCDEFG", 0 , 1 ,""
- 3280 DATA "ABCDEFG", 0 , 2 ,""
- 3290 DATA "ABCDEFG", 0 , 3 ,""
- 3300 DATA "ABCDEFG", 0 , 4 ,""
- 3310 DATA "ABCDEFG", 0 , 5 ,""
- 3320 DATA "ABCDEFG", 0 , 6 ,""
- 3330 DATA "ABCDEFG", 0 , 7 ,""
- 3340 DATA "ABCDEFG", 0 , 8 ,""
- 3350 DATA "ABCDEFG", 0 , 9 ,""
- 3360 DATA "ABCDEFG", 1 ,-2 ,""
- 3370 DATA "ABCDEFG", 1 ,-1 ,""
- 3380 DATA "ABCDEFG", 1 , 0 ,""
- 3390 DATA "ABCDEFG", 1 , 1 ,""
- 3400 DATA "ABCDEFG", 1 , 2 ,""
- 3410 DATA "ABCDEFG", 1 , 3 ,""
- 3420 DATA "ABCDEFG", 1 , 4 ,""
- 3430 DATA "ABCDEFG", 1 , 5 ,""
- 3440 DATA "ABCDEFG", 1 , 6 ,""
- 3450 DATA "ABCDEFG", 1 , 7 ,""
- 3460 DATA "ABCDEFG", 1 , 8 ,""
- 3470 DATA "ABCDEFG", 1 , 9 ,""
- 3480 DATA "ABCDEFG", 2 ,-2 ,""
- 3490 DATA "ABCDEFG", 2 ,-1 ,""
- 3500 DATA "ABCDEFG", 2 , 0 ,""
- 3510 DATA "ABCDEFG", 2 , 1 ,""
- 3520 DATA "ABCDEFG", 2 , 2 ,""
- 3530 DATA "ABCDEFG", 2 , 3 ,""
- 3540 DATA "ABCDEFG", 2 , 4 ,""
- 3550 DATA "ABCDEFG", 2 , 5 ,""
- 3560 DATA "ABCDEFG", 2 , 6 ,""
- 3570 DATA "ABCDEFG", 2 , 7 ,""
- 3580 DATA "ABCDEFG", 2 , 8 ,""
- 3590 DATA "ABCDEFG", 2 , 9 ,""
- 3600 DATA "ABCDEFG", 3 ,-2 ,""
- 3610 DATA "ABCDEFG", 3 ,-1 ,""
- 3620 DATA "ABCDEFG", 3 , 0 ,""
- 3630 DATA "ABCDEFG", 3 , 1 ,""
- 3640 DATA "ABCDEFG", 3 , 2 ,""
- 3650 DATA "ABCDEFG", 3 , 3 ,""
- 3660 DATA "ABCDEFG", 3 , 4 ,""
- 3670 DATA "ABCDEFG", 3 , 5 ,""
- 3680 DATA "ABCDEFG", 3 , 6 ,""
- 3690 DATA "ABCDEFG", 3 , 7 ,""
- 3700 DATA "ABCDEFG", 3 , 8 ,""
- 3710 DATA "ABCDEFG", 3 , 9 ,""
- 3720 DATA "ABCDEFG", 4 ,-2 ,""
- 3730 DATA "ABCDEFG", 4 ,-1 ,""
- 3740 DATA "ABCDEFG", 4 , 0 ,""
- 3750 DATA "ABCDEFG", 4 , 1 ,""
- 3760 DATA "ABCDEFG", 4 , 2 ,""
- 3770 DATA "ABCDEFG", 4 , 3 ,""
- 3780 DATA "ABCDEFG", 4 , 4 ,""
- 3790 DATA "ABCDEFG", 4 , 5 ,""
- 3800 DATA "ABCDEFG", 4 , 6 ,""
- 3810 DATA "ABCDEFG", 4 , 7 ,""
- 3820 DATA "ABCDEFG", 4 , 8 ,""
- 3830 DATA "ABCDEFG", 4 , 9 ,""
- 3840 DATA "ABCDEFG", 5 ,-2 ,""
- 3850 DATA "ABCDEFG", 5 ,-1 ,""
- 3860 DATA "ABCDEFG", 5 , 0 ,""
- 3870 DATA "ABCDEFG", 5 , 1 ,""
- 3880 DATA "ABCDEFG", 5 , 2 ,""
- 3890 DATA "ABCDEFG", 5 , 3 ,""
- 3900 DATA "ABCDEFG", 5 , 4 ,""
- 3910 DATA "ABCDEFG", 5 , 5 ,""
- 3920 DATA "ABCDEFG", 5 , 6 ,""
- 3930 DATA "ABCDEFG", 5 , 7 ,""
- 3940 DATA "ABCDEFG", 5 , 8 ,""
- 3950 DATA "ABCDEFG", 5 , 9 ,""
- 3960 DATA "ABCDEFG", 6 ,-2 ,""
- 3970 DATA "ABCDEFG", 6 ,-1 ,""
- 3980 DATA "ABCDEFG", 6 , 0 ,""
- 3990 DATA "ABCDEFG", 6 , 1 ,""
- 4000 DATA "ABCDEFG", 6 , 2 ,""
- 4010 DATA "ABCDEFG", 6 , 3 ,""
- 4020 DATA "ABCDEFG", 6 , 4 ,""
- 4030 DATA "ABCDEFG", 6 , 5 ,""
- 4040 DATA "ABCDEFG", 6 , 6 ,""
- 4050 DATA "ABCDEFG", 6 , 7 ,""
- 4060 DATA "ABCDEFG", 6 , 8 ,""
- 4070 DATA "ABCDEFG", 6 , 9 ,""
- 4080 DATA "ABCDEFG", 7 ,-2 ,""
- 4090 DATA "ABCDEFG", 7 ,-1 ,""
- 4100 DATA "ABCDEFG", 7 , 0 ,""
- 4110 DATA "ABCDEFG", 7 , 1 ,""
- 4120 DATA "ABCDEFG", 7 , 2 ,""
- 4130 DATA "ABCDEFG", 7 , 3 ,""
- 4140 DATA "ABCDEFG", 7 , 4 ,""
- 4150 DATA "ABCDEFG", 7 , 5 ,""
- 4160 DATA "ABCDEFG", 7 , 6 ,""
- 4170 DATA "ABCDEFG", 7 , 7 ,""
- 4180 DATA "ABCDEFG", 7 , 8 ,""
- 4190 DATA "ABCDEFG", 7 , 9 ,""
- 4200 DATA "ABCDEFG", 8 ,-2 ,""
- 4210 DATA "ABCDEFG", 8 ,-1 ,""
- 4220 DATA "ABCDEFG", 8 , 0 ,""
- 4230 DATA "ABCDEFG", 8 , 1 ,""
- 4240 DATA "ABCDEFG", 8 , 2 ,""
- 4250 DATA "ABCDEFG", 8 , 3 ,""
- 4260 DATA "ABCDEFG", 8 , 4 ,""
- 4270 DATA "ABCDEFG", 8 , 5 ,""
- 4280 DATA "ABCDEFG", 8 , 6 ,""
- 4290 DATA "ABCDEFG", 8 , 7 ,""
- 4300 DATA "ABCDEFG", 8 , 8 ,""
- 4310 DATA "ABCDEFG", 8 , 9 ,""
- 4320 DATA "ABCDEFG", 9 ,-2 ,""
- 4330 DATA "ABCDEFG", 9 ,-1 ,""
- 4340 DATA "ABCDEFG", 9 , 0 ,""
- 4350 DATA "ABCDEFG", 9 , 1 ,""
- 4360 DATA "ABCDEFG", 9 , 2 ,""
- 4370 DATA "ABCDEFG", 9 , 3 ,""
- 4380 DATA "ABCDEFG", 9 , 4 ,""
- 4390 DATA "ABCDEFG", 9 , 5 ,""
- 4400 DATA "ABCDEFG", 9 , 6 ,""
- 4410 DATA "ABCDEFG", 9 , 7 ,""
- 4420 DATA "ABCDEFG", 9 , 8 ,""
- 4430 DATA "ABCDEFG", 9 , 9 ,""
- 5000 DATA "",-2 ,-2 ,"WXYZ"
- 5010 DATA "",-2 ,-1 ,"WXYZ"
- 5020 DATA "",-2 , 0 ,"WXYZ"
- 5030 DATA "",-2 , 1 ,"WXYZ"
- 5040 DATA "",-2 , 2 ,"WXYZ"
- 5050 DATA "",-1 ,-2 ,"WXYZ"
- 5060 DATA "",-1 ,-1 ,"WXYZ"
- 5070 DATA "",-1 , 0 ,"WXYZ"
- 5080 DATA "",-1 , 1 ,"WXYZ"
- 5090 DATA "",-1 , 2 ,"WXYZ"
- 5100 DATA "", 0 ,-2 ,"WXYZ"
- 5110 DATA "", 0 ,-1 ,"WXYZ"
- 5120 DATA "", 0 , 0 ,"WXYZ"
- 5130 DATA "", 0 , 1 ,"WXYZ"
- 5140 DATA "", 0 , 2 ,"WXYZ"
- 5150 DATA "", 1 ,-2 ,"WXYZ"
- 5160 DATA "", 1 ,-1 ,"WXYZ"
- 5170 DATA "", 1 , 0 ,"WXYZ"
- 5180 DATA "", 1 , 1 ,"WXYZ"
- 5190 DATA "", 1 , 2 ,"WXYZ"
- 5200 DATA "", 2 ,-2 ,"WXYZ"
- 5210 DATA "", 2 ,-1 ,"WXYZ"
- 5220 DATA "", 2 , 0 ,"WXYZ"
- 5230 DATA "", 2 , 1 ,"WXYZ"
- 5240 DATA "", 2 , 2 ,"WXYZ"
- 7000 DATA "",-2 ,-2 ,""
- 7010 DATA "",-2 ,-1 ,""
- 7020 DATA "",-2 , 0 ,""
- 7030 DATA "",-2 , 1 ,""
- 7040 DATA "",-2 , 2 ,""
- 7050 DATA "",-1 ,-2 ,""
- 7060 DATA "",-1 ,-1 ,""
- 7070 DATA "",-1 , 0 ,""
- 7080 DATA "",-1 , 1 ,""
- 7090 DATA "",-1 , 2 ,""
- 7100 DATA "", 0 ,-2 ,""
- 7110 DATA "", 0 ,-1 ,""
- 7120 DATA "", 0 , 0 ,""
- 7130 DATA "", 0 , 1 ,""
- 7140 DATA "", 0 , 2 ,""
- 7150 DATA "", 1 ,-2 ,""
- 7160 DATA "", 1 ,-1 ,""
- 7170 DATA "", 1 , 0 ,""
- 7180 DATA "", 1 , 1 ,""
- 7190 DATA "", 1 , 2 ,""
- 7200 DATA "", 2 ,-2 ,""
- 7210 DATA "", 2 ,-1 ,""
- 7220 DATA "", 2 , 0 ,""
- 7230 DATA "", 2 , 1 ,""
- 7240 DATA "", 2 , 2 ,""
- 7500 DATA "A",-2 ,-2 ,"W"
- 7510 DATA "A",-2 ,-1 ,"W"
- 7520 DATA "A",-2 , 0 ,"W"
- 7530 DATA "A",-2 , 1 ,"W"
- 7540 DATA "A",-2 , 2 ,"W"
- 7550 DATA "A",-2 , 3 ,"W"
- 7560 DATA "A",-1 ,-2 ,"W"
- 7570 DATA "A",-1 ,-1 ,"W"
- 7580 DATA "A",-1 , 0 ,"W"
- 7590 DATA "A",-1 , 1 ,"W"
- 7600 DATA "A",-1 , 2 ,"W"
- 7610 DATA "A",-1 , 3 ,"W"
- 7620 DATA "A", 0 ,-2 ,"W"
- 7630 DATA "A", 0 ,-1 ,"W"
- 7640 DATA "A", 0 , 0 ,"W"
- 7650 DATA "A", 0 , 1 ,"W"
- 7660 DATA "A", 0 , 2 ,"W"
- 7670 DATA "A", 0 , 3 ,"W"
- 7680 DATA "A", 1 ,-2 ,"W"
- 7690 DATA "A", 1 ,-1 ,"W"
- 7700 DATA "A", 1 , 0 ,"W"
- 7710 DATA "A", 1 , 1 ,"W"
- 7720 DATA "A", 1 , 2 ,"W"
- 7730 DATA "A", 1 , 3 ,"W"
- 7740 DATA "A", 2 ,-2 ,"W"
- 7750 DATA "A", 2 ,-1 ,"W"
- 7760 DATA "A", 2 , 0 ,"W"
- 7770 DATA "A", 2 , 1 ,"W"
- 7780 DATA "A", 2 , 2 ,"W"
- 7790 DATA "A", 2 , 3 ,"W"
- 7800 DATA "A", 3 ,-2 ,"W"
- 7810 DATA "A", 3 ,-1 ,"W"
- 7820 DATA "A", 3 , 0 ,"W"
- 7830 DATA "A", 3 , 1 ,"W"
- 7840 DATA "A", 3 , 2 ,"W"
- 7850 DATA "A", 3 , 3 ,"W"
- 8000 DATA "A",-2 ,-2 ,""
- 8010 DATA "A",-2 ,-1 ,""
- 8020 DATA "A",-2 , 0 ,""
- 8030 DATA "A",-2 , 1 ,""
- 8040 DATA "A",-2 , 2 ,""
- 8050 DATA "A",-2 , 3 ,""
- 8060 DATA "A",-1 ,-2 ,""
- 8070 DATA "A",-1 ,-1 ,""
- 8080 DATA "A",-1 , 0 ,""
- 8090 DATA "A",-1 , 1 ,""
- 8100 DATA "A",-1 , 2 ,""
- 8110 DATA "A",-1 , 3 ,""
- 8120 DATA "A", 0 ,-2 ,""
- 8130 DATA "A", 0 ,-1 ,""
- 8140 DATA "A", 0 , 0 ,""
- 8150 DATA "A", 0 , 1 ,""
- 8160 DATA "A", 0 , 2 ,""
- 8170 DATA "A", 0 , 3 ,""
- 8180 DATA "A", 1 ,-2 ,""
- 8190 DATA "A", 1 ,-1 ,""
- 8200 DATA "A", 1 , 0 ,""
- 8210 DATA "A", 1 , 1 ,""
- 8220 DATA "A", 1 , 2 ,""
- 8230 DATA "A", 1 , 3 ,""
- 8240 DATA "A", 2 ,-2 ,""
- 8250 DATA "A", 2 ,-1 ,""
- 8260 DATA "A", 2 , 0 ,""
- 8270 DATA "A", 2 , 1 ,""
- 8280 DATA "A", 2 , 2 ,""
- 8290 DATA "A", 2 , 3 ,""
- 8300 DATA "A", 3 ,-2 ,""
- 8310 DATA "A", 3 ,-1 ,""
- 8320 DATA "A", 3 , 0 ,""
- 8330 DATA "A", 3 , 1 ,""
- 8340 DATA "A", 3 , 2 ,""
- 8350 DATA "A", 3 , 3 ,""
- 8500 DATA "",-2 ,-2 ,"W"
- 8510 DATA "",-2 ,-1 ,"W"
- 8520 DATA "",-2 , 0 ,"W"
- 8530 DATA "",-2 , 1 ,"W"
- 8540 DATA "",-2 , 2 ,"W"
- 8550 DATA "",-1 ,-2 ,"W"
- 8560 DATA "",-1 ,-1 ,"W"
- 8570 DATA "",-1 , 0 ,"W"
- 8580 DATA "",-1 , 1 ,"W"
- 8590 DATA "",-1 , 2 ,"W"
- 8600 DATA "", 0 ,-2 ,"W"
- 8610 DATA "", 0 ,-1 ,"W"
- 8620 DATA "", 0 , 0 ,"W"
- 8630 DATA "", 0 , 1 ,"W"
- 8640 DATA "", 0 , 2 ,"W"
- 8650 DATA "", 1 ,-2 ,"W"
- 8660 DATA "", 1 ,-1 ,"W"
- 8670 DATA "", 1 , 0 ,"W"
- 8680 DATA "", 1 , 1 ,"W"
- 8690 DATA "", 1 , 2 ,"W"
- 8700 DATA "", 2 ,-2 ,"W"
- 8710 DATA "", 2 ,-1 ,"W"
- 8720 DATA "", 2 , 0 ,"W"
- 8730 DATA "", 2 , 1 ,"W"
- 8740 DATA "", 2 , 2 ,"W"
- 9990 DATA "*"
- 9999 END
diff --git a/bwbtest/B84/SUBSTR2.BAS b/bwbtest/B84/SUBSTR2.BAS
deleted file mode 100644
index 08b407b..0000000
--- a/bwbtest/B84/SUBSTR2.BAS
+++ /dev/null
@@ -1,462 +0,0 @@
- 90 REM Filename: SUBSTR2.BAS
- 100 REM Purpose: Verify sub-string selection
- 110 REM Author: Howard Wulf, AF5NE
- 120 REM Date: 2017-06-23
- 130 REM Notes: OPTION VERSION "BYWATER"
- 140 REM
- 150 REM
- 160 REM
- 170 REM
- 180 RESTORE
- 190 READ A$
- 200 IF A$ = "*" THEN 9999
- 210 READ M, N, B$
- 220 PRINT "A$=["; A$; "], M="; M ; ", N="; N; ", B$=["; B$; "], ";
- 230 LET A$ = B$ [ M, N ]
- 240 PRINT "RESULT=["; A$; "]"
- 250 GOTO 190
- 260 REM
- 270 REM
- 280 REM
- 290 REM
- 300 REM ------------------------------------------------
- 310 REM DATA FORMAT:
- 320 REM A$, M, N, B$
- 340 REM
- 1000 DATA "ABCDEFG",-2 ,-2 ,"WXYZ"
- 1010 DATA "ABCDEFG",-2 ,-1 ,"WXYZ"
- 1020 DATA "ABCDEFG",-2 , 0 ,"WXYZ"
- 1030 DATA "ABCDEFG",-2 , 1 ,"WXYZ"
- 1040 DATA "ABCDEFG",-2 , 2 ,"WXYZ"
- 1050 DATA "ABCDEFG",-2 , 3 ,"WXYZ"
- 1060 DATA "ABCDEFG",-2 , 4 ,"WXYZ"
- 1070 DATA "ABCDEFG",-2 , 5 ,"WXYZ"
- 1080 DATA "ABCDEFG",-2 , 6 ,"WXYZ"
- 1090 DATA "ABCDEFG",-2 , 7 ,"WXYZ"
- 1100 DATA "ABCDEFG",-2 , 8 ,"WXYZ"
- 1110 DATA "ABCDEFG",-2 , 9 ,"WXYZ"
- 1120 DATA "ABCDEFG",-1 ,-2 ,"WXYZ"
- 1130 DATA "ABCDEFG",-1 ,-1 ,"WXYZ"
- 1140 DATA "ABCDEFG",-1 , 0 ,"WXYZ"
- 1150 DATA "ABCDEFG",-1 , 1 ,"WXYZ"
- 1160 DATA "ABCDEFG",-1 , 2 ,"WXYZ"
- 1170 DATA "ABCDEFG",-1 , 3 ,"WXYZ"
- 1180 DATA "ABCDEFG",-1 , 4 ,"WXYZ"
- 1190 DATA "ABCDEFG",-1 , 5 ,"WXYZ"
- 1200 DATA "ABCDEFG",-1 , 6 ,"WXYZ"
- 1210 DATA "ABCDEFG",-1 , 7 ,"WXYZ"
- 1220 DATA "ABCDEFG",-1 , 8 ,"WXYZ"
- 1230 DATA "ABCDEFG",-1 , 9 ,"WXYZ"
- 1240 DATA "ABCDEFG", 0 ,-2 ,"WXYZ"
- 1250 DATA "ABCDEFG", 0 ,-1 ,"WXYZ"
- 1260 DATA "ABCDEFG", 0 , 0 ,"WXYZ"
- 1270 DATA "ABCDEFG", 0 , 1 ,"WXYZ"
- 1280 DATA "ABCDEFG", 0 , 2 ,"WXYZ"
- 1290 DATA "ABCDEFG", 0 , 3 ,"WXYZ"
- 1300 DATA "ABCDEFG", 0 , 4 ,"WXYZ"
- 1310 DATA "ABCDEFG", 0 , 5 ,"WXYZ"
- 1320 DATA "ABCDEFG", 0 , 6 ,"WXYZ"
- 1330 DATA "ABCDEFG", 0 , 7 ,"WXYZ"
- 1340 DATA "ABCDEFG", 0 , 8 ,"WXYZ"
- 1350 DATA "ABCDEFG", 0 , 9 ,"WXYZ"
- 1360 DATA "ABCDEFG", 1 ,-2 ,"WXYZ"
- 1370 DATA "ABCDEFG", 1 ,-1 ,"WXYZ"
- 1380 DATA "ABCDEFG", 1 , 0 ,"WXYZ"
- 1390 DATA "ABCDEFG", 1 , 1 ,"WXYZ"
- 1400 DATA "ABCDEFG", 1 , 2 ,"WXYZ"
- 1410 DATA "ABCDEFG", 1 , 3 ,"WXYZ"
- 1420 DATA "ABCDEFG", 1 , 4 ,"WXYZ"
- 1430 DATA "ABCDEFG", 1 , 5 ,"WXYZ"
- 1440 DATA "ABCDEFG", 1 , 6 ,"WXYZ"
- 1450 DATA "ABCDEFG", 1 , 7 ,"WXYZ"
- 1460 DATA "ABCDEFG", 1 , 8 ,"WXYZ"
- 1470 DATA "ABCDEFG", 1 , 9 ,"WXYZ"
- 1480 DATA "ABCDEFG", 2 ,-2 ,"WXYZ"
- 1490 DATA "ABCDEFG", 2 ,-1 ,"WXYZ"
- 1500 DATA "ABCDEFG", 2 , 0 ,"WXYZ"
- 1510 DATA "ABCDEFG", 2 , 1 ,"WXYZ"
- 1520 DATA "ABCDEFG", 2 , 2 ,"WXYZ"
- 1530 DATA "ABCDEFG", 2 , 3 ,"WXYZ"
- 1540 DATA "ABCDEFG", 2 , 4 ,"WXYZ"
- 1550 DATA "ABCDEFG", 2 , 5 ,"WXYZ"
- 1560 DATA "ABCDEFG", 2 , 6 ,"WXYZ"
- 1570 DATA "ABCDEFG", 2 , 7 ,"WXYZ"
- 1580 DATA "ABCDEFG", 2 , 8 ,"WXYZ"
- 1590 DATA "ABCDEFG", 2 , 9 ,"WXYZ"
- 1600 DATA "ABCDEFG", 3 ,-2 ,"WXYZ"
- 1610 DATA "ABCDEFG", 3 ,-1 ,"WXYZ"
- 1620 DATA "ABCDEFG", 3 , 0 ,"WXYZ"
- 1630 DATA "ABCDEFG", 3 , 1 ,"WXYZ"
- 1640 DATA "ABCDEFG", 3 , 2 ,"WXYZ"
- 1650 DATA "ABCDEFG", 3 , 3 ,"WXYZ"
- 1660 DATA "ABCDEFG", 3 , 4 ,"WXYZ"
- 1670 DATA "ABCDEFG", 3 , 5 ,"WXYZ"
- 1680 DATA "ABCDEFG", 3 , 6 ,"WXYZ"
- 1690 DATA "ABCDEFG", 3 , 7 ,"WXYZ"
- 1700 DATA "ABCDEFG", 3 , 8 ,"WXYZ"
- 1710 DATA "ABCDEFG", 3 , 9 ,"WXYZ"
- 1720 DATA "ABCDEFG", 4 ,-2 ,"WXYZ"
- 1730 DATA "ABCDEFG", 4 ,-1 ,"WXYZ"
- 1740 DATA "ABCDEFG", 4 , 0 ,"WXYZ"
- 1750 DATA "ABCDEFG", 4 , 1 ,"WXYZ"
- 1760 DATA "ABCDEFG", 4 , 2 ,"WXYZ"
- 1770 DATA "ABCDEFG", 4 , 3 ,"WXYZ"
- 1780 DATA "ABCDEFG", 4 , 4 ,"WXYZ"
- 1790 DATA "ABCDEFG", 4 , 5 ,"WXYZ"
- 1800 DATA "ABCDEFG", 4 , 6 ,"WXYZ"
- 1810 DATA "ABCDEFG", 4 , 7 ,"WXYZ"
- 1820 DATA "ABCDEFG", 4 , 8 ,"WXYZ"
- 1830 DATA "ABCDEFG", 4 , 9 ,"WXYZ"
- 1840 DATA "ABCDEFG", 5 ,-2 ,"WXYZ"
- 1850 DATA "ABCDEFG", 5 ,-1 ,"WXYZ"
- 1860 DATA "ABCDEFG", 5 , 0 ,"WXYZ"
- 1870 DATA "ABCDEFG", 5 , 1 ,"WXYZ"
- 1880 DATA "ABCDEFG", 5 , 2 ,"WXYZ"
- 1890 DATA "ABCDEFG", 5 , 3 ,"WXYZ"
- 1900 DATA "ABCDEFG", 5 , 4 ,"WXYZ"
- 1910 DATA "ABCDEFG", 5 , 5 ,"WXYZ"
- 1920 DATA "ABCDEFG", 5 , 6 ,"WXYZ"
- 1930 DATA "ABCDEFG", 5 , 7 ,"WXYZ"
- 1940 DATA "ABCDEFG", 5 , 8 ,"WXYZ"
- 1950 DATA "ABCDEFG", 5 , 9 ,"WXYZ"
- 1960 DATA "ABCDEFG", 6 ,-2 ,"WXYZ"
- 1970 DATA "ABCDEFG", 6 ,-1 ,"WXYZ"
- 1980 DATA "ABCDEFG", 6 , 0 ,"WXYZ"
- 1990 DATA "ABCDEFG", 6 , 1 ,"WXYZ"
- 2000 DATA "ABCDEFG", 6 , 2 ,"WXYZ"
- 2010 DATA "ABCDEFG", 6 , 3 ,"WXYZ"
- 2020 DATA "ABCDEFG", 6 , 4 ,"WXYZ"
- 2030 DATA "ABCDEFG", 6 , 5 ,"WXYZ"
- 2040 DATA "ABCDEFG", 6 , 6 ,"WXYZ"
- 2050 DATA "ABCDEFG", 6 , 7 ,"WXYZ"
- 2060 DATA "ABCDEFG", 6 , 8 ,"WXYZ"
- 2070 DATA "ABCDEFG", 6 , 9 ,"WXYZ"
- 2080 DATA "ABCDEFG", 7 ,-2 ,"WXYZ"
- 2090 DATA "ABCDEFG", 7 ,-1 ,"WXYZ"
- 2100 DATA "ABCDEFG", 7 , 0 ,"WXYZ"
- 2110 DATA "ABCDEFG", 7 , 1 ,"WXYZ"
- 2120 DATA "ABCDEFG", 7 , 2 ,"WXYZ"
- 2130 DATA "ABCDEFG", 7 , 3 ,"WXYZ"
- 2140 DATA "ABCDEFG", 7 , 4 ,"WXYZ"
- 2150 DATA "ABCDEFG", 7 , 5 ,"WXYZ"
- 2160 DATA "ABCDEFG", 7 , 6 ,"WXYZ"
- 2170 DATA "ABCDEFG", 7 , 7 ,"WXYZ"
- 2180 DATA "ABCDEFG", 7 , 8 ,"WXYZ"
- 2190 DATA "ABCDEFG", 7 , 9 ,"WXYZ"
- 2200 DATA "ABCDEFG", 8 ,-2 ,"WXYZ"
- 2210 DATA "ABCDEFG", 8 ,-1 ,"WXYZ"
- 2220 DATA "ABCDEFG", 8 , 0 ,"WXYZ"
- 2230 DATA "ABCDEFG", 8 , 1 ,"WXYZ"
- 2240 DATA "ABCDEFG", 8 , 2 ,"WXYZ"
- 2250 DATA "ABCDEFG", 8 , 3 ,"WXYZ"
- 2260 DATA "ABCDEFG", 8 , 4 ,"WXYZ"
- 2270 DATA "ABCDEFG", 8 , 5 ,"WXYZ"
- 2280 DATA "ABCDEFG", 8 , 6 ,"WXYZ"
- 2290 DATA "ABCDEFG", 8 , 7 ,"WXYZ"
- 2300 DATA "ABCDEFG", 8 , 8 ,"WXYZ"
- 2310 DATA "ABCDEFG", 8 , 9 ,"WXYZ"
- 2320 DATA "ABCDEFG", 9 ,-2 ,"WXYZ"
- 2330 DATA "ABCDEFG", 9 ,-1 ,"WXYZ"
- 2340 DATA "ABCDEFG", 9 , 0 ,"WXYZ"
- 2350 DATA "ABCDEFG", 9 , 1 ,"WXYZ"
- 2360 DATA "ABCDEFG", 9 , 2 ,"WXYZ"
- 2370 DATA "ABCDEFG", 9 , 3 ,"WXYZ"
- 2380 DATA "ABCDEFG", 9 , 4 ,"WXYZ"
- 2390 DATA "ABCDEFG", 9 , 5 ,"WXYZ"
- 2400 DATA "ABCDEFG", 9 , 6 ,"WXYZ"
- 2410 DATA "ABCDEFG", 9 , 7 ,"WXYZ"
- 2420 DATA "ABCDEFG", 9 , 8 ,"WXYZ"
- 2430 DATA "ABCDEFG", 9 , 9 ,"WXYZ"
- 3000 DATA "ABCDEFG",-2 ,-2 ,""
- 3010 DATA "ABCDEFG",-2 ,-1 ,""
- 3020 DATA "ABCDEFG",-2 , 0 ,""
- 3030 DATA "ABCDEFG",-2 , 1 ,""
- 3040 DATA "ABCDEFG",-2 , 2 ,""
- 3050 DATA "ABCDEFG",-2 , 3 ,""
- 3060 DATA "ABCDEFG",-2 , 4 ,""
- 3070 DATA "ABCDEFG",-2 , 5 ,""
- 3080 DATA "ABCDEFG",-2 , 6 ,""
- 3090 DATA "ABCDEFG",-2 , 7 ,""
- 3100 DATA "ABCDEFG",-2 , 8 ,""
- 3110 DATA "ABCDEFG",-2 , 9 ,""
- 3120 DATA "ABCDEFG",-1 ,-2 ,""
- 3130 DATA "ABCDEFG",-1 ,-1 ,""
- 3140 DATA "ABCDEFG",-1 , 0 ,""
- 3150 DATA "ABCDEFG",-1 , 1 ,""
- 3160 DATA "ABCDEFG",-1 , 2 ,""
- 3170 DATA "ABCDEFG",-1 , 3 ,""
- 3180 DATA "ABCDEFG",-1 , 4 ,""
- 3190 DATA "ABCDEFG",-1 , 5 ,""
- 3200 DATA "ABCDEFG",-1 , 6 ,""
- 3210 DATA "ABCDEFG",-1 , 7 ,""
- 3220 DATA "ABCDEFG",-1 , 8 ,""
- 3230 DATA "ABCDEFG",-1 , 9 ,""
- 3240 DATA "ABCDEFG", 0 ,-2 ,""
- 3250 DATA "ABCDEFG", 0 ,-1 ,""
- 3260 DATA "ABCDEFG", 0 , 0 ,""
- 3270 DATA "ABCDEFG", 0 , 1 ,""
- 3280 DATA "ABCDEFG", 0 , 2 ,""
- 3290 DATA "ABCDEFG", 0 , 3 ,""
- 3300 DATA "ABCDEFG", 0 , 4 ,""
- 3310 DATA "ABCDEFG", 0 , 5 ,""
- 3320 DATA "ABCDEFG", 0 , 6 ,""
- 3330 DATA "ABCDEFG", 0 , 7 ,""
- 3340 DATA "ABCDEFG", 0 , 8 ,""
- 3350 DATA "ABCDEFG", 0 , 9 ,""
- 3360 DATA "ABCDEFG", 1 ,-2 ,""
- 3370 DATA "ABCDEFG", 1 ,-1 ,""
- 3380 DATA "ABCDEFG", 1 , 0 ,""
- 3390 DATA "ABCDEFG", 1 , 1 ,""
- 3400 DATA "ABCDEFG", 1 , 2 ,""
- 3410 DATA "ABCDEFG", 1 , 3 ,""
- 3420 DATA "ABCDEFG", 1 , 4 ,""
- 3430 DATA "ABCDEFG", 1 , 5 ,""
- 3440 DATA "ABCDEFG", 1 , 6 ,""
- 3450 DATA "ABCDEFG", 1 , 7 ,""
- 3460 DATA "ABCDEFG", 1 , 8 ,""
- 3470 DATA "ABCDEFG", 1 , 9 ,""
- 3480 DATA "ABCDEFG", 2 ,-2 ,""
- 3490 DATA "ABCDEFG", 2 ,-1 ,""
- 3500 DATA "ABCDEFG", 2 , 0 ,""
- 3510 DATA "ABCDEFG", 2 , 1 ,""
- 3520 DATA "ABCDEFG", 2 , 2 ,""
- 3530 DATA "ABCDEFG", 2 , 3 ,""
- 3540 DATA "ABCDEFG", 2 , 4 ,""
- 3550 DATA "ABCDEFG", 2 , 5 ,""
- 3560 DATA "ABCDEFG", 2 , 6 ,""
- 3570 DATA "ABCDEFG", 2 , 7 ,""
- 3580 DATA "ABCDEFG", 2 , 8 ,""
- 3590 DATA "ABCDEFG", 2 , 9 ,""
- 3600 DATA "ABCDEFG", 3 ,-2 ,""
- 3610 DATA "ABCDEFG", 3 ,-1 ,""
- 3620 DATA "ABCDEFG", 3 , 0 ,""
- 3630 DATA "ABCDEFG", 3 , 1 ,""
- 3640 DATA "ABCDEFG", 3 , 2 ,""
- 3650 DATA "ABCDEFG", 3 , 3 ,""
- 3660 DATA "ABCDEFG", 3 , 4 ,""
- 3670 DATA "ABCDEFG", 3 , 5 ,""
- 3680 DATA "ABCDEFG", 3 , 6 ,""
- 3690 DATA "ABCDEFG", 3 , 7 ,""
- 3700 DATA "ABCDEFG", 3 , 8 ,""
- 3710 DATA "ABCDEFG", 3 , 9 ,""
- 3720 DATA "ABCDEFG", 4 ,-2 ,""
- 3730 DATA "ABCDEFG", 4 ,-1 ,""
- 3740 DATA "ABCDEFG", 4 , 0 ,""
- 3750 DATA "ABCDEFG", 4 , 1 ,""
- 3760 DATA "ABCDEFG", 4 , 2 ,""
- 3770 DATA "ABCDEFG", 4 , 3 ,""
- 3780 DATA "ABCDEFG", 4 , 4 ,""
- 3790 DATA "ABCDEFG", 4 , 5 ,""
- 3800 DATA "ABCDEFG", 4 , 6 ,""
- 3810 DATA "ABCDEFG", 4 , 7 ,""
- 3820 DATA "ABCDEFG", 4 , 8 ,""
- 3830 DATA "ABCDEFG", 4 , 9 ,""
- 3840 DATA "ABCDEFG", 5 ,-2 ,""
- 3850 DATA "ABCDEFG", 5 ,-1 ,""
- 3860 DATA "ABCDEFG", 5 , 0 ,""
- 3870 DATA "ABCDEFG", 5 , 1 ,""
- 3880 DATA "ABCDEFG", 5 , 2 ,""
- 3890 DATA "ABCDEFG", 5 , 3 ,""
- 3900 DATA "ABCDEFG", 5 , 4 ,""
- 3910 DATA "ABCDEFG", 5 , 5 ,""
- 3920 DATA "ABCDEFG", 5 , 6 ,""
- 3930 DATA "ABCDEFG", 5 , 7 ,""
- 3940 DATA "ABCDEFG", 5 , 8 ,""
- 3950 DATA "ABCDEFG", 5 , 9 ,""
- 3960 DATA "ABCDEFG", 6 ,-2 ,""
- 3970 DATA "ABCDEFG", 6 ,-1 ,""
- 3980 DATA "ABCDEFG", 6 , 0 ,""
- 3990 DATA "ABCDEFG", 6 , 1 ,""
- 4000 DATA "ABCDEFG", 6 , 2 ,""
- 4010 DATA "ABCDEFG", 6 , 3 ,""
- 4020 DATA "ABCDEFG", 6 , 4 ,""
- 4030 DATA "ABCDEFG", 6 , 5 ,""
- 4040 DATA "ABCDEFG", 6 , 6 ,""
- 4050 DATA "ABCDEFG", 6 , 7 ,""
- 4060 DATA "ABCDEFG", 6 , 8 ,""
- 4070 DATA "ABCDEFG", 6 , 9 ,""
- 4080 DATA "ABCDEFG", 7 ,-2 ,""
- 4090 DATA "ABCDEFG", 7 ,-1 ,""
- 4100 DATA "ABCDEFG", 7 , 0 ,""
- 4110 DATA "ABCDEFG", 7 , 1 ,""
- 4120 DATA "ABCDEFG", 7 , 2 ,""
- 4130 DATA "ABCDEFG", 7 , 3 ,""
- 4140 DATA "ABCDEFG", 7 , 4 ,""
- 4150 DATA "ABCDEFG", 7 , 5 ,""
- 4160 DATA "ABCDEFG", 7 , 6 ,""
- 4170 DATA "ABCDEFG", 7 , 7 ,""
- 4180 DATA "ABCDEFG", 7 , 8 ,""
- 4190 DATA "ABCDEFG", 7 , 9 ,""
- 4200 DATA "ABCDEFG", 8 ,-2 ,""
- 4210 DATA "ABCDEFG", 8 ,-1 ,""
- 4220 DATA "ABCDEFG", 8 , 0 ,""
- 4230 DATA "ABCDEFG", 8 , 1 ,""
- 4240 DATA "ABCDEFG", 8 , 2 ,""
- 4250 DATA "ABCDEFG", 8 , 3 ,""
- 4260 DATA "ABCDEFG", 8 , 4 ,""
- 4270 DATA "ABCDEFG", 8 , 5 ,""
- 4280 DATA "ABCDEFG", 8 , 6 ,""
- 4290 DATA "ABCDEFG", 8 , 7 ,""
- 4300 DATA "ABCDEFG", 8 , 8 ,""
- 4310 DATA "ABCDEFG", 8 , 9 ,""
- 4320 DATA "ABCDEFG", 9 ,-2 ,""
- 4330 DATA "ABCDEFG", 9 ,-1 ,""
- 4340 DATA "ABCDEFG", 9 , 0 ,""
- 4350 DATA "ABCDEFG", 9 , 1 ,""
- 4360 DATA "ABCDEFG", 9 , 2 ,""
- 4370 DATA "ABCDEFG", 9 , 3 ,""
- 4380 DATA "ABCDEFG", 9 , 4 ,""
- 4390 DATA "ABCDEFG", 9 , 5 ,""
- 4400 DATA "ABCDEFG", 9 , 6 ,""
- 4410 DATA "ABCDEFG", 9 , 7 ,""
- 4420 DATA "ABCDEFG", 9 , 8 ,""
- 4430 DATA "ABCDEFG", 9 , 9 ,""
- 5000 DATA "",-2 ,-2 ,"WXYZ"
- 5010 DATA "",-2 ,-1 ,"WXYZ"
- 5020 DATA "",-2 , 0 ,"WXYZ"
- 5030 DATA "",-2 , 1 ,"WXYZ"
- 5040 DATA "",-2 , 2 ,"WXYZ"
- 5050 DATA "",-1 ,-2 ,"WXYZ"
- 5060 DATA "",-1 ,-1 ,"WXYZ"
- 5070 DATA "",-1 , 0 ,"WXYZ"
- 5080 DATA "",-1 , 1 ,"WXYZ"
- 5090 DATA "",-1 , 2 ,"WXYZ"
- 5100 DATA "", 0 ,-2 ,"WXYZ"
- 5110 DATA "", 0 ,-1 ,"WXYZ"
- 5120 DATA "", 0 , 0 ,"WXYZ"
- 5130 DATA "", 0 , 1 ,"WXYZ"
- 5140 DATA "", 0 , 2 ,"WXYZ"
- 5150 DATA "", 1 ,-2 ,"WXYZ"
- 5160 DATA "", 1 ,-1 ,"WXYZ"
- 5170 DATA "", 1 , 0 ,"WXYZ"
- 5180 DATA "", 1 , 1 ,"WXYZ"
- 5190 DATA "", 1 , 2 ,"WXYZ"
- 5200 DATA "", 2 ,-2 ,"WXYZ"
- 5210 DATA "", 2 ,-1 ,"WXYZ"
- 5220 DATA "", 2 , 0 ,"WXYZ"
- 5230 DATA "", 2 , 1 ,"WXYZ"
- 5240 DATA "", 2 , 2 ,"WXYZ"
- 7000 DATA "",-2 ,-2 ,""
- 7010 DATA "",-2 ,-1 ,""
- 7020 DATA "",-2 , 0 ,""
- 7030 DATA "",-2 , 1 ,""
- 7040 DATA "",-2 , 2 ,""
- 7050 DATA "",-1 ,-2 ,""
- 7060 DATA "",-1 ,-1 ,""
- 7070 DATA "",-1 , 0 ,""
- 7080 DATA "",-1 , 1 ,""
- 7090 DATA "",-1 , 2 ,""
- 7100 DATA "", 0 ,-2 ,""
- 7110 DATA "", 0 ,-1 ,""
- 7120 DATA "", 0 , 0 ,""
- 7130 DATA "", 0 , 1 ,""
- 7140 DATA "", 0 , 2 ,""
- 7150 DATA "", 1 ,-2 ,""
- 7160 DATA "", 1 ,-1 ,""
- 7170 DATA "", 1 , 0 ,""
- 7180 DATA "", 1 , 1 ,""
- 7190 DATA "", 1 , 2 ,""
- 7200 DATA "", 2 ,-2 ,""
- 7210 DATA "", 2 ,-1 ,""
- 7220 DATA "", 2 , 0 ,""
- 7230 DATA "", 2 , 1 ,""
- 7240 DATA "", 2 , 2 ,""
- 7500 DATA "A",-2 ,-2 ,"W"
- 7510 DATA "A",-2 ,-1 ,"W"
- 7520 DATA "A",-2 , 0 ,"W"
- 7530 DATA "A",-2 , 1 ,"W"
- 7540 DATA "A",-2 , 2 ,"W"
- 7550 DATA "A",-2 , 3 ,"W"
- 7560 DATA "A",-1 ,-2 ,"W"
- 7570 DATA "A",-1 ,-1 ,"W"
- 7580 DATA "A",-1 , 0 ,"W"
- 7590 DATA "A",-1 , 1 ,"W"
- 7600 DATA "A",-1 , 2 ,"W"
- 7610 DATA "A",-1 , 3 ,"W"
- 7620 DATA "A", 0 ,-2 ,"W"
- 7630 DATA "A", 0 ,-1 ,"W"
- 7640 DATA "A", 0 , 0 ,"W"
- 7650 DATA "A", 0 , 1 ,"W"
- 7660 DATA "A", 0 , 2 ,"W"
- 7670 DATA "A", 0 , 3 ,"W"
- 7680 DATA "A", 1 ,-2 ,"W"
- 7690 DATA "A", 1 ,-1 ,"W"
- 7700 DATA "A", 1 , 0 ,"W"
- 7710 DATA "A", 1 , 1 ,"W"
- 7720 DATA "A", 1 , 2 ,"W"
- 7730 DATA "A", 1 , 3 ,"W"
- 7740 DATA "A", 2 ,-2 ,"W"
- 7750 DATA "A", 2 ,-1 ,"W"
- 7760 DATA "A", 2 , 0 ,"W"
- 7770 DATA "A", 2 , 1 ,"W"
- 7780 DATA "A", 2 , 2 ,"W"
- 7790 DATA "A", 2 , 3 ,"W"
- 7800 DATA "A", 3 ,-2 ,"W"
- 7810 DATA "A", 3 ,-1 ,"W"
- 7820 DATA "A", 3 , 0 ,"W"
- 7830 DATA "A", 3 , 1 ,"W"
- 7840 DATA "A", 3 , 2 ,"W"
- 7850 DATA "A", 3 , 3 ,"W"
- 8000 DATA "A",-2 ,-2 ,""
- 8010 DATA "A",-2 ,-1 ,""
- 8020 DATA "A",-2 , 0 ,""
- 8030 DATA "A",-2 , 1 ,""
- 8040 DATA "A",-2 , 2 ,""
- 8050 DATA "A",-2 , 3 ,""
- 8060 DATA "A",-1 ,-2 ,""
- 8070 DATA "A",-1 ,-1 ,""
- 8080 DATA "A",-1 , 0 ,""
- 8090 DATA "A",-1 , 1 ,""
- 8100 DATA "A",-1 , 2 ,""
- 8110 DATA "A",-1 , 3 ,""
- 8120 DATA "A", 0 ,-2 ,""
- 8130 DATA "A", 0 ,-1 ,""
- 8140 DATA "A", 0 , 0 ,""
- 8150 DATA "A", 0 , 1 ,""
- 8160 DATA "A", 0 , 2 ,""
- 8170 DATA "A", 0 , 3 ,""
- 8180 DATA "A", 1 ,-2 ,""
- 8190 DATA "A", 1 ,-1 ,""
- 8200 DATA "A", 1 , 0 ,""
- 8210 DATA "A", 1 , 1 ,""
- 8220 DATA "A", 1 , 2 ,""
- 8230 DATA "A", 1 , 3 ,""
- 8240 DATA "A", 2 ,-2 ,""
- 8250 DATA "A", 2 ,-1 ,""
- 8260 DATA "A", 2 , 0 ,""
- 8270 DATA "A", 2 , 1 ,""
- 8280 DATA "A", 2 , 2 ,""
- 8290 DATA "A", 2 , 3 ,""
- 8300 DATA "A", 3 ,-2 ,""
- 8310 DATA "A", 3 ,-1 ,""
- 8320 DATA "A", 3 , 0 ,""
- 8330 DATA "A", 3 , 1 ,""
- 8340 DATA "A", 3 , 2 ,""
- 8350 DATA "A", 3 , 3 ,""
- 8500 DATA "",-2 ,-2 ,"W"
- 8510 DATA "",-2 ,-1 ,"W"
- 8520 DATA "",-2 , 0 ,"W"
- 8530 DATA "",-2 , 1 ,"W"
- 8540 DATA "",-2 , 2 ,"W"
- 8550 DATA "",-1 ,-2 ,"W"
- 8560 DATA "",-1 ,-1 ,"W"
- 8570 DATA "",-1 , 0 ,"W"
- 8580 DATA "",-1 , 1 ,"W"
- 8590 DATA "",-1 , 2 ,"W"
- 8600 DATA "", 0 ,-2 ,"W"
- 8610 DATA "", 0 ,-1 ,"W"
- 8620 DATA "", 0 , 0 ,"W"
- 8630 DATA "", 0 , 1 ,"W"
- 8640 DATA "", 0 , 2 ,"W"
- 8650 DATA "", 1 ,-2 ,"W"
- 8660 DATA "", 1 ,-1 ,"W"
- 8670 DATA "", 1 , 0 ,"W"
- 8680 DATA "", 1 , 1 ,"W"
- 8690 DATA "", 1 , 2 ,"W"
- 8700 DATA "", 2 ,-2 ,"W"
- 8710 DATA "", 2 ,-1 ,"W"
- 8720 DATA "", 2 , 0 ,"W"
- 8730 DATA "", 2 , 1 ,"W"
- 8740 DATA "", 2 , 2 ,"W"
- 9990 DATA "*"
- 9999 END
diff --git a/bwbtest/B93/00readme.txt b/bwbtest/B93/00readme.txt
deleted file mode 100644
index 0000c2a..0000000
--- a/bwbtest/B93/00readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-These programs are part of regression testing.
diff --git a/bwbtest/B93/00test.sh b/bwbtest/B93/00test.sh
deleted file mode 100644
index ce3b337..0000000
--- a/bwbtest/B93/00test.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-# Puropose: Verify existing BWBASIC behavior
-# Author: Howard Wulf, AF5NE
-# Date: 2014-02-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/bwbtest
-# ash ./00test.sh
-#
-
-rm *.80
-rm *.OUT
-rm *.LPT
-rm *.dif
-
-# ----------------------------------------------
-# Regression Tests
-# ----------------------------------------------
-testcase()
-{
- TESTCASE=${1}
- echo "TESTCASE=${TESTCASE}"
- ~/bwbasic --tape ${TESTCASE}.INP --profile B93.PRO --profile ${TESTCASE}.PRO ${TESTCASE}.BAS 1> ${TESTCASE}.OUT 2> ${TESTCASE}.LPT
-
-
- echo "500 DATA ${TESTCASE}.OUT, ${TESTCASE}.80" > PAD80.INP
- ~/bwbasic --profile PAD80.PRO PAD80.BAS
-
-
- diff ${TESTCASE}.run ${TESTCASE}.80 > ${TESTCASE}.dif
- if test -s ${TESTCASE}.dif
- then
- echo less ${TESTCASE}.dif
- fi
-}
-
-# ---------------------------------------------
-
-# testcase abs
-testcase assign
-testcase callfunc
-testcase callsub
-testcase chain1
-testcase chain2
-testcase dataread
-testcase deffn
-testcase dim
-testcase doloop
-testcase dowhile
-testcase elseif
-testcase end
-testcase err
-testcase fncallfn
-testcase fornext
-testcase function
-testcase gosub
-testcase gotolabl
-testcase ifline
-testcase input
-testcase lof
-testcase loopuntl
-testcase main
-testcase mlifthen
-testcase on
-testcase onerr
-testcase onerrlbl
-testcase ongosub
-testcase opentest
-testcase option
-testcase pascaltr
-testcase putget
-testcase random
-testcase selcase
-testcase snglfunc
-testcase stop
-testcase term
-testcase whilwend
-testcase width
-testcase writeinp
-#testcase error1
-#testcase error2
-#testcase error3
-#testcase error4
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/B93/01test.sh b/bwbtest/B93/01test.sh
deleted file mode 100644
index 64c51bc..0000000
--- a/bwbtest/B93/01test.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-# Filename: 01test.sh
-# Purpose: automted regression review
-# Author: Howard Wulf, AF5NE
-# Date: 2015-01-29
-# Uasage: implementation defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic/NBS2
-# ash ./01test.sh
-#
-#
-
-# review ERRORS
-cat *.dif > dif.OUT
-if test -s dif.OUT
-then
- pwd > dif.OUT
- cat *.dif >> dif.OUT
- less dif.OUT
-fi
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/B93/02ok.sh b/bwbtest/B93/02ok.sh
deleted file mode 100644
index 118fddc..0000000
--- a/bwbtest/B93/02ok.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Puropose: Promote current results to regression
-# Author: Howard Wulf
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/bwskytel
-# ash ./01ok.sh
-#
-
-for f in *.80; do mv "$f" "${f/.80/.run}"; done
-# EOF
diff --git a/bwbtest/B93/99test.sh b/bwbtest/B93/99test.sh
deleted file mode 100644
index 5532865..0000000
--- a/bwbtest/B93/99test.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-# Puropose: Cleanup after tests have passed
-# Author: Howard Wulf, AF5NE
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/BP100
-# ash ./99test.sh
-#
-
-rm *.80
-rm *.OUT
-rm *.LPT
-rm *.dif
-
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/B93/B93.PRO b/bwbtest/B93/B93.PRO
deleted file mode 100644
index 256baf5..0000000
--- a/bwbtest/B93/B93.PRO
+++ /dev/null
@@ -1 +0,0 @@
-OPTION VERSION "BYWATER-2"
diff --git a/bwbtest/B93/PAD80.BAS b/bwbtest/B93/PAD80.BAS
deleted file mode 100644
index 2a293c3..0000000
--- a/bwbtest/B93/PAD80.BAS
+++ /dev/null
@@ -1,44 +0,0 @@
-010 REM OPTION VERSION BYWATER
-020 REM
-100 REM PAD80.BAS
-101 REM Pad the test output to 80 characters.
-102 REM bwbasic P001.BAS > P001.OUT
-103 REM echo "500 DATA P001.OUT, P001.80" > PAD80.INP
-104 REM bwbasic PAD80.BAS
-105 REM diff P001.run P001.80
-109 REM ----------------------------------------------------------
-120 REM GET FILE NAME INTO A$
-122 DELETE 500
-124 MERGE "PAD80.INP"
-126 REM LIST
-128 RESTORE 500
-130 READ A$
-135 REM PRINT "SOURCE:"; A$
-140 READ B$
-145 REM PRINT "TARGET:"; B$
-300 REM ----------------------------------------------------------
-301 REM PROCESS FILENAME IN A$
-302 REM ----------------------------------------------------------
-310 OPEN A$ FOR INPUT AS #2
-315 OPEN B$ FOR OUTPUT AS #3
-320 REM PRINT "PROCESS TEXT LINE"
-330 IF EOF( 2 ) THEN 390
-335 REM PRINT "NOT EOF"
-340 LINE INPUT #2, C$
-345 REM PRINT "C$=";C$
-350 C$ = LEFT$( C$ + SPACE$( 80 ), 80 )
-355 REM PRINT "yyy"
-360 REM WRITE OUTPUT LINE
-370 PRINT #3, C$
-375 REM PRINT "zzz"
-380 GOTO 320
-390 REM CLOSE FILES
-400 CLOSE #3
-410 CLOSE #2
-499 REM ----------------------------------------------------------
-500 REM REPLACED BY CONTENTS OF "PAD80.INP"
-501 REM ----------------------------------------------------------
-900 REM ----------------------------------------------------------
-910 REM THE END
-920 REM ----------------------------------------------------------
-999 END
diff --git a/bwbtest/B93/PAD80.INP b/bwbtest/B93/PAD80.INP
deleted file mode 100644
index 2712f34..0000000
--- a/bwbtest/B93/PAD80.INP
+++ /dev/null
@@ -1 +0,0 @@
-500 DATA writeinp.OUT, writeinp.80
diff --git a/bwbtest/B93/PAD80.PRO b/bwbtest/B93/PAD80.PRO
deleted file mode 100644
index 4c31bf5..0000000
--- a/bwbtest/B93/PAD80.PRO
+++ /dev/null
@@ -1,2 +0,0 @@
-OPTION VERSION "BYWATER"
-OPTION LABELS OFF
diff --git a/bwbtest/B93/assign.run b/bwbtest/B93/assign.run
deleted file mode 100644
index f160add..0000000
--- a/bwbtest/B93/assign.run
+++ /dev/null
@@ -1,2 +0,0 @@
-TEST.BAS -- TEST
-X is 7
diff --git a/bwbtest/B93/callfunc.run b/bwbtest/B93/callfunc.run
deleted file mode 100644
index edfedfb..0000000
--- a/bwbtest/B93/callfunc.run
+++ /dev/null
@@ -1,14 +0,0 @@
-CallFunc.BAS -- Test BASIC User-defined Function Statements
-The next printed line should be from the Function.
-
-This is written from the Function.
-The value of variable is 5
-The value of variable is Hello
-The value of variable is 17
-The value of variable is reset to 99
-The Function should return 104
-
-This is back at the main program.
-The value of variable is now 17
-The returned value from the function is 104
-Did it work?
diff --git a/bwbtest/B93/callsub.bas b/bwbtest/B93/callsub.bas
deleted file mode 100644
index e08e04d..0000000
--- a/bwbtest/B93/callsub.bas
+++ /dev/null
@@ -1,34 +0,0 @@
-
-rem ----------------------------------------------------
-rem CallSub.BAS
-rem ----------------------------------------------------
-
-Print "CallSub.BAS -- Test BASIC Call and Sub Statements"
-Print "The next printed line should be from the Subroutine."
-Print
-testvar = 17
-
-REM bwBASIC 3.20 CALL requires parenthesis
-REM Call TestSub 5, "Hello", testvar
-Call TestSub( 5, "Hello", testvar )
-
-Print
-Print "This is back at the main program. "
-Print "The value of variable is now "; testvar
-
-Print "Did it work?"
-End
-
-rem ----------------------------------------------------
-rem Subroutine TestSub
-rem ----------------------------------------------------
-
-Sub TestSub( xarg, yarg$, tvar )
- Print "This is written from the Subroutine."
- Print "The value of variable is"; xarg
- Print "The value of variable is "; yarg$
- Print "The value of variable is "; tvar
- tvar = 99
- Print "The value of variable is reset to "; tvar
-End Sub
-
diff --git a/bwbtest/B93/callsub.run b/bwbtest/B93/callsub.run
deleted file mode 100644
index ce661ec..0000000
--- a/bwbtest/B93/callsub.run
+++ /dev/null
@@ -1,12 +0,0 @@
-CallSub.BAS -- Test BASIC Call and Sub Statements
-The next printed line should be from the Subroutine.
-
-This is written from the Subroutine.
-The value of variable is 5
-The value of variable is Hello
-The value of variable is 17
-The value of variable is reset to 99
-
-This is back at the main program.
-The value of variable is now 17
-Did it work?
diff --git a/bwbtest/B93/chain1.run b/bwbtest/B93/chain1.run
deleted file mode 100644
index dc7fb99..0000000
--- a/bwbtest/B93/chain1.run
+++ /dev/null
@@ -1,6 +0,0 @@
-This is program CHAIN1.BAS
-The value of X is 5.6789
-We shall no pass execution to program CHAIN2.BAS...
-This is program CHAIN2.BAS
-The value of X is now 5.6789
-This concludes our CHAIN test.
diff --git a/bwbtest/B93/chain2.run b/bwbtest/B93/chain2.run
deleted file mode 100644
index 944fef8..0000000
--- a/bwbtest/B93/chain2.run
+++ /dev/null
@@ -1,3 +0,0 @@
-This is program CHAIN2.BAS
-The value of X is now 0
-This concludes our CHAIN test.
diff --git a/bwbtest/B93/data.tmp b/bwbtest/B93/data.tmp
deleted file mode 100644
index 408b6b0..0000000
--- a/bwbtest/B93/data.tmp
+++ /dev/null
@@ -1 +0,0 @@
-"String 1",1.12346,"String 2",2.23457,"String 3",3.34568
diff --git a/bwbtest/B93/dataread.run b/bwbtest/B93/dataread.run
deleted file mode 100644
index 60299f5..0000000
--- a/bwbtest/B93/dataread.run
+++ /dev/null
@@ -1,4 +0,0 @@
-DATAREAD.BAS -- Test DATA, READ, and RESTORE Statements
-Data read: Ted 56.789 Dale 45.678
-After RESTORE:
-Data read: Ted 56.789 Dale 45.678
diff --git a/bwbtest/B93/deffn.run b/bwbtest/B93/deffn.run
deleted file mode 100644
index 5c4be7f..0000000
--- a/bwbtest/B93/deffn.run
+++ /dev/null
@@ -1,3 +0,0 @@
-DEFFN.BAS -- Test DEF FN Statement
- 5
-Correct
diff --git a/bwbtest/B93/dim.run b/bwbtest/B93/dim.run
deleted file mode 100644
index e104629..0000000
--- a/bwbtest/B93/dim.run
+++ /dev/null
@@ -1,6 +0,0 @@
-The value at position 0 is 2
-The value at position 1 is 3
-The value at position 2 is 4
-The value at position 3 is 5
-The value at position 4 is 6
-The value at position 5 is 7
diff --git a/bwbtest/B93/doloop.run b/bwbtest/B93/doloop.run
deleted file mode 100644
index 46d5c3c..0000000
--- a/bwbtest/B93/doloop.run
+++ /dev/null
@@ -1,14 +0,0 @@
-i is 1
-i is 2
-i is 3
-i is 4
-i is 5
-i is 6
-i is 7
-i is 8
-i is 9
-i is 10
-i is 11
-i is 12
-i is 13
-End
diff --git a/bwbtest/B93/dowhile.run b/bwbtest/B93/dowhile.run
deleted file mode 100644
index 90353ba..0000000
--- a/bwbtest/B93/dowhile.run
+++ /dev/null
@@ -1,77 +0,0 @@
-START
-x is 0
-y is 0
-y is 1
-x is 1
-y is 0
-y is 1
-x is 2
-y is 0
-y is 1
-x is 3
-y is 0
-y is 1
-x is 4
-y is 0
-y is 1
-x is 5
-y is 0
-y is 1
-x is 6
-y is 0
-y is 1
-x is 7
-y is 0
-y is 1
-x is 8
-y is 0
-y is 1
-x is 9
-y is 0
-y is 1
-x is 10
-y is 0
-y is 1
-x is 11
-y is 0
-y is 1
-x is 12
-y is 0
-y is 1
-x is 13
-y is 0
-y is 1
-x is 14
-y is 0
-y is 1
-x is 15
-y is 0
-y is 1
-x is 16
-y is 0
-y is 1
-x is 17
-y is 0
-y is 1
-x is 18
-y is 0
-y is 1
-x is 19
-y is 0
-y is 1
-x is 20
-y is 0
-y is 1
-x is 21
-y is 0
-y is 1
-x is 22
-y is 0
-y is 1
-x is 23
-y is 0
-y is 1
-x is 24
-y is 0
-y is 1
-END
diff --git a/bwbtest/B93/elseif.INP b/bwbtest/B93/elseif.INP
deleted file mode 100644
index 7ed6ff8..0000000
--- a/bwbtest/B93/elseif.INP
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/bwbtest/B93/elseif.run b/bwbtest/B93/elseif.run
deleted file mode 100644
index f1b51f0..0000000
--- a/bwbtest/B93/elseif.run
+++ /dev/null
@@ -1,6 +0,0 @@
-ELSEIF.BAS -- Test MultiLine IF-THEN-ELSE Constructions
-
-The program should detect if the number you enter is 4 or 5 or 6.
-Please enter a number, 1-9? 5
-The number is 5.
-This concludes our test.
diff --git a/bwbtest/B93/end.run b/bwbtest/B93/end.run
deleted file mode 100644
index f89e2f5..0000000
--- a/bwbtest/B93/end.run
+++ /dev/null
@@ -1,2 +0,0 @@
-END.BAS -- Test END Statement
-If the program ends after this line, END worked OK.
diff --git a/bwbtest/B93/err.run b/bwbtest/B93/err.run
deleted file mode 100644
index f2b87d8..0000000
--- a/bwbtest/B93/err.run
+++ /dev/null
@@ -1,2 +0,0 @@
-
-ERROR in line 20: Subscript out of range
diff --git a/bwbtest/B93/fncallfn.run b/bwbtest/B93/fncallfn.run
deleted file mode 100644
index bbb61b1..0000000
--- a/bwbtest/B93/fncallfn.run
+++ /dev/null
@@ -1,3 +0,0 @@
-Test user-defined function calling user-defined function
-The result should be: 2.45678
-The result is: : 2.45678
diff --git a/bwbtest/B93/fornext.run b/bwbtest/B93/fornext.run
deleted file mode 100644
index 2ba3db4..0000000
--- a/bwbtest/B93/fornext.run
+++ /dev/null
@@ -1,24 +0,0 @@
-FORNEXT.BAS: Test FOR-NEXT Statements
-A FOR-NEXT Loop with STEP statement:
-FOR: i is 1
-FOR: i is 3
-FOR: i is 5
-FOR: i is 7
-FOR: i is 9
-FOR: i is 11
-FOR: i is 13
-FOR: i is 15
-FOR: i is 17
-FOR: i is 19
-FOR: i is 21
-FOR: i is 23
-FOR: i is 25
-FOR: i is 27
-FOR: i is 29
-A FOR-NEXT Loop without STEP statement:
-FOR: i is 2
-FOR: i is 3
-FOR: i is 4
-FOR: i is 5
-FOR: i is 6
-FOR: i is 7
diff --git a/bwbtest/B93/function.INP b/bwbtest/B93/function.INP
deleted file mode 100644
index 88f774c..0000000
--- a/bwbtest/B93/function.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-c
-A
-B
diff --git a/bwbtest/B93/function.run b/bwbtest/B93/function.run
deleted file mode 100644
index 4d49c13..0000000
--- a/bwbtest/B93/function.run
+++ /dev/null
@@ -1,48 +0,0 @@
-ABS(-2.2): 2.2
-DATE$: <03/07/2017>
-TIME$: <07:41:18>
-ATN(-2.2): -1.14417
-COS(-2.2): -.588501
-LOG(2.2): .788457
-SIN(-2.2): -.808496
-SQR(2.2): 1.48324
-TAN(-2.2): 1.37382
-SGN(-2.2): -1
-INT(-2.2): -3
-Paused? c
-RND(-2.2): .396465
-CHR$(&h60): `
-TAB(52): < >
-SPC(5): < >
-SPACE$(5): < >
-STRING$(5,X):
-MID$(0123456789, 5, 4): <4567>
-LEFT$(0123456789, 5): <01234>
-RIGHT$(0123456789, 5): <56789>
-TIMER: 27678
-Paused? A
-VAL(X): 0
-ERR: 0
-ERL: 0
-LEN(0123456789): 10
-CSNG(-2.2): -2.2
-EXP(-2.2): .110803
-INSTR(0123456789, 234): 3
-STR$(-2.2): <-2.2>
-HEX$(27): <1B>
-Paused? B
-OCT$(27): <33>
-CINT(-2.2): -2
-ASC(0123456789): 48
-ENVIRON$(PATH):
-MKD$(17): <>
-MKI$(17): < >
-MKS$(17): <>
-CVD(MKD$(17)): 17
-CVS(MKS$(17)): 17
-CVI(MKI$(17)): 17
diff --git a/bwbtest/B93/gosub.INP b/bwbtest/B93/gosub.INP
deleted file mode 100644
index c9046ae..0000000
--- a/bwbtest/B93/gosub.INP
+++ /dev/null
@@ -1,3 +0,0 @@
-1
-a
-9
diff --git a/bwbtest/B93/gosub.run b/bwbtest/B93/gosub.run
deleted file mode 100644
index 1ff06e3..0000000
--- a/bwbtest/B93/gosub.run
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Test GOSUB Statements
----------------------
-
-1 - Run Subroutine
-9 - Exit to system
-x - Exit to BASIC
-
-? 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-This is the subroutine.
-Press any key: ? a
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Test GOSUB Statements
----------------------
-
-1 - Run Subroutine
-9 - Exit to system
-x - Exit to BASIC
-
-? 9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Exit from Bywater BASIC Test Program
-
diff --git a/bwbtest/B93/gotolabl.run b/bwbtest/B93/gotolabl.run
deleted file mode 100644
index f8404bf..0000000
--- a/bwbtest/B93/gotolabl.run
+++ /dev/null
@@ -1,4 +0,0 @@
-Hello
-This is the subroutine.
-This is the sub-subroutine.
-Goodbye
diff --git a/bwbtest/B93/ifline.run b/bwbtest/B93/ifline.run
deleted file mode 100644
index 963f2f7..0000000
--- a/bwbtest/B93/ifline.run
+++ /dev/null
@@ -1 +0,0 @@
-The program succeeded
diff --git a/bwbtest/B93/index.txt b/bwbtest/B93/index.txt
deleted file mode 100644
index 39c8b94..0000000
--- a/bwbtest/B93/index.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-Test Programs for bwBASIC:
--------------------------
-
-___ ___ ABS BAS
-___ ___ ASSIGN BAS
-___ ___ CALLFUNC BAS * STRUCT_CMDS
-___ ___ CALLSUB BAS * STRUCT_CMDS
-___ ___ CHAIN1 BAS
-___ ___ CHAIN2 BAS * called from CHAIN1.BAS
-___ ___ DATAREAD BAS
-___ ___ DEFFN BAS
-___ ___ DIM BAS
-___ ___ DOLOOP BAS * STRUCT_CMDS
-___ ___ DOWHILE BAS * STRUCT_CMDS
-___ ___ ELSEIF BAS * STRUCT_CMDS
-___ ___ END BAS
-___ ___ ERR BAS
-___ ___ FORNEXT BAS
-___ ___ FUNCTION BAS
-___ ___ GOSUB BAS
-___ ___ GOTOLABL BAS * STRUCT_CMDS
-___ ___ IFLINE BAS
-___ ___ INPUT BAS
-___ ___ LOF BAS * LOF(): IMPLEMENTATION-SPECIFIC
-___ ___ LOOPUNTL BAS * STRUCT_CMDS
-___ ___ MAIN BAS * STRUCT_CMDS
-___ ___ MLIFTHEN BAS * STRUCT_CMDS
-___ ___ ON BAS
-___ ___ ONERR BAS
-___ ___ ONERRLBL BAS * STRUCT_CMDS
-___ ___ ONGOSUB BAS
-___ ___ OPENTEST BAS
-___ ___ OPTION BAS
-___ ___ PUTGET BAS * KILL: IMPLEMENTATION-SPECIFIC
-___ ___ RANDOM BAS
-___ ___ SELCASE BAS * STRUCT_CMDS
-___ ___ SNGLFUNC BAS
-___ ___ STOP BAS
-___ ___ TERM BAS
-___ ___ WHILWEND BAS
-___ ___ WIDTH BAS
-___ ___ WRITEINP BAS
-
diff --git a/bwbtest/B93/input.INP b/bwbtest/B93/input.INP
deleted file mode 100644
index 7e00f52..0000000
--- a/bwbtest/B93/input.INP
+++ /dev/null
@@ -1 +0,0 @@
-abc,123
diff --git a/bwbtest/B93/input.run b/bwbtest/B93/input.run
deleted file mode 100644
index 95e528d..0000000
--- a/bwbtest/B93/input.run
+++ /dev/null
@@ -1,4 +0,0 @@
-INPUT.BAS -- Test INPUT Statement
-Input string, number: ? abc,123
-The string is: abc
-The number is: 123
diff --git a/bwbtest/B93/lof.INP b/bwbtest/B93/lof.INP
deleted file mode 100644
index 7e1bde0..0000000
--- a/bwbtest/B93/lof.INP
+++ /dev/null
@@ -1 +0,0 @@
-lof.bas
diff --git a/bwbtest/B93/lof.run b/bwbtest/B93/lof.run
deleted file mode 100644
index 1fcc4fa..0000000
--- a/bwbtest/B93/lof.run
+++ /dev/null
@@ -1,3 +0,0 @@
-Test LOF() Function
-Filename? lof.bas
-Length of file lof.bas is 142 bytes
diff --git a/bwbtest/B93/loopuntl.run b/bwbtest/B93/loopuntl.run
deleted file mode 100644
index 255bc69..0000000
--- a/bwbtest/B93/loopuntl.run
+++ /dev/null
@@ -1,13 +0,0 @@
-Value of i is 1
-Value of i is 2
-Value of i is 3
-Value of i is 4
-Value of i is 5
-Value of i is 6
-Value of i is 7
-Value of i is 8
-Value of i is 9
-Value of i is 10
-Value of i is 11
-Value of i is 12
-Value of i is 13
diff --git a/bwbtest/B93/main.bas b/bwbtest/B93/main.bas
deleted file mode 100644
index 0c7f72e..0000000
--- a/bwbtest/B93/main.bas
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Sub Prior
- Print "This is a subroutine prior to MAIN."
- Print "This should not print."
-End Sub
-
-Sub Main
- Print "This is the MAIN subroutine."
- Print "This should print."
-End Sub
-
-Sub Subsequent
- Print "This is a subroutine subsequent to MAIN."
- Print "This should not print."
-End Sub
-
-REM bwBASIC 3.20 does not automatically call SUB MAIN
-main
diff --git a/bwbtest/B93/main.run b/bwbtest/B93/main.run
deleted file mode 100644
index fc4edc9..0000000
--- a/bwbtest/B93/main.run
+++ /dev/null
@@ -1,2 +0,0 @@
-This is the MAIN subroutine.
-This should print.
diff --git a/bwbtest/B93/mlifthen.run b/bwbtest/B93/mlifthen.run
deleted file mode 100644
index b153c40..0000000
--- a/bwbtest/B93/mlifthen.run
+++ /dev/null
@@ -1,4 +0,0 @@
-MLIFTHEN.BAS -- Test MultiLine IF-THEN-ELSE Constructions
-The condition is false.
-And it still is false.
-This concludes our test.
diff --git a/bwbtest/B93/on.INP b/bwbtest/B93/on.INP
deleted file mode 100644
index 7ed6ff8..0000000
--- a/bwbtest/B93/on.INP
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/bwbtest/B93/on.run b/bwbtest/B93/on.run
deleted file mode 100644
index 778dcd6..0000000
--- a/bwbtest/B93/on.run
+++ /dev/null
@@ -1,3 +0,0 @@
-ON.BAS -- Test ON...GOTO Statement
-Enter a number 1-5:? 5
-You entered 5
diff --git a/bwbtest/B93/onerr.run b/bwbtest/B93/onerr.run
deleted file mode 100644
index d0419fd..0000000
--- a/bwbtest/B93/onerr.run
+++ /dev/null
@@ -1,6 +0,0 @@
-Test bwBASIC ON ERROR GOSUB statement
-The next line will include an error
-This is the error handler
-The error number is 13
-The error line is 50
-This is the line after the error
diff --git a/bwbtest/B93/onerrlbl.run b/bwbtest/B93/onerrlbl.run
deleted file mode 100644
index acc9477..0000000
--- a/bwbtest/B93/onerrlbl.run
+++ /dev/null
@@ -1,6 +0,0 @@
-Test bwBASIC ON ERROR GOSUB statement
-The next line will include an error
-This is the error handler
-The error number is 13
-The error line is 5
-This is the line after the error
diff --git a/bwbtest/B93/ongosub.INP b/bwbtest/B93/ongosub.INP
deleted file mode 100644
index 7ed6ff8..0000000
--- a/bwbtest/B93/ongosub.INP
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/bwbtest/B93/ongosub.run b/bwbtest/B93/ongosub.run
deleted file mode 100644
index 66af63b..0000000
--- a/bwbtest/B93/ongosub.run
+++ /dev/null
@@ -1,4 +0,0 @@
-ONGOSUB.BAS -- Test ON..GOSUB Statement
-Enter a number 1-5? 5
-You entered 5
-The End
diff --git a/bwbtest/B93/opentest.run b/bwbtest/B93/opentest.run
deleted file mode 100644
index 05008fe..0000000
--- a/bwbtest/B93/opentest.run
+++ /dev/null
@@ -1,4 +0,0 @@
-OPENTEST.BAS -- Test OPEN, PRINT#, LINE INPUT#, and CLOSE
-Read from file:
->This is line 1.
->This is line 2.
diff --git a/bwbtest/B93/option.run b/bwbtest/B93/option.run
deleted file mode 100644
index 5d64184..0000000
--- a/bwbtest/B93/option.run
+++ /dev/null
@@ -1,6 +0,0 @@
-OPTION.BAS -- Test OPTION BASE Statement
-The value at position 1 is 3
-The value at position 2 is 4
-The value at position 3 is 5
-The value at position 4 is 6
-The value at position 5 is 7
diff --git a/bwbtest/B93/pascaltr.run b/bwbtest/B93/pascaltr.run
deleted file mode 100644
index 3e69331..0000000
--- a/bwbtest/B93/pascaltr.run
+++ /dev/null
@@ -1,14 +0,0 @@
- 0 : 1
- 1 : 1 1
- 2 : 1 2 1
- 3 : 1 3 3 1
- 4 : 1 4 6 4 1
- 5 : 1 5 10 10 5 1
- 6 : 1 6 15 20 15 6 1
- 7 : 1 7 21 35 35 21 7 1
- 8 : 1 8 28 56 70 56 28 8 1
- 9 : 1 9 36 84 126 126 84 36 9 1
- 10 : 1 10 45 120 210 252 210 120 45 10 1
- 11 : 1 11 55 165 330 462 462 330 165 55 11 1
- 12 : 1 12 66 220 495 792 924 792 495 220 66 12 1
- 13 : 1 13 78 286 715 1287 1716 1716 1287 715 286 78 13 1
diff --git a/bwbtest/B93/putget.INP b/bwbtest/B93/putget.INP
deleted file mode 100644
index 2f51905..0000000
--- a/bwbtest/B93/putget.INP
+++ /dev/null
@@ -1,6 +0,0 @@
-abc
-123 main
-111-222-3333
-xyz
-987 any street
-999-888-7777
diff --git a/bwbtest/B93/putget.run b/bwbtest/B93/putget.run
deleted file mode 100644
index 8c8335a..0000000
--- a/bwbtest/B93/putget.run
+++ /dev/null
@@ -1,8 +0,0 @@
-name: abc
-address: 123 main
-phone: 111-222-3333
-name: xyz
-address: 987 any street
-phone: 999-888-7777
-abc 123 main 111-222-
-xyz 987 any street 999-888-
diff --git a/bwbtest/B93/random.run b/bwbtest/B93/random.run
deleted file mode 100644
index 40a1a81..0000000
--- a/bwbtest/B93/random.run
+++ /dev/null
@@ -1,10 +0,0 @@
-This is a first sequence of three RND numbers:
- .10793
- .109362
- .531097
-This is a second sequence of three RND numbers:
- .782371
- .79199
- .823117
-The second sequence should have been differrent
-from the first.
diff --git a/bwbtest/B93/selcase.run b/bwbtest/B93/selcase.run
deleted file mode 100644
index e69de29..0000000
diff --git a/bwbtest/B93/snglfunc.run b/bwbtest/B93/snglfunc.run
deleted file mode 100644
index 4e2f96c..0000000
--- a/bwbtest/B93/snglfunc.run
+++ /dev/null
@@ -1,5 +0,0 @@
-SnglFunc.BAS -- Test Single-Line User-defined Function Statement
-
-
-The sum of 6 and 4 is 10
-Did it work properly?
diff --git a/bwbtest/B93/stop.run b/bwbtest/B93/stop.run
deleted file mode 100644
index 838ba4c..0000000
--- a/bwbtest/B93/stop.run
+++ /dev/null
@@ -1,4 +0,0 @@
-STOP.BAS -- Test STOP Statement
-If the program is interrupted after this line, STOP worked OK
-
-Program interrupted at line 40
diff --git a/bwbtest/B93/term.INP b/bwbtest/B93/term.INP
deleted file mode 100644
index 8baef1b..0000000
--- a/bwbtest/B93/term.INP
+++ /dev/null
@@ -1 +0,0 @@
-abc
diff --git a/bwbtest/B93/term.run b/bwbtest/B93/term.run
deleted file mode 100644
index e49fe2d..0000000
--- a/bwbtest/B93/term.run
+++ /dev/null
@@ -1,2 +0,0 @@
- [2J Bywater BASIC
-? abc
diff --git a/bwbtest/B93/test.out b/bwbtest/B93/test.out
deleted file mode 100644
index f9d10fb..0000000
--- a/bwbtest/B93/test.out
+++ /dev/null
@@ -1,2 +0,0 @@
-This is line 1.
-This is line 2.
diff --git a/bwbtest/B93/whilwend.run b/bwbtest/B93/whilwend.run
deleted file mode 100644
index 90353ba..0000000
--- a/bwbtest/B93/whilwend.run
+++ /dev/null
@@ -1,77 +0,0 @@
-START
-x is 0
-y is 0
-y is 1
-x is 1
-y is 0
-y is 1
-x is 2
-y is 0
-y is 1
-x is 3
-y is 0
-y is 1
-x is 4
-y is 0
-y is 1
-x is 5
-y is 0
-y is 1
-x is 6
-y is 0
-y is 1
-x is 7
-y is 0
-y is 1
-x is 8
-y is 0
-y is 1
-x is 9
-y is 0
-y is 1
-x is 10
-y is 0
-y is 1
-x is 11
-y is 0
-y is 1
-x is 12
-y is 0
-y is 1
-x is 13
-y is 0
-y is 1
-x is 14
-y is 0
-y is 1
-x is 15
-y is 0
-y is 1
-x is 16
-y is 0
-y is 1
-x is 17
-y is 0
-y is 1
-x is 18
-y is 0
-y is 1
-x is 19
-y is 0
-y is 1
-x is 20
-y is 0
-y is 1
-x is 21
-y is 0
-y is 1
-x is 22
-y is 0
-y is 1
-x is 23
-y is 0
-y is 1
-x is 24
-y is 0
-y is 1
-END
diff --git a/bwbtest/B93/width.run b/bwbtest/B93/width.run
deleted file mode 100644
index 4476b6e..0000000
--- a/bwbtest/B93/width.run
+++ /dev/null
@@ -1 +0,0 @@
-Check file to see if the printing wrapped at col 35
diff --git a/bwbtest/B93/writeinp.run b/bwbtest/B93/writeinp.run
deleted file mode 100644
index 5e42a4f..0000000
--- a/bwbtest/B93/writeinp.run
+++ /dev/null
@@ -1,6 +0,0 @@
-WRITEINP.BAS -- Test WRITE # and INPUT # Statements
-This is what was written:
-"String 1",1.12346,"String 2",2.23457,"String 3",3.34568
-This is what was read:
-"String 1",1.12346,"String 2",2.23457,"String 3",3.34568
-End of WRITEINP.BAS
diff --git a/bwbtest/C77A/00test.sh b/bwbtest/C77A/00test.sh
deleted file mode 100644
index 3281d19..0000000
--- a/bwbtest/C77A/00test.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-# Puropose: Verify existing BWBASIC behavior
-# Author: Howard Wulf, AF5NE
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/BP100
-# ash ./00test.sh
-#
-
-rm *.80
-rm *.OUT
-rm *.LPT
-rm *.dif
-rm *.TXT
-
-# ----------------------------------------------
-# Regression Tests
-# ----------------------------------------------
-testcase()
-{
- TESTCASE=${1}
- echo "TESTCASE=${TESTCASE}"
- ~/bwbasic --tape ${TESTCASE}.INP --profile C77.PRO --profile ${TESTCASE}.PRO ${TESTCASE}.BAS 1> ${TESTCASE}.OUT 2> ${TESTCASE}.LPT
-
-
- echo "500 DATA ${TESTCASE}.OUT, ${TESTCASE}.80" > PAD80.INP
- ~/bwbasic --profile PAD80.PRO PAD80.BAS
-
-
- diff ${TESTCASE}.run ${TESTCASE}.80 > ${TESTCASE}.dif
- if test -s ${TESTCASE}.dif
- then
- echo less ${TESTCASE}.dif
- fi
-}
-
-# ---------------------------------------------
-
-testcase FILE_1
-testcase FILE_2
-testcase FILE_3
-testcase FILE_4
-testcase FILE_5
-testcase FILE_6
-testcase QUOTE_1
-testcase QUOTE_2
-testcase QUOTE_3
-testcase INPUT_1
-testcase CONSOLE_1
-testcase LPRINTER_1
-testcase CREATE_1
-testcase CREATE_2
-testcase IF_END_1
-testcase IF_END_2
-testcase RETURN_1
-testcase RETURN_2
-testcase RETURN_3
-testcase DELETE_1
-testcase MATCH_1
-testcase USING_1
-testcase READ_1
-testcase READ_2
-testcase EX_1
-testcase EX_2
-testcase EX_3
-testcase EX_4
-testcase SIZE_1
-
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/C77A/01test.sh b/bwbtest/C77A/01test.sh
deleted file mode 100644
index 64c51bc..0000000
--- a/bwbtest/C77A/01test.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-# Filename: 01test.sh
-# Purpose: automted regression review
-# Author: Howard Wulf, AF5NE
-# Date: 2015-01-29
-# Uasage: implementation defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic/NBS2
-# ash ./01test.sh
-#
-#
-
-# review ERRORS
-cat *.dif > dif.OUT
-if test -s dif.OUT
-then
- pwd > dif.OUT
- cat *.dif >> dif.OUT
- less dif.OUT
-fi
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/C77A/02ok.sh b/bwbtest/C77A/02ok.sh
deleted file mode 100644
index 65099a4..0000000
--- a/bwbtest/C77A/02ok.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Puropose: Promote current results to regression
-# Author: Howard Wulf
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/BP100
-# ash ./01ok.sh
-#
-
-for f in *.80; do mv "$f" "${f/.80/.run}"; done
-# EOF
diff --git a/bwbtest/C77A/99test.sh b/bwbtest/C77A/99test.sh
deleted file mode 100644
index 3b7101d..0000000
--- a/bwbtest/C77A/99test.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-# Puropose: Cleanup after tests have passed
-# Author: Howard Wulf, AF5NE
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/BP100
-# ash ./99test.sh
-#
-
-rm *.80
-rm *.OUT
-rm *.LPT
-rm *.dif
-rm *.TXT
-
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/C77A/C77.PRO b/bwbtest/C77A/C77.PRO
deleted file mode 100644
index f272d01..0000000
--- a/bwbtest/C77A/C77.PRO
+++ /dev/null
@@ -1 +0,0 @@
-OPTION VERSION "CBASIC-II"
diff --git a/bwbtest/C77A/CONSOLE_1.BAS b/bwbtest/C77A/CONSOLE_1.BAS
deleted file mode 100644
index e277037..0000000
--- a/bwbtest/C77A/CONSOLE_1.BAS
+++ /dev/null
@@ -1,15 +0,0 @@
-100 REM Purpose: Verify CONSOLE command
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-22
-130 REM
-200 REM The following string is 70 characters long
-210 LET A$ = "....+....|....+....|....+....|....+....|....+....|....+....|....+....|"
-300 CONSOLE
-310 PRINT A$
-320 CONSOLE WIDTH 70
-330 PRINT A$
-340 CONSOLE WIDTH 40
-350 PRINT A$
-360 CONSOLE WIDTH 80
-370 PRINT A$
-999 END
diff --git a/bwbtest/C77A/CONSOLE_1.run b/bwbtest/C77A/CONSOLE_1.run
deleted file mode 100644
index 323819f..0000000
--- a/bwbtest/C77A/CONSOLE_1.run
+++ /dev/null
@@ -1,6 +0,0 @@
-....+....|....+....|....+....|....+....|....+....|....+....|....+....|
-....+....|....+....|....+....|....+....|....+....|....+....|....+....|
-
-....+....|....+....|....+....|....+....|
-....+....|....+....|....+....|
-....+....|....+....|....+....|....+....|....+....|....+....|....+....|
diff --git a/bwbtest/C77A/CREATE_1.BAS b/bwbtest/C77A/CREATE_1.BAS
deleted file mode 100644
index 8563744..0000000
--- a/bwbtest/C77A/CREATE_1.BAS
+++ /dev/null
@@ -1,18 +0,0 @@
-100 REM Purpose: Verify CREATE command
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-200 CREATE "CREATE_1.TXT" AS 777
-210 FOR I = 1 TO 10
-220 LET A$ = "THIS IS LINE " + STR$(I)
-230 PRINT # 777; A$
-240 NEXT I
-250 CLOSE 777
-300 OPEN "CREATE_1.TXT" AS 333
-310 FOR I = 1 TO 10
-320 READ # 333; B$
-330 PRINT B$
-340 NEXT I
-350 CLOSE 333
-999 END
-
diff --git a/bwbtest/C77A/CREATE_1.run b/bwbtest/C77A/CREATE_1.run
deleted file mode 100644
index 45ea093..0000000
--- a/bwbtest/C77A/CREATE_1.run
+++ /dev/null
@@ -1,10 +0,0 @@
-THIS IS LINE 1
-THIS IS LINE 2
-THIS IS LINE 3
-THIS IS LINE 4
-THIS IS LINE 5
-THIS IS LINE 6
-THIS IS LINE 7
-THIS IS LINE 8
-THIS IS LINE 9
-THIS IS LINE 10
diff --git a/bwbtest/C77A/CREATE_2.BAS b/bwbtest/C77A/CREATE_2.BAS
deleted file mode 100644
index f897e9f..0000000
--- a/bwbtest/C77A/CREATE_2.BAS
+++ /dev/null
@@ -1,19 +0,0 @@
-100 REM Purpose: Verify CREATE command
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-
-200 CREATE "CREATE_2.TXT" RECL 64 AS 777
-210 FOR I = 10 TO 1 STEP -1
-220 LET A$ = "THIS IS LINE " + STR$(I)
-230 PRINT # 777, I; A$
-240 NEXT I
-250 CLOSE 777
-300 OPEN "CREATE_2.TXT" RECL 64 AS 333
-310 FOR I = 10 TO 1 STEP -1
-320 READ # 333, I; B$
-330 PRINT B$
-340 NEXT I
-350 CLOSE 333
-999 END
-
diff --git a/bwbtest/C77A/CREATE_2.run b/bwbtest/C77A/CREATE_2.run
deleted file mode 100644
index 61e8d70..0000000
--- a/bwbtest/C77A/CREATE_2.run
+++ /dev/null
@@ -1,10 +0,0 @@
-THIS IS LINE 10
-THIS IS LINE 9
-THIS IS LINE 8
-THIS IS LINE 7
-THIS IS LINE 6
-THIS IS LINE 5
-THIS IS LINE 4
-THIS IS LINE 3
-THIS IS LINE 2
-THIS IS LINE 1
diff --git a/bwbtest/C77A/DELETE_1.BAS b/bwbtest/C77A/DELETE_1.BAS
deleted file mode 100644
index 6dea688..0000000
--- a/bwbtest/C77A/DELETE_1.BAS
+++ /dev/null
@@ -1,16 +0,0 @@
-100 REM Purpose: Verify CREATE command
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-200 CREATE "DELETE_1.TXT" AS 777
-210 FOR I = 1 TO 10
-220 LET A$ = "THIS IS LINE " + STR$(I)
-230 PRINT # 777; A$
-240 NEXT I
-250 DELETE 777
-300 IF END 333 THEN 500
-310 OPEN "DELETE_1.TXT" AS 333
-320 PRINT "TEST FAILED - FILE NOT DELETED"
-330 GOTO 999
-500 PRINT "TEST PASSED"
-999 END
diff --git a/bwbtest/C77A/DELETE_1.run b/bwbtest/C77A/DELETE_1.run
deleted file mode 100644
index 113ce39..0000000
--- a/bwbtest/C77A/DELETE_1.run
+++ /dev/null
@@ -1 +0,0 @@
-TEST PASSED
diff --git a/bwbtest/C77A/EX_1.BAS b/bwbtest/C77A/EX_1.BAS
deleted file mode 100644
index bc73d58..0000000
--- a/bwbtest/C77A/EX_1.BAS
+++ /dev/null
@@ -1,14 +0,0 @@
-REM Purpose: Verify example program
-REM Refer:
-REM Page: 3
-REM
-
-
-PRINT
-FOR I% = 1 TO 10
-PRINT I%; "TESTING CBASIC!"
-NEXT I%
-PRINT
-PRINT "FINISHED"
-END
-
\ No newline at end of file
diff --git a/bwbtest/C77A/EX_1.run b/bwbtest/C77A/EX_1.run
deleted file mode 100644
index dce276f..0000000
--- a/bwbtest/C77A/EX_1.run
+++ /dev/null
@@ -1,13 +0,0 @@
-
- 1 TESTING CBASIC!
- 2 TESTING CBASIC!
- 3 TESTING CBASIC!
- 4 TESTING CBASIC!
- 5 TESTING CBASIC!
- 6 TESTING CBASIC!
- 7 TESTING CBASIC!
- 8 TESTING CBASIC!
- 9 TESTING CBASIC!
- 10 TESTING CBASIC!
-
-FINISHED
diff --git a/bwbtest/C77A/EX_2.BAS b/bwbtest/C77A/EX_2.BAS
deleted file mode 100644
index 74ac069..0000000
--- a/bwbtest/C77A/EX_2.BAS
+++ /dev/null
@@ -1,22 +0,0 @@
-REM Purpose: Verify exmple program
-REM Refer:
-REM Page: 6
-REM
-
-LET A$ = """Hello,"" said Tom."
-PRINT "[";A$;"]"
-
-LET A$ = "July 4, 1778"
-PRINT "[";A$;"]"
-
-LET A$ = "Enter your naMe please:"
-PRINT "[";A$;"]"
-
-LET A$ = """\"" has no special Meanin!f inside a string."
-PRINT "[";A$;"]"
-
-LET A$ = ""
-PRINT "[";A$;"]"
-
-END
-
diff --git a/bwbtest/C77A/EX_2.run b/bwbtest/C77A/EX_2.run
deleted file mode 100644
index 9c70324..0000000
--- a/bwbtest/C77A/EX_2.run
+++ /dev/null
@@ -1,5 +0,0 @@
-["Hello," said Tom.]
-[July 4, 1778]
-[Enter your naMe please:]
-["\" has no special Meanin!f inside a string.]
-[]
diff --git a/bwbtest/C77A/EX_3.BAS b/bwbtest/C77A/EX_3.BAS
deleted file mode 100644
index dae97a2..0000000
--- a/bwbtest/C77A/EX_3.BAS
+++ /dev/null
@@ -1,56 +0,0 @@
-REM Purpose: Verify example program
-REM Refer:
-REM Page: 7
-REM
-
-
-LET X = 1
-PRINT X
-
-LET X = 1.0
-PRINT X
-
-LET X = -88
-PRINT X
-
-LET X = 123458.788
-PRINT X
-
-LET X = 1.883
-PRINT X
-
-LET X = .01
-PRINT X
-
-LET X = 11E12
-PRINT X
-
-LET X = 1.77E-8
-PRINT X
-
-LET X = 1.5E+3
-PRINT X
-
-LET X = 1500
-PRINT X
-
-LET X = 1.5E-3
-PRINT X
-
-LET X = .0015
-PRINT X
-
-REM LET I% = 1abOH
-LET I% = &h1ab0
-PRINT I%
-
-REM LET I% = 10111110B
-LET I% = &hDE
-PRINT I%
-
-REM LET I% = 07FFFH
-LET I% = &h07FFF
-PRINT I%
-
-
-END
diff --git a/bwbtest/C77A/EX_3.run b/bwbtest/C77A/EX_3.run
deleted file mode 100644
index 98601e4..0000000
--- a/bwbtest/C77A/EX_3.run
+++ /dev/null
@@ -1,15 +0,0 @@
- 1
- 1
--88
- 123459.
- 1.883
- .01
- 1.1E+13
- 1.77E-8
- 1500
- 1500
- .0015
- .0015
- 6832
- 222
- 32767
diff --git a/bwbtest/C77A/EX_4.BAS b/bwbtest/C77A/EX_4.BAS
deleted file mode 100644
index 5162069..0000000
--- a/bwbtest/C77A/EX_4.BAS
+++ /dev/null
@@ -1,23 +0,0 @@
-REM Purpose: Verify example program
-REM Refer:
-REM Page: 11
-REM
-
-
-PRINT 12 AND 3
-PRINT &HC AND &H5
-PRINT NOT -1
-PRINT NOT &H3
-PRINT 12 OR 3
-PRINT &H0C OR &H5
-
-LET I% = 12.11
-LET J% = 3.2
-PRINT I% XOR J%
-
-LET I% = 12.11
-LET J% = 3.7
-PRINT I% XOR J%
-
-
-END
diff --git a/bwbtest/C77A/EX_4.run b/bwbtest/C77A/EX_4.run
deleted file mode 100644
index 43a17e5..0000000
--- a/bwbtest/C77A/EX_4.run
+++ /dev/null
@@ -1,8 +0,0 @@
- 0
- 4
- 0
--4
- 15
- 13
- 15
- 8
diff --git a/bwbtest/C77A/FILE_1.BAS b/bwbtest/C77A/FILE_1.BAS
deleted file mode 100644
index 539def5..0000000
--- a/bwbtest/C77A/FILE_1.BAS
+++ /dev/null
@@ -1,50 +0,0 @@
- 100 rem Purpose: verify the FILE command
- 110 rem Author: Howard Wulf, AF5NE
- 120 rem Date: 2015-12-20
- 130 rem Note: OPTION VERSION CBASIC-II
- 140 rem
- 200 RESTORE
- : LET A$ = "FILE.TXT"
- 210 PRINT "ABOUT TO OPEN FILE"
- : FILE A$(64)
- : PRINT "FILE WAS OPENED"
- 230 READ B,B$
- : IF B = 0 OR B$ = "ZZZ" GOTO 250
- : LET B$ = "THIS IS THE " + B$ + " RECORD"
- : PRINT #1, B; B$
- : GOTO 230
- 250 PRINT "ABOUT TO CLOSE FILE"
- : CLOSE 1
- : PRINT "FILE WAS CLOSED"
- 260 PRINT "ABOUT TO OPEN FILE"
- : FILE A$(64)
- : PRINT "FILE WAS OPENED"
- 270 FOR I = 1 TO 9
- : READ #2, I; B$
- : PRINT B$
- : NEXT I
- 300 FOR I = 9 TO 1 STEP -1
- : READ #2, I; B$
- : PRINT B$
- : NEXT I
- 310 READ #2, 1 ;
- 320 FOR I = 1 TO 9
- : READ #2 ; B$
- : PRINT B$
- : NEXT I
- 330 PRINT "ABOUT TO CLOSE FILE"
- : CLOSE 2
- : PRINT "FILE WAS CLOSED"
- 800 REM quasi-random order
- 810 DATA 7,7th
- 820 DATA 2,2nd
- 830 DATA 9,9th
- 840 DATA 4,4th
- 850 DATA 6,6th
- 860 DATA 1,1st
- 870 DATA 5,5th
- 880 DATA 3,3rd
- 890 DATA 8,8th
- 900 DATA 0,ZZZ
- 999 END
-
diff --git a/bwbtest/C77A/FILE_1.run b/bwbtest/C77A/FILE_1.run
deleted file mode 100644
index 99c8edd..0000000
--- a/bwbtest/C77A/FILE_1.run
+++ /dev/null
@@ -1,35 +0,0 @@
-ABOUT TO OPEN FILE
-FILE WAS OPENED
-ABOUT TO CLOSE FILE
-FILE WAS CLOSED
-ABOUT TO OPEN FILE
-FILE WAS OPENED
-THIS IS THE 1st RECORD
-THIS IS THE 2nd RECORD
-THIS IS THE 3rd RECORD
-THIS IS THE 4th RECORD
-THIS IS THE 5th RECORD
-THIS IS THE 6th RECORD
-THIS IS THE 7th RECORD
-THIS IS THE 8th RECORD
-THIS IS THE 9th RECORD
-THIS IS THE 9th RECORD
-THIS IS THE 8th RECORD
-THIS IS THE 7th RECORD
-THIS IS THE 6th RECORD
-THIS IS THE 5th RECORD
-THIS IS THE 4th RECORD
-THIS IS THE 3rd RECORD
-THIS IS THE 2nd RECORD
-THIS IS THE 1st RECORD
-THIS IS THE 1st RECORD
-THIS IS THE 2nd RECORD
-THIS IS THE 3rd RECORD
-THIS IS THE 4th RECORD
-THIS IS THE 5th RECORD
-THIS IS THE 6th RECORD
-THIS IS THE 7th RECORD
-THIS IS THE 8th RECORD
-THIS IS THE 9th RECORD
-ABOUT TO CLOSE FILE
-FILE WAS CLOSED
diff --git a/bwbtest/C77A/FILE_2.BAS b/bwbtest/C77A/FILE_2.BAS
deleted file mode 100644
index ea916b4..0000000
--- a/bwbtest/C77A/FILE_2.BAS
+++ /dev/null
@@ -1,42 +0,0 @@
- 100 rem Purpose: verify the FILE command
- 110 rem Author: Howard Wulf, AF5NE
- 120 rem Date: 2015-12-20
- 130 rem Note: OPTION VERSION CBASIC-II
- 140 rem
- 200 RESTORE
- : LET A$ = "FILE.TXT"
- 210 PRINT "ABOUT TO OPEN FILE"
- : FILE A$(64)
- : PRINT "FILE WAS OPENED"
- 230 READ B,B$
- : IF B = 0 OR B$ = "ZZZ" GOTO 250
- : LET B$ = "THIS IS THE " + B$ + " RECORD"
- : PRINT #1, B; B$
- : GOTO 230
- 250 REM
- 270 FOR I = 1 TO 9
- : READ #1, I; B$
- : PRINT B$
- : NEXT I
- 300 FOR I = 9 TO 1 STEP -1
- : READ #1, I; B$
- : PRINT B$
- : NEXT I
- 310 READ #1, 1 ;
- 320 FOR I = 1 TO 9
- : READ #1 ; B$
- : PRINT B$
- : NEXT I
- 800 REM quasi-random order
- 810 DATA 7,7th
- 820 DATA 2,2nd
- 830 DATA 9,9th
- 840 DATA 4,4th
- 850 DATA 6,6th
- 860 DATA 1,1st
- 870 DATA 5,5th
- 880 DATA 3,3rd
- 890 DATA 8,8th
- 900 DATA 0,ZZZ
- 999 END
-
diff --git a/bwbtest/C77A/FILE_2.run b/bwbtest/C77A/FILE_2.run
deleted file mode 100644
index 343191d..0000000
--- a/bwbtest/C77A/FILE_2.run
+++ /dev/null
@@ -1,29 +0,0 @@
-ABOUT TO OPEN FILE
-FILE WAS OPENED
-THIS IS THE 1st RECORD
-THIS IS THE 2nd RECORD
-THIS IS THE 3rd RECORD
-THIS IS THE 4th RECORD
-THIS IS THE 5th RECORD
-THIS IS THE 6th RECORD
-THIS IS THE 7th RECORD
-THIS IS THE 8th RECORD
-THIS IS THE 9th RECORD
-THIS IS THE 9th RECORD
-THIS IS THE 8th RECORD
-THIS IS THE 7th RECORD
-THIS IS THE 6th RECORD
-THIS IS THE 5th RECORD
-THIS IS THE 4th RECORD
-THIS IS THE 3rd RECORD
-THIS IS THE 2nd RECORD
-THIS IS THE 1st RECORD
-THIS IS THE 1st RECORD
-THIS IS THE 2nd RECORD
-THIS IS THE 3rd RECORD
-THIS IS THE 4th RECORD
-THIS IS THE 5th RECORD
-THIS IS THE 6th RECORD
-THIS IS THE 7th RECORD
-THIS IS THE 8th RECORD
-THIS IS THE 9th RECORD
diff --git a/bwbtest/C77A/FILE_3.BAS b/bwbtest/C77A/FILE_3.BAS
deleted file mode 100644
index e9c3758..0000000
--- a/bwbtest/C77A/FILE_3.BAS
+++ /dev/null
@@ -1,44 +0,0 @@
- 100 rem Purpose: verify the FILE command
- 110 rem Author: Howard Wulf, AF5NE
- 120 rem Date: 2015-12-20
- 130 rem Note: OPTION VERSION CBASIC-II
- 140 rem
- 200 RESTORE
- : LET A$ = "FILE.TXT"
- 210 PRINT "ABOUT TO OPEN FILE"
- : FILE A$(64)
- : PRINT "FILE WAS OPENED"
- 230 READ B,B$
- : IF B = 0 OR B$ = "ZZZ" GOTO 250
- : LET B$ = "THIS IS THE " + B$ + " RECORD"
- : LET C = B
- : LET D = 10 - C
- : PRINT #1, B; B$,C,D
- : GOTO 230
- 250 REM
- 270 FOR I = 1 TO 9
- : READ #1, I; B$,C,D
- : PRINT B$,C,D
- : NEXT I
- 300 FOR I = 9 TO 1 STEP -1
- : READ #1, I; B$,C,D
- : PRINT B$,C,D
- : NEXT I
- 310 READ #1, 1 ;
- 320 FOR I = 1 TO 9
- : READ #1 ; B$,C,D
- : PRINT B$,C,D
- : NEXT I
- 800 REM quasi-random order
- 810 DATA 7,7th
- 820 DATA 2,2nd
- 830 DATA 9,9th
- 840 DATA 4,4th
- 850 DATA 6,6th
- 860 DATA 1,1st
- 870 DATA 5,5th
- 880 DATA 3,3rd
- 890 DATA 8,8th
- 900 DATA 0,ZZZ
- 999 END
-
diff --git a/bwbtest/C77A/FILE_3.run b/bwbtest/C77A/FILE_3.run
deleted file mode 100644
index 76c2f52..0000000
--- a/bwbtest/C77A/FILE_3.run
+++ /dev/null
@@ -1,29 +0,0 @@
-ABOUT TO OPEN FILE
-FILE WAS OPENED
-THIS IS THE 1st RECORD 1 9
-THIS IS THE 2nd RECORD 2 8
-THIS IS THE 3rd RECORD 3 7
-THIS IS THE 4th RECORD 4 6
-THIS IS THE 5th RECORD 5 5
-THIS IS THE 6th RECORD 6 4
-THIS IS THE 7th RECORD 7 3
-THIS IS THE 8th RECORD 8 2
-THIS IS THE 9th RECORD 9 1
-THIS IS THE 9th RECORD 9 1
-THIS IS THE 8th RECORD 8 2
-THIS IS THE 7th RECORD 7 3
-THIS IS THE 6th RECORD 6 4
-THIS IS THE 5th RECORD 5 5
-THIS IS THE 4th RECORD 4 6
-THIS IS THE 3rd RECORD 3 7
-THIS IS THE 2nd RECORD 2 8
-THIS IS THE 1st RECORD 1 9
-THIS IS THE 1st RECORD 1 9
-THIS IS THE 2nd RECORD 2 8
-THIS IS THE 3rd RECORD 3 7
-THIS IS THE 4th RECORD 4 6
-THIS IS THE 5th RECORD 5 5
-THIS IS THE 6th RECORD 6 4
-THIS IS THE 7th RECORD 7 3
-THIS IS THE 8th RECORD 8 2
-THIS IS THE 9th RECORD 9 1
diff --git a/bwbtest/C77A/FILE_4.BAS b/bwbtest/C77A/FILE_4.BAS
deleted file mode 100644
index 33f158c..0000000
--- a/bwbtest/C77A/FILE_4.BAS
+++ /dev/null
@@ -1,45 +0,0 @@
- 100 rem Purpose: verify the FILE command
- 110 rem Author: Howard Wulf, AF5NE
- 120 rem Date: 2015-12-20
- 130 rem Note: OPTION VERSION CBASIC-II
- 140 rem
- 200 RESTORE
- : LET A$ = "FILE.TXT"
- 210 PRINT "ABOUT TO OPEN FILE"
- : FILE A$(64)
- : PRINT "FILE WAS OPENED"
- 230 READ B,B$
- : IF B = 0 OR B$ = "ZZZ" GOTO 250
- : LET B$ = "THIS IS THE "+B$+" RECORD"
- : LET C = B
- : LET D = 10 - C
- : LET E$ = "NOT " + STR$(D)
- : PRINT #1, B; B$,C,D,E$
- : GOTO 230
- 250 REM
- 270 FOR I = 1 TO 9
- : READ #1, I; B$,C,D,E$
- : PRINT B$,C,D,E$
- : NEXT I
- 300 FOR I = 9 TO 1 STEP -1
- : READ #1, I; B$,C,D,E$
- : PRINT B$,C,D,E$
- : NEXT I
- 310 READ #1, 1 ;
- 320 FOR I = 1 TO 9
- : READ #1 ; B$,C,D,E$
- : PRINT B$,C,D,E$
- : NEXT I
- 800 REM quasi-random order
- 810 DATA 7,7th
- 820 DATA 2,2nd
- 830 DATA 9,9th
- 840 DATA 4,4th
- 850 DATA 6,6th
- 860 DATA 1,1st
- 870 DATA 5,5th
- 880 DATA 3,3rd
- 890 DATA 8,8th
- 900 DATA 0,ZZZ
- 999 END
-
diff --git a/bwbtest/C77A/FILE_4.run b/bwbtest/C77A/FILE_4.run
deleted file mode 100644
index 68a7494..0000000
--- a/bwbtest/C77A/FILE_4.run
+++ /dev/null
@@ -1,29 +0,0 @@
-ABOUT TO OPEN FILE
-FILE WAS OPENED
-THIS IS THE 1st RECORD 1 9 NOT 9
-THIS IS THE 2nd RECORD 2 8 NOT 8
-THIS IS THE 3rd RECORD 3 7 NOT 7
-THIS IS THE 4th RECORD 4 6 NOT 6
-THIS IS THE 5th RECORD 5 5 NOT 5
-THIS IS THE 6th RECORD 6 4 NOT 4
-THIS IS THE 7th RECORD 7 3 NOT 3
-THIS IS THE 8th RECORD 8 2 NOT 2
-THIS IS THE 9th RECORD 9 1 NOT 1
-THIS IS THE 9th RECORD 9 1 NOT 1
-THIS IS THE 8th RECORD 8 2 NOT 2
-THIS IS THE 7th RECORD 7 3 NOT 3
-THIS IS THE 6th RECORD 6 4 NOT 4
-THIS IS THE 5th RECORD 5 5 NOT 5
-THIS IS THE 4th RECORD 4 6 NOT 6
-THIS IS THE 3rd RECORD 3 7 NOT 7
-THIS IS THE 2nd RECORD 2 8 NOT 8
-THIS IS THE 1st RECORD 1 9 NOT 9
-THIS IS THE 1st RECORD 1 9 NOT 9
-THIS IS THE 2nd RECORD 2 8 NOT 8
-THIS IS THE 3rd RECORD 3 7 NOT 7
-THIS IS THE 4th RECORD 4 6 NOT 6
-THIS IS THE 5th RECORD 5 5 NOT 5
-THIS IS THE 6th RECORD 6 4 NOT 4
-THIS IS THE 7th RECORD 7 3 NOT 3
-THIS IS THE 8th RECORD 8 2 NOT 2
-THIS IS THE 9th RECORD 9 1 NOT 1
diff --git a/bwbtest/C77A/FILE_5.BAS b/bwbtest/C77A/FILE_5.BAS
deleted file mode 100644
index bf81f6c..0000000
--- a/bwbtest/C77A/FILE_5.BAS
+++ /dev/null
@@ -1,47 +0,0 @@
- 100 rem Purpose: verify the FILE command
- 110 rem Author: Howard Wulf, AF5NE
- 120 rem Date: 2015-12-20
- 130 rem Note: OPTION VERSION CBASIC-II
- 140 rem
- 200 RESTORE
- : LET A$ = "FILE.TXT"
- 210 PRINT "ABOUT TO OPEN FILE"
- : FILE A$(64)
- : PRINT "FILE WAS OPENED"
- 230 READ B,B$
- : IF B = 0 OR B$ = "ZZZ" GOTO 250
- : LET B$ = "THIS IS THE "+B$+" RECORD"
- : LET C = B
- : LET D = 10 - C
- : LET E$ = "NOT " + STR$(D)
- : LET F$ = "*****"
- : PRINT #1, B; B$,C,D,E$,F$
- : GOTO 230
- 250 REM test imcomplete RANDOM READ
- 260 REM note F$ is not READ below
- 270 FOR I = 1 TO 9
- : READ #1, I; B$,C,D,E$
- : PRINT B$,C,D,E$
- : NEXT I
- 300 FOR I = 9 TO 1 STEP -1
- : READ #1, I; B$,C,D,E$
- : PRINT B$,C,D,E$
- : NEXT I
- 310 READ #1, 1 ;
- 320 FOR I = 1 TO 9
- : READ #1 ; B$,C,D,E$
- : PRINT B$,C,D,E$
- : NEXT I
- 800 REM quasi-random order
- 810 DATA 7,7th
- 820 DATA 2,2nd
- 830 DATA 9,9th
- 840 DATA 4,4th
- 850 DATA 6,6th
- 860 DATA 1,1st
- 870 DATA 5,5th
- 880 DATA 3,3rd
- 890 DATA 8,8th
- 900 DATA 0,ZZZ
- 999 END
-
diff --git a/bwbtest/C77A/FILE_5.run b/bwbtest/C77A/FILE_5.run
deleted file mode 100644
index 68a7494..0000000
--- a/bwbtest/C77A/FILE_5.run
+++ /dev/null
@@ -1,29 +0,0 @@
-ABOUT TO OPEN FILE
-FILE WAS OPENED
-THIS IS THE 1st RECORD 1 9 NOT 9
-THIS IS THE 2nd RECORD 2 8 NOT 8
-THIS IS THE 3rd RECORD 3 7 NOT 7
-THIS IS THE 4th RECORD 4 6 NOT 6
-THIS IS THE 5th RECORD 5 5 NOT 5
-THIS IS THE 6th RECORD 6 4 NOT 4
-THIS IS THE 7th RECORD 7 3 NOT 3
-THIS IS THE 8th RECORD 8 2 NOT 2
-THIS IS THE 9th RECORD 9 1 NOT 1
-THIS IS THE 9th RECORD 9 1 NOT 1
-THIS IS THE 8th RECORD 8 2 NOT 2
-THIS IS THE 7th RECORD 7 3 NOT 3
-THIS IS THE 6th RECORD 6 4 NOT 4
-THIS IS THE 5th RECORD 5 5 NOT 5
-THIS IS THE 4th RECORD 4 6 NOT 6
-THIS IS THE 3rd RECORD 3 7 NOT 7
-THIS IS THE 2nd RECORD 2 8 NOT 8
-THIS IS THE 1st RECORD 1 9 NOT 9
-THIS IS THE 1st RECORD 1 9 NOT 9
-THIS IS THE 2nd RECORD 2 8 NOT 8
-THIS IS THE 3rd RECORD 3 7 NOT 7
-THIS IS THE 4th RECORD 4 6 NOT 6
-THIS IS THE 5th RECORD 5 5 NOT 5
-THIS IS THE 6th RECORD 6 4 NOT 4
-THIS IS THE 7th RECORD 7 3 NOT 3
-THIS IS THE 8th RECORD 8 2 NOT 2
-THIS IS THE 9th RECORD 9 1 NOT 1
diff --git a/bwbtest/C77A/FILE_6.BAS b/bwbtest/C77A/FILE_6.BAS
deleted file mode 100644
index e2c2710..0000000
--- a/bwbtest/C77A/FILE_6.BAS
+++ /dev/null
@@ -1,34 +0,0 @@
- 100 rem Purpose: verify the FILE command
- 110 rem Author: Howard Wulf, AF5NE
- 120 rem Date: 2015-12-20
- 130 rem Note: OPTION VERSION CBASIC-II
- 140 rem
- 200 RESTORE
- : LET A$ = "FILE.TXT"
- 210 PRINT "ABOUT TO OPEN FILE"
- : FILE A$(64)
- : PRINT "FILE WAS OPENED"
- 230 PRINT #1; "THIS IS THE 1st RECORD"
- : PRINT #1; "THIS IS THE 2nd RECORD"
- : PRINT #1; "THIS IS THE 3rd RECORD"
- : PRINT #1; "THIS IS THE 4th RECORD"
- : PRINT #1; "THIS IS THE 5th RECORD"
- : PRINT #1; "THIS IS THE 6th RECORD"
- : PRINT #1; "THIS IS THE 7th RECORD"
- : PRINT #1; "THIS IS THE 8th RECORD"
- : PRINT #1; "THIS IS THE 9th RECORD"
- 270 FOR I = 1 TO 9
- : READ #1, I; B$
- : PRINT B$
- : NEXT I
- 300 FOR I = 9 TO 1 STEP -1
- : READ #1, I; B$
- : PRINT B$
- : NEXT I
- 310 READ #1, 1 ;
- 320 FOR I = 1 TO 9
- : READ #1 ; B$
- : PRINT B$
- : NEXT I
- 999 END
-
diff --git a/bwbtest/C77A/FILE_6.run b/bwbtest/C77A/FILE_6.run
deleted file mode 100644
index 343191d..0000000
--- a/bwbtest/C77A/FILE_6.run
+++ /dev/null
@@ -1,29 +0,0 @@
-ABOUT TO OPEN FILE
-FILE WAS OPENED
-THIS IS THE 1st RECORD
-THIS IS THE 2nd RECORD
-THIS IS THE 3rd RECORD
-THIS IS THE 4th RECORD
-THIS IS THE 5th RECORD
-THIS IS THE 6th RECORD
-THIS IS THE 7th RECORD
-THIS IS THE 8th RECORD
-THIS IS THE 9th RECORD
-THIS IS THE 9th RECORD
-THIS IS THE 8th RECORD
-THIS IS THE 7th RECORD
-THIS IS THE 6th RECORD
-THIS IS THE 5th RECORD
-THIS IS THE 4th RECORD
-THIS IS THE 3rd RECORD
-THIS IS THE 2nd RECORD
-THIS IS THE 1st RECORD
-THIS IS THE 1st RECORD
-THIS IS THE 2nd RECORD
-THIS IS THE 3rd RECORD
-THIS IS THE 4th RECORD
-THIS IS THE 5th RECORD
-THIS IS THE 6th RECORD
-THIS IS THE 7th RECORD
-THIS IS THE 8th RECORD
-THIS IS THE 9th RECORD
diff --git a/bwbtest/C77A/IF_END_1.BAS b/bwbtest/C77A/IF_END_1.BAS
deleted file mode 100644
index 46ac562..0000000
--- a/bwbtest/C77A/IF_END_1.BAS
+++ /dev/null
@@ -1,12 +0,0 @@
-100 REM Purpose: Verify IF END command
-110 REM /Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-
-200 IF END # 777 THEN 500
-210 PRINT "ABOUT TO EXECUTE TEST"
-220 OPEN "NO SUCH FILE" AS # 777
-230 PRINT "TEST FAILED - 'IF END' DID NOT EXECUTE"
-240 GOTO 999
-500 PRINT "TEST PASSED"
-999 END
diff --git a/bwbtest/C77A/IF_END_1.run b/bwbtest/C77A/IF_END_1.run
deleted file mode 100644
index b2ba5fa..0000000
--- a/bwbtest/C77A/IF_END_1.run
+++ /dev/null
@@ -1,2 +0,0 @@
-ABOUT TO EXECUTE TEST
-TEST PASSED
diff --git a/bwbtest/C77A/IF_END_2.BAS b/bwbtest/C77A/IF_END_2.BAS
deleted file mode 100644
index b87cd34..0000000
--- a/bwbtest/C77A/IF_END_2.BAS
+++ /dev/null
@@ -1,35 +0,0 @@
-100 REM Purpose: Verify IF END command
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-200 REM -----------------------------------
-210 REM CREATE A FILE WITH 10 LINES
-220 REM -----------------------------------
-230 CREATE "IF_END_2.TXT" AS 777
-240 FOR I = 1 TO 10
-250 LET A$ = "THIS IS LINE " + STR$(I)
-260 PRINT # 777; A$
-270 NEXT I
-280 CLOSE 777
-300 REM -----------------------------------
-310 REM READ ALL 10 LINES
-320 REM -----------------------------------
-330 OPEN "IF_END_2.TXT" AS 333
-340 FOR I = 1 TO 10
-350 READ # 333; B$
-360 PRINT B$
-370 NEXT I
-400 REM -----------------------------------
-410 REM THE NEXT READ SHOULD CAUSE BRANCH
-420 REM -----------------------------------
-430 IF END #333 THEN 500
-440 PRINT "ABOUT TO EXECUTE TEST"
-450 READ # 333; B$
-460 PRINT "TEST FAILED - 'IF END' DID NOT EXECUTE"
-470 GOTO 999
-500 REM -----------------------------------
-510 REM END-OF-FILE HANDLER
-520 REM -----------------------------------
-530 PRINT "TEST PASSED"
-540 CLOSE 333
-999 END
diff --git a/bwbtest/C77A/IF_END_2.run b/bwbtest/C77A/IF_END_2.run
deleted file mode 100644
index 26b459c..0000000
--- a/bwbtest/C77A/IF_END_2.run
+++ /dev/null
@@ -1,12 +0,0 @@
-THIS IS LINE 1
-THIS IS LINE 2
-THIS IS LINE 3
-THIS IS LINE 4
-THIS IS LINE 5
-THIS IS LINE 6
-THIS IS LINE 7
-THIS IS LINE 8
-THIS IS LINE 9
-THIS IS LINE 10
-ABOUT TO EXECUTE TEST
-TEST PASSED
diff --git a/bwbtest/C77A/INPUT_1.BAS b/bwbtest/C77A/INPUT_1.BAS
deleted file mode 100644
index aac3ff0..0000000
--- a/bwbtest/C77A/INPUT_1.BAS
+++ /dev/null
@@ -1,51 +0,0 @@
- 100 REM Purpose: Verify INPUT statment
- 110 REM Author: Howard Wulf, AF5NE
- 120 REM
- 130 REM
- 200 LET N = 0
- 210 LET A$ = "123456789012345678901234567890"
-
- 300 PRINT "INPUT B$"
- :INPUT B$
- :GOSUB 8000
-
- 310 PRINT "INPUT LINE B$"
- :INPUT LINE B$
- :GOSUB 8000
-
- 320 PRINT "INPUT prompt B$"
- :INPUT "prompt" B$
- :GOSUB 8000
-
- 330 PRINT "INPUT prompt LINE B$"
- :INPUT "prompt" LINE B$
- :GOSUB 8000
-
- 340 PRINT "INPUT ; B$"
- :INPUT ; B$
- :GOSUB 8000
-
- 350 PRINT "INPUT ; LINE B$"
- :INPUT ; LINE B$
- :GOSUB 8000
-
- 360 PRINT "INPUT prompt ; B$"
- :INPUT "prompt" ; B$
- :GOSUB 8000
-
- 370 PRINT "INPUT prompt ; LINE B$"
- :INPUT "prompt" ; LINE B$
- :GOSUB 8000
-
- 7999 GOTO 9999
- 8000 REM -------------------------------
- 8010 REM PRINT RESULTS
- 8020 REM -------------------------
- 8030 LET N = N + 1
- 8040 PRINT "TESTCASE #";N
- 8050 PRINT "LENGTH", "[";A$;"]"
- 8060 PRINT LEN(B$) , "[";B$;"]"
- 8070 PRINT
- 8080 RETURN
- 9999 END
-
diff --git a/bwbtest/C77A/INPUT_1.INP b/bwbtest/C77A/INPUT_1.INP
deleted file mode 100644
index 442f089..0000000
--- a/bwbtest/C77A/INPUT_1.INP
+++ /dev/null
@@ -1,8 +0,0 @@
-abc
-abc,def,ghi,jkl
-abc
-abc,def,ghi,jkl
-abc
-abc,def,ghi,jkl
-abc
-abc,def,ghi,jkl
diff --git a/bwbtest/C77A/INPUT_1.run b/bwbtest/C77A/INPUT_1.run
deleted file mode 100644
index 431f740..0000000
--- a/bwbtest/C77A/INPUT_1.run
+++ /dev/null
@@ -1,48 +0,0 @@
-INPUT B$
-? abc
-TESTCASE # 1
-LENGTH [123456789012345678901234567890]
- 3 [abc]
-
-INPUT LINE B$
-? abc,def,ghi,jkl
-TESTCASE # 2
-LENGTH [123456789012345678901234567890]
- 15 [abc,def,ghi,jkl]
-
-INPUT prompt B$
-prompt? abc
-TESTCASE # 3
-LENGTH [123456789012345678901234567890]
- 3 [abc]
-
-INPUT prompt LINE B$
-prompt? abc,def,ghi,jkl
-TESTCASE # 4
-LENGTH [123456789012345678901234567890]
- 15 [abc,def,ghi,jkl]
-
-INPUT ; B$
-abc
-TESTCASE # 5
-LENGTH [123456789012345678901234567890]
- 3 [abc]
-
-INPUT ; LINE B$
-abc,def,ghi,jkl
-TESTCASE # 6
-LENGTH [123456789012345678901234567890]
- 15 [abc,def,ghi,jkl]
-
-INPUT prompt ; B$
-prompt? abc
-TESTCASE # 7
-LENGTH [123456789012345678901234567890]
- 3 [abc]
-
-INPUT prompt ; LINE B$
-prompt? abc,def,ghi,jkl
-TESTCASE # 8
-LENGTH [123456789012345678901234567890]
- 15 [abc,def,ghi,jkl]
-
diff --git a/bwbtest/C77A/LPRINTER_1.BAS b/bwbtest/C77A/LPRINTER_1.BAS
deleted file mode 100644
index 0a10029..0000000
--- a/bwbtest/C77A/LPRINTER_1.BAS
+++ /dev/null
@@ -1,15 +0,0 @@
-100 REM Purpose: Verify CONSOLE command
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-22
-130 REM
-200 REM The following string is 70 characters long
-210 LET A$ = "....+....|....+....|....+....|....+....|....+....|....+....|....+....|"
-300 LPRINTER
-310 PRINT A$
-320 LPRINTER WIDTH 70
-330 PRINT A$
-340 LPRINTER WIDTH 40
-350 PRINT A$
-360 LPRINTER WIDTH 80
-370 PRINT A$
-999 END
diff --git a/bwbtest/C77A/LPRINTER_1.run b/bwbtest/C77A/LPRINTER_1.run
deleted file mode 100644
index e69de29..0000000
diff --git a/bwbtest/C77A/MATCH_1.BAS b/bwbtest/C77A/MATCH_1.BAS
deleted file mode 100644
index 74745c3..0000000
--- a/bwbtest/C77A/MATCH_1.BAS
+++ /dev/null
@@ -1,36 +0,0 @@
-100 REM Purpose: Verify MATCH command
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-25
-130 REM
-
-
-1000 REM --------------------------------------
-1010 READ Test.Case.Number
-1020 IF Test.Case.Number < 0 THEN 2000
-1030 READ A$, B$, I%, N%
-1040 PRINT "TEST CASE #" ; Test.Case.Number ; ": ";
-1050 PRINT "A$=[";A$;"], B$=[";B$;"], I%=";I%;", N%=";N%
-1060 J% = MATCH( A$, B$, I% )
-1070 IF J% = N% THEN 1000
-
-1100 PRINT "TEST FAILED"
-1110 GOTO 9999
-
-2000 PRINT "TEST PASSED"
-2010 GOTO 9999
-
-8000 REM Test #, A$, B$, I%, N
-8010 DATA 1, "is", "Now is the", 1, 5
-8020 DATA 2, "##", "October 8, 1876", 1, 12
-8030 DATA 3, "a?", "character", 4, 5
-8040 DATA 4, "\#", "123#45", 1, 4
-8050 DATA 5, "ABCD", "ABC", 1, 0
-8060 DATA 6, "\#1\\\?", "1#1\?2#", 1, 2
-8070 DATA 7, " ", " ", 2, 0
-8080 DATA 8, " ", "", 1, 0
-8090 DATA 9, "", " ", 1, 1
-8100 DATA 10, "", "", 1, 0
-8110 DATA -1
-
-9999 END
-
diff --git a/bwbtest/C77A/MATCH_1.run b/bwbtest/C77A/MATCH_1.run
deleted file mode 100644
index f0a92da..0000000
--- a/bwbtest/C77A/MATCH_1.run
+++ /dev/null
@@ -1,11 +0,0 @@
-TEST CASE # 1 : A$=[is], B$=[Now is the], I%= 1 , N%= 5
-TEST CASE # 2 : A$=[##], B$=[October 8, 1876], I%= 1 , N%= 12
-TEST CASE # 3 : A$=[a?], B$=[character], I%= 4 , N%= 5
-TEST CASE # 4 : A$=[\#], B$=[123#45], I%= 1 , N%= 4
-TEST CASE # 5 : A$=[ABCD], B$=[ABC], I%= 1 , N%= 0
-TEST CASE # 6 : A$=[\#1\\\?], B$=[1#1\?2#], I%= 1 , N%= 2
-TEST CASE # 7 : A$=[ ], B$=[ ], I%= 2 , N%= 0
-TEST CASE # 8 : A$=[ ], B$=[], I%= 1 , N%= 0
-TEST CASE # 9 : A$=[], B$=[ ], I%= 1 , N%= 1
-TEST CASE # 10 : A$=[], B$=[], I%= 1 , N%= 0
-TEST PASSED
diff --git a/bwbtest/C77A/PAD80.BAS b/bwbtest/C77A/PAD80.BAS
deleted file mode 100644
index 2a293c3..0000000
--- a/bwbtest/C77A/PAD80.BAS
+++ /dev/null
@@ -1,44 +0,0 @@
-010 REM OPTION VERSION BYWATER
-020 REM
-100 REM PAD80.BAS
-101 REM Pad the test output to 80 characters.
-102 REM bwbasic P001.BAS > P001.OUT
-103 REM echo "500 DATA P001.OUT, P001.80" > PAD80.INP
-104 REM bwbasic PAD80.BAS
-105 REM diff P001.run P001.80
-109 REM ----------------------------------------------------------
-120 REM GET FILE NAME INTO A$
-122 DELETE 500
-124 MERGE "PAD80.INP"
-126 REM LIST
-128 RESTORE 500
-130 READ A$
-135 REM PRINT "SOURCE:"; A$
-140 READ B$
-145 REM PRINT "TARGET:"; B$
-300 REM ----------------------------------------------------------
-301 REM PROCESS FILENAME IN A$
-302 REM ----------------------------------------------------------
-310 OPEN A$ FOR INPUT AS #2
-315 OPEN B$ FOR OUTPUT AS #3
-320 REM PRINT "PROCESS TEXT LINE"
-330 IF EOF( 2 ) THEN 390
-335 REM PRINT "NOT EOF"
-340 LINE INPUT #2, C$
-345 REM PRINT "C$=";C$
-350 C$ = LEFT$( C$ + SPACE$( 80 ), 80 )
-355 REM PRINT "yyy"
-360 REM WRITE OUTPUT LINE
-370 PRINT #3, C$
-375 REM PRINT "zzz"
-380 GOTO 320
-390 REM CLOSE FILES
-400 CLOSE #3
-410 CLOSE #2
-499 REM ----------------------------------------------------------
-500 REM REPLACED BY CONTENTS OF "PAD80.INP"
-501 REM ----------------------------------------------------------
-900 REM ----------------------------------------------------------
-910 REM THE END
-920 REM ----------------------------------------------------------
-999 END
diff --git a/bwbtest/C77A/PAD80.INP b/bwbtest/C77A/PAD80.INP
deleted file mode 100644
index 8d6530c..0000000
--- a/bwbtest/C77A/PAD80.INP
+++ /dev/null
@@ -1 +0,0 @@
-500 DATA SIZE_1.OUT, SIZE_1.80
diff --git a/bwbtest/C77A/PAD80.PRO b/bwbtest/C77A/PAD80.PRO
deleted file mode 100644
index 4c31bf5..0000000
--- a/bwbtest/C77A/PAD80.PRO
+++ /dev/null
@@ -1,2 +0,0 @@
-OPTION VERSION "BYWATER"
-OPTION LABELS OFF
diff --git a/bwbtest/C77A/QUOTE_1.BAS b/bwbtest/C77A/QUOTE_1.BAS
deleted file mode 100644
index 32a06b6..0000000
--- a/bwbtest/C77A/QUOTE_1.BAS
+++ /dev/null
@@ -1,48 +0,0 @@
- 100 REM Purpose: Verify quoted strings
- 110 REM Author: Howard Wulf, AF5NE
- 120 REM
- 130 REM
- 200 LET N = 0
- 210 LET A$ = "123456789012345678901234567890"
-
- 300 LET B$ = ""
- 310 GOSUB 8000
- 320 LET B$ = """"
- 330 GOSUB 8000
- 340 LET B$ = "THIS HAS ""EMBEDDED"" STRING"
- 350 GOSUB 8000
- 360 LET B$ = """THIS HAS LEADING QUOTE"
- 370 GOSUB 8000
- 380 LET B$ = "THIS HAS TRAILING QUOTE"""
- 390 GOSUB 8000
- 400 LET B$ = """THIS"" ""HAS"" ""MANY"" ""STRINGS"""
- 410 GOSUB 8000
-
-
-
- 1300 LET B$ = "
- 1310 GOSUB 8000
- 1320 LET B$ = """
- 1330 GOSUB 8000
- 1340 LET B$ = "THIS HAS ""EMBEDDED"" STRING
- 1350 GOSUB 8000
- 1360 LET B$ = """THIS HAS LEADING QUOTE
- 1370 GOSUB 8000
- 1380 LET B$ = "THIS HAS TRAILING QUOTE""
- 1390 GOSUB 8000
- 1400 LET B$ = """THIS"" ""HAS"" ""MANY"" ""STRINGS""
- 1410 GOSUB 8000
-
-
- 7999 GOTO 9999
- 8000 REM -------------------------------
- 8010 REM PRINT RESULTS
- 8020 REM -------------------------
- 8030 LET N = N + 1
- 8040 PRINT "TESTCASE #";N
- 8050 PRINT "LENGTH", "[";A$;"]"
- 8060 PRINT LEN(B$) , "[";B$;"]"
- 8070 PRINT
- 8080 RETURN
- 9999 END
-
diff --git a/bwbtest/C77A/QUOTE_1.run b/bwbtest/C77A/QUOTE_1.run
deleted file mode 100644
index bf1e475..0000000
--- a/bwbtest/C77A/QUOTE_1.run
+++ /dev/null
@@ -1,48 +0,0 @@
-TESTCASE # 1
-LENGTH [123456789012345678901234567890]
- 0 []
-
-TESTCASE # 2
-LENGTH [123456789012345678901234567890]
- 1 ["]
-
-TESTCASE # 3
-LENGTH [123456789012345678901234567890]
- 26 [THIS HAS "EMBEDDED" STRING]
-
-TESTCASE # 4
-LENGTH [123456789012345678901234567890]
- 23 ["THIS HAS LEADING QUOTE]
-
-TESTCASE # 5
-LENGTH [123456789012345678901234567890]
- 24 [THIS HAS TRAILING QUOTE"]
-
-TESTCASE # 6
-LENGTH [123456789012345678901234567890]
- 29 ["THIS" "HAS" "MANY" "STRINGS"]
-
-TESTCASE # 7
-LENGTH [123456789012345678901234567890]
- 0 []
-
-TESTCASE # 8
-LENGTH [123456789012345678901234567890]
- 1 ["]
-
-TESTCASE # 9
-LENGTH [123456789012345678901234567890]
- 26 [THIS HAS "EMBEDDED" STRING]
-
-TESTCASE # 10
-LENGTH [123456789012345678901234567890]
- 23 ["THIS HAS LEADING QUOTE]
-
-TESTCASE # 11
-LENGTH [123456789012345678901234567890]
- 24 [THIS HAS TRAILING QUOTE"]
-
-TESTCASE # 12
-LENGTH [123456789012345678901234567890]
- 29 ["THIS" "HAS" "MANY" "STRINGS"]
-
diff --git a/bwbtest/C77A/QUOTE_2.BAS b/bwbtest/C77A/QUOTE_2.BAS
deleted file mode 100644
index dee0dd7..0000000
--- a/bwbtest/C77A/QUOTE_2.BAS
+++ /dev/null
@@ -1,61 +0,0 @@
- 100 REM Purpose: Verify quoted strings
- 110 REM Author: Howard Wulf, AF5NE
- 120 REM
- 130 REM
- 200 LET N = 0
- 210 LET A$ = "123456789012345678901234567890"
- 220 RESTORE
-
- 300 READ B$
- 305 DATA ""
- 310 GOSUB 8000
- 320 READ B$
- 325 DATA """"
- 330 GOSUB 8000
- 340 READ B$
- 345 DATA "THIS HAS ""EMBEDDED"" STRING"
- 350 GOSUB 8000
- 360 READ B$
- 365 DATA"""THIS HAS LEADING QUOTE"
- 370 GOSUB 8000
- 380 READ B$
- 385 DATA "THIS HAS TRAILING QUOTE"""
- 390 GOSUB 8000
- 400 READ B$
- 405 DATA """THIS"" ""HAS"" ""MANY"" ""STRINGS"""
- 410 GOSUB 8000
-
-
-
- 1300 READ B$
- 1305 DATA "
- 1310 GOSUB 8000
- 1320 READ B$
- 1325 DATA """
- 1330 GOSUB 8000
- 1340 READ B$
- 1345 DATA "THIS HAS ""EMBEDDED"" STRING
- 1350 GOSUB 8000
- 1360 READ B$
- 1365 DATA """THIS HAS LEADING QUOTE
- 1370 GOSUB 8000
- 1380 READ B$
- 1385 DATA "THIS HAS TRAILING QUOTE""
- 1390 GOSUB 8000
- 1400 READ B$
- 1405 DATA """THIS"" ""HAS"" ""MANY"" ""STRINGS""
- 1410 GOSUB 8000
-
-
- 7999 GOTO 9999
- 8000 REM -------------------------------
- 8010 REM PRINT RESULTS
- 8020 REM -------------------------
- 8030 LET N = N + 1
- 8040 PRINT "TESTCASE #";N
- 8050 PRINT "LENGTH", "[";A$;"]"
- 8060 PRINT LEN(B$) , "[";B$;"]"
- 8070 PRINT
- 8080 RETURN
- 9999 END
-
diff --git a/bwbtest/C77A/QUOTE_2.run b/bwbtest/C77A/QUOTE_2.run
deleted file mode 100644
index bf1e475..0000000
--- a/bwbtest/C77A/QUOTE_2.run
+++ /dev/null
@@ -1,48 +0,0 @@
-TESTCASE # 1
-LENGTH [123456789012345678901234567890]
- 0 []
-
-TESTCASE # 2
-LENGTH [123456789012345678901234567890]
- 1 ["]
-
-TESTCASE # 3
-LENGTH [123456789012345678901234567890]
- 26 [THIS HAS "EMBEDDED" STRING]
-
-TESTCASE # 4
-LENGTH [123456789012345678901234567890]
- 23 ["THIS HAS LEADING QUOTE]
-
-TESTCASE # 5
-LENGTH [123456789012345678901234567890]
- 24 [THIS HAS TRAILING QUOTE"]
-
-TESTCASE # 6
-LENGTH [123456789012345678901234567890]
- 29 ["THIS" "HAS" "MANY" "STRINGS"]
-
-TESTCASE # 7
-LENGTH [123456789012345678901234567890]
- 0 []
-
-TESTCASE # 8
-LENGTH [123456789012345678901234567890]
- 1 ["]
-
-TESTCASE # 9
-LENGTH [123456789012345678901234567890]
- 26 [THIS HAS "EMBEDDED" STRING]
-
-TESTCASE # 10
-LENGTH [123456789012345678901234567890]
- 23 ["THIS HAS LEADING QUOTE]
-
-TESTCASE # 11
-LENGTH [123456789012345678901234567890]
- 24 [THIS HAS TRAILING QUOTE"]
-
-TESTCASE # 12
-LENGTH [123456789012345678901234567890]
- 29 ["THIS" "HAS" "MANY" "STRINGS"]
-
diff --git a/bwbtest/C77A/QUOTE_3.BAS b/bwbtest/C77A/QUOTE_3.BAS
deleted file mode 100644
index 1d4f05b..0000000
--- a/bwbtest/C77A/QUOTE_3.BAS
+++ /dev/null
@@ -1,48 +0,0 @@
- 100 REM Purpose: Verify quoted strings
- 110 REM Author: Howard Wulf, AF5NE
- 120 REM
- 130 REM
- 200 LET N = 0
- 210 LET A$ = "123456789012345678901234567890"
-
- 300 INPUT B$
- 310 GOSUB 8000
- 320 INPUT B$
- 330 GOSUB 8000
- 340 INPUT B$
- 350 GOSUB 8000
- 360 INPUT B$
- 370 GOSUB 8000
- 380 INPUT B$
- 390 GOSUB 8000
- 400 INPUT B$
- 410 GOSUB 8000
-
-
-
- 1300 INPUT B$
- 1310 GOSUB 8000
- 1320 INPUT B$
- 1330 GOSUB 8000
- 1340 INPUT B$
- 1350 GOSUB 8000
- 1360 INPUT B$
- 1370 GOSUB 8000
- 1380 INPUT B$
- 1390 GOSUB 8000
- 1400 INPUT B$
- 1410 GOSUB 8000
-
-
- 7999 GOTO 9999
- 8000 REM -------------------------------
- 8010 REM PRINT RESULTS
- 8020 REM -------------------------
- 8030 LET N = N + 1
- 8040 PRINT "TESTCASE #";N
- 8050 PRINT "LENGTH", "[";A$;"]"
- 8060 PRINT LEN(B$) , "[";B$;"]"
- 8070 PRINT
- 8080 RETURN
- 9999 END
-
diff --git a/bwbtest/C77A/QUOTE_3.INP b/bwbtest/C77A/QUOTE_3.INP
deleted file mode 100644
index 01141aa..0000000
--- a/bwbtest/C77A/QUOTE_3.INP
+++ /dev/null
@@ -1,12 +0,0 @@
-""
-""""
-"THIS HAS ""EMBEDDED"" STRING"
-"""THIS HAS LEADING QUOTE"
-"THIS HAS TRAILING QUOTE"""
-"""THIS"" ""HAS"" ""MANY"" ""STRINGS"""
-"
-"""
-"THIS HAS ""EMBEDDED"" STRING
-"""THIS HAS LEADING QUOTE
-"THIS HAS TRAILING QUOTE""
-"""THIS"" ""HAS"" ""MANY"" ""STRINGS""
diff --git a/bwbtest/C77A/QUOTE_3.run b/bwbtest/C77A/QUOTE_3.run
deleted file mode 100644
index 31e6f4a..0000000
--- a/bwbtest/C77A/QUOTE_3.run
+++ /dev/null
@@ -1,60 +0,0 @@
-? ""
-TESTCASE # 1
-LENGTH [123456789012345678901234567890]
- 0 []
-
-? """"
-TESTCASE # 2
-LENGTH [123456789012345678901234567890]
- 1 ["]
-
-? "THIS HAS ""EMBEDDED"" STRING"
-TESTCASE # 3
-LENGTH [123456789012345678901234567890]
- 26 [THIS HAS "EMBEDDED" STRING]
-
-? """THIS HAS LEADING QUOTE"
-TESTCASE # 4
-LENGTH [123456789012345678901234567890]
- 23 ["THIS HAS LEADING QUOTE]
-
-? "THIS HAS TRAILING QUOTE"""
-TESTCASE # 5
-LENGTH [123456789012345678901234567890]
- 24 [THIS HAS TRAILING QUOTE"]
-
-? """THIS"" ""HAS"" ""MANY"" ""STRINGS"""
-TESTCASE # 6
-LENGTH [123456789012345678901234567890]
- 29 ["THIS" "HAS" "MANY" "STRINGS"]
-
-? "
-TESTCASE # 7
-LENGTH [123456789012345678901234567890]
- 0 []
-
-? """
-TESTCASE # 8
-LENGTH [123456789012345678901234567890]
- 1 ["]
-
-? "THIS HAS ""EMBEDDED"" STRING
-TESTCASE # 9
-LENGTH [123456789012345678901234567890]
- 26 [THIS HAS "EMBEDDED" STRING]
-
-? """THIS HAS LEADING QUOTE
-TESTCASE # 10
-LENGTH [123456789012345678901234567890]
- 23 ["THIS HAS LEADING QUOTE]
-
-? "THIS HAS TRAILING QUOTE""
-TESTCASE # 11
-LENGTH [123456789012345678901234567890]
- 24 [THIS HAS TRAILING QUOTE"]
-
-? """THIS"" ""HAS"" ""MANY"" ""STRINGS""
-TESTCASE # 12
-LENGTH [123456789012345678901234567890]
- 29 ["THIS" "HAS" "MANY" "STRINGS"]
-
diff --git a/bwbtest/C77A/READ_1.BAS b/bwbtest/C77A/READ_1.BAS
deleted file mode 100644
index 9825106..0000000
--- a/bwbtest/C77A/READ_1.BAS
+++ /dev/null
@@ -1,20 +0,0 @@
-100 REM Purpose: Verify READ LINE # command
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-180 LET Record.Length% = 64
-190 LET File.Name$ = "READ_1.TXT"
-200 CREATE File.Name$ RECL Record.Length% AS 777
-210 FOR I = 1 TO 10
-220 LET A$ = "THIS IS LINE"
-230 PRINT # 777; A$, I,
-235 PRINT # 777; "extra stuff", I * 10 + I
-240 NEXT I
-250 CLOSE 777
-300 OPEN File.Name$ RECL Record.Length% AS 333
-310 FOR I = 1 TO 10
-320 READ # 333; LINE B$
-330 PRINT B$
-340 NEXT I
-350 CLOSE 333
-999 END
diff --git a/bwbtest/C77A/READ_1.run b/bwbtest/C77A/READ_1.run
deleted file mode 100644
index f5ddc2e..0000000
--- a/bwbtest/C77A/READ_1.run
+++ /dev/null
@@ -1,10 +0,0 @@
-"THIS IS LINE",1,"extra stuff",11
-"THIS IS LINE",2,"extra stuff",22
-"THIS IS LINE",3,"extra stuff",33
-"THIS IS LINE",4,"extra stuff",44
-"THIS IS LINE",5,"extra stuff",55
-"THIS IS LINE",6,"extra stuff",66
-"THIS IS LINE",7,"extra stuff",77
-"THIS IS LINE",8,"extra stuff",88
-"THIS IS LINE",9,"extra stuff",99
-"THIS IS LINE",10,"extra stuff",110
diff --git a/bwbtest/C77A/READ_2.BAS b/bwbtest/C77A/READ_2.BAS
deleted file mode 100644
index 31ba440..0000000
--- a/bwbtest/C77A/READ_2.BAS
+++ /dev/null
@@ -1,20 +0,0 @@
-100 REM Purpose: Verify READ LINE # command
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-180 LET Record.Length% = 64
-190 LET File.Name$ = "READ_1.TXT"
-200 CREATE File.Name$ RECL Record.Length% AS 777
-210 FOR I = 1 TO 10
-220 LET A$ = "THIS IS LINE"
-230 PRINT # 777, I; A$, I,
-235 PRINT # 777; "extra stuff", I * 10 + I
-240 NEXT I
-250 CLOSE 777
-300 OPEN File.Name$ RECL Record.Length% AS 333
-310 FOR I = 10 TO 1 STEP -1
-320 READ # 333, I; LINE B$
-330 PRINT B$
-340 NEXT I
-350 CLOSE 333
-999 END
diff --git a/bwbtest/C77A/READ_2.run b/bwbtest/C77A/READ_2.run
deleted file mode 100644
index 776a53b..0000000
--- a/bwbtest/C77A/READ_2.run
+++ /dev/null
@@ -1,10 +0,0 @@
-"THIS IS LINE",10,"extra stuff",110
-"THIS IS LINE",9,"extra stuff",99
-"THIS IS LINE",8,"extra stuff",88
-"THIS IS LINE",7,"extra stuff",77
-"THIS IS LINE",6,"extra stuff",66
-"THIS IS LINE",5,"extra stuff",55
-"THIS IS LINE",4,"extra stuff",44
-"THIS IS LINE",3,"extra stuff",33
-"THIS IS LINE",2,"extra stuff",22
-"THIS IS LINE",1,"extra stuff",11
diff --git a/bwbtest/C77A/RETURN_1.BAS b/bwbtest/C77A/RETURN_1.BAS
deleted file mode 100644
index 1cc3cd1..0000000
--- a/bwbtest/C77A/RETURN_1.BAS
+++ /dev/null
@@ -1,21 +0,0 @@
-100 REM Purpose: Verify RETURN exits a FUNCTION
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-
-200 DEF TEST( X )
-210 LET TEST = X * 7
-220 RETURN
-230 PRINT "TEST FAILED - RETURN NOT EXECUTED"
-240 STOP
-250 FEND
-
-300 PRINT "ABOUT TO EXECUTE TEST"
-310 LET N = TEST( 2 )
-320 IF N = 14 THEN 400
-330 PRINT "TEST FAILED - WRONG RESULT"
-340 GOTO 999
-
-400 PRINT "TEST PASSED"
-
-999 END
diff --git a/bwbtest/C77A/RETURN_1.run b/bwbtest/C77A/RETURN_1.run
deleted file mode 100644
index b2ba5fa..0000000
--- a/bwbtest/C77A/RETURN_1.run
+++ /dev/null
@@ -1,2 +0,0 @@
-ABOUT TO EXECUTE TEST
-TEST PASSED
diff --git a/bwbtest/C77A/RETURN_2.BAS b/bwbtest/C77A/RETURN_2.BAS
deleted file mode 100644
index afa1585..0000000
--- a/bwbtest/C77A/RETURN_2.BAS
+++ /dev/null
@@ -1,26 +0,0 @@
-100 REM Purpose: Verify RETURN exits a FUNCTION
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-
-200 DEF TEST( X )
-210 LET TEST = X * 7
-220 RETURN
-230 PRINT "TEST FAILED - RETURN NOT EXECUTED"
-240 STOP
-250 FEND
-
-300 PRINT "ABOUT TO EXECUTE TEST"
-310 GOSUB 1300
-320 PRINT "TEST FAILED - RETURNED HERE"
-330 GOTO 9999
-
-1300 REM THIS IS A SUBROUTINE
-1310 LET N = TEST( 3 )
-1320 IF N = 21 THEN 1400
-1330 PRINT "TEST FAILED - WRONG RESULT"
-1340 GOTO 9999
-
-1400 PRINT "TEST PASSED"
-
-9999 END
diff --git a/bwbtest/C77A/RETURN_2.run b/bwbtest/C77A/RETURN_2.run
deleted file mode 100644
index b2ba5fa..0000000
--- a/bwbtest/C77A/RETURN_2.run
+++ /dev/null
@@ -1,2 +0,0 @@
-ABOUT TO EXECUTE TEST
-TEST PASSED
diff --git a/bwbtest/C77A/RETURN_3.BAS b/bwbtest/C77A/RETURN_3.BAS
deleted file mode 100644
index 2998099..0000000
--- a/bwbtest/C77A/RETURN_3.BAS
+++ /dev/null
@@ -1,26 +0,0 @@
-100 REM Purpose: Verify RETURN exits a FUNCTION
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-
-200 DEF TEST( X )
-210 GOSUB 400
-220 LET TEST = X * 7
-230 RETURN
-240 PRINT "TEST FAILED - RETURN NOT EXECUTED"
-250 STOP
-260 FEND
-
-300 PRINT "ABOUT TO EXECUTE TEST"
-310 LET N = TEST( 2 )
-320 IF N = 14 THEN 500
-330 PRINT "TEST FAILED - WRONG RESULT"
-340 GOTO 999
-
-400 REM SUBROUTINE CALLED FROM WITHIN DEF...FEND
-410 PRINT "EXECUTED SUBROUTINE"
-420 RETURN
-
-500 PRINT "TEST PASSED"
-
-999 END
diff --git a/bwbtest/C77A/RETURN_3.run b/bwbtest/C77A/RETURN_3.run
deleted file mode 100644
index 64c5c17..0000000
--- a/bwbtest/C77A/RETURN_3.run
+++ /dev/null
@@ -1,3 +0,0 @@
-ABOUT TO EXECUTE TEST
-EXECUTED SUBROUTINE
-TEST PASSED
diff --git a/bwbtest/C77A/SIZE_1.BAS b/bwbtest/C77A/SIZE_1.BAS
deleted file mode 100644
index 8455746..0000000
--- a/bwbtest/C77A/SIZE_1.BAS
+++ /dev/null
@@ -1,55 +0,0 @@
-100 REM Purpose: Verify SIZE function
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-
-200 REM -----------------------------------------------------
-210 LET File.Name$ = "SIZE_1.TXT"
-220 REM -----------------------------------------------------
-
-1100 REM -----------------------------------------------------
-1110 PRINT "SIZE() of non-existing file is zero"
-1120 LET N = SIZE( File.Name$ )
-1130 PRINT "N=";N
-1140 IF N <> 0 THEN 2000
-1150 PRINT " TEST PASSED"
-
-1200 REM -----------------------------------------------------
-1210 PRINT "SIZE() of zero length file is zero"
-1220 CREATE File.Name$ AS 1200
-1230 CLOSE 1200
-1240 LET N = SIZE( File.Name$ )
-1250 PRINT "N=";N
-1260 IF N <> 0 THEN 2000
-1270 PRINT " TEST PASSED"
-
-1300 REM -----------------------------------------------------
-1310 PRINT "SIZE() of < 1024 length file is 1"
-1320 CREATE File.Name$ AS 1300
-1330 PRINT # 1300; "anything"
-1340 CLOSE 1300
-1350 LET N = SIZE( File.Name$ )
-1360 PRINT "N=";N
-1370 IF N <> 1 THEN 2000
-1380 PRINT " TEST PASSED"
-
-1400 REM -----------------------------------------------------
-1410 PRINT "SIZE() of 1024 length file is 1"
-1420 CREATE File.Name$ RECL 1024 AS 1400
-1430 PRINT # 1400; "anything"
-1440 CLOSE 1400
-1450 LET N = SIZE( File.Name$ )
-1460 PRINT "N=";N
-1470 IF N <> 1 THEN 2000
-1480 PRINT " TEST PASSED"
-
-1900 REM -----------------------------------------------------
-1910 REM Cleanup
-1920 CREATE File.Name$ AS 1900
-1930 DELETE 1900
-1999 GOTO 9999
-
-2000 REM -----------------------------------------------------
-2010 PRINT "TEST FAILED"
-
-9999 END
diff --git a/bwbtest/C77A/SIZE_1.run b/bwbtest/C77A/SIZE_1.run
deleted file mode 100644
index 07e879a..0000000
--- a/bwbtest/C77A/SIZE_1.run
+++ /dev/null
@@ -1,12 +0,0 @@
-SIZE() of non-existing file is zero
-N= 0
- TEST PASSED
-SIZE() of zero length file is zero
-N= 0
- TEST PASSED
-SIZE() of < 1024 length file is 1
-N= 1
- TEST PASSED
-SIZE() of 1024 length file is 1
-N= 1
- TEST PASSED
diff --git a/bwbtest/C77A/USING_1.BAS b/bwbtest/C77A/USING_1.BAS
deleted file mode 100644
index 4c196f0..0000000
--- a/bwbtest/C77A/USING_1.BAS
+++ /dev/null
@@ -1,18 +0,0 @@
-100 REM Purpose: Verify PRINT USING # command
-110 REM Author: Howard Wulf, AF5NE
-120 REM Date: 2015-12-23
-130 REM
-190 LET F$ = "USING_1.TXT"
-200 CREATE F$ AS 777
-210 FOR I = 1 TO 10
-220 LET A$ = "THIS IS LINE ###"
-230 PRINT # 777; USING A$; I
-240 NEXT I
-250 CLOSE 777
-300 OPEN F$ AS 333
-310 FOR I = 1 TO 10
-320 READ # 333; B$
-330 PRINT B$
-340 NEXT I
-350 CLOSE 333
-999 END
diff --git a/bwbtest/C77A/USING_1.run b/bwbtest/C77A/USING_1.run
deleted file mode 100644
index d6379e3..0000000
--- a/bwbtest/C77A/USING_1.run
+++ /dev/null
@@ -1,10 +0,0 @@
-THIS IS LINE 1
-THIS IS LINE 2
-THIS IS LINE 3
-THIS IS LINE 4
-THIS IS LINE 5
-THIS IS LINE 6
-THIS IS LINE 7
-THIS IS LINE 8
-THIS IS LINE 9
-THIS IS LINE 10
diff --git a/bwbtest/C77B/00README.TXT b/bwbtest/C77B/00README.TXT
deleted file mode 100644
index ba624d4..0000000
--- a/bwbtest/C77B/00README.TXT
+++ /dev/null
@@ -1,96 +0,0 @@
-2015-12-25 Minor changes for bwBASIC by Howard Wulf, AF5NE.
------------------------------------------------------------------
-
-CPMUG ABSTRACT:
-
-CPMUG volumes 86-90 contain "BusinessMaster II", a comprehensive small
-business software package for CBASIC-II. There were seven single
-density disks originally contributed: five program disks, one
-documentation disk, and one sample file disk. I combined these seven
-disks to produce five CPMUG volumes. Thus not all references in the
-various documentation will directly apply disk by disk, but all the
-files submitted are included.
-
-Only the files "CRJOSORT.BAS", "VPJOSORT.BAS", and the submit files for
-copying, XREFing, pipping, and compiling with printing which are in the
-documentation, were not included. The contributor felt the two missing
-".BAS" programs to be unnecessary. Also a minor bit of REM
-documentation seems to be missing off of the front of GLJOSORT.BAS.
-
-I generated a compile submit file for each disk. The submit files have
-the form:
-
- $1 $2filename.typ $3 $4
-
-Thus to compile them from the A: disk to the B: disk, type:
-
- submit compile CBASIC2 A: B: $B
-
-There are six .BAS files which are on every disk: ALL, FORMAT, CONTROL,
-CHECK, READFILE, AND BIZMII.
-
-The reminder of this abstract is the press release officially releasing
-BusinessMaster II into the public domain.
-
-09/21/82 Ward Christensen
-
-
- -------------
-
- PRESS RELEASE
-
-
- BusinessMaster II Released into Public Domain
-
-For the protection of those who have purchased a package of General
-Business Software known as BusinessMaster II or Visaccount (which was,
-as of March 1982, at least 95% derivative of Business-Master II) from
-either OEM software (a Star Computer Systems company), Computer Services
-Corporation of America, 800-Software or other dealers OEM Software has
-established we are hereby declaring this old version of BusinessMaster
-II in Public Domain. The Copyright notices were removed by OEM Software
-and the package was then sold to over 400 dealers for $375.
-
-One of many dealers purchasing the package was Computer Services
-Corporation of America. Buck Lindsey CEO of Computer Services
-Corporation of America advised me last year that he felt the package was
-in the public domain and whether it was then or not, it is now.
-
-Computer Services Corporation of America made some minor changes to the
-package and renamed it VisAccount. Additionally they made 800-Software
-a discount dealer.
-
-We are placing this package in [the] Public Domain to clear up a problem
-that has been generated for literally thousands of people who purchased
-this package from one source or another and currently do not know where
-they stand.
-
-For those End-Users who are not satisfied with their Version of
-BusinessMaster II or Visaccount we will exchange your package for the
-new and much improved BusinessMaster II+ for $100. Simply mail your
-original diskettes (OEM or Visaccount) and license to us. We will put
-the new package on your diskettes with new labels, a new licensing
-agreement and a new manual and return it to you.
-
-For dealers who purchased BusinessMaster II from OEM software, you may
-continue to do as you wish with the package but we cannot upgrade your
-package to BusinessMaster II+. However we do offer dealer discounts on
-our newer packages.
-
-We have offered the package to the CP/M Users Group for inclusion in
-their library on the understanding that it may be used in any way,
-either commercial or non-commercial by anyone who chooses to use it
-provided credit is given for such use.
-
-We will continue to supply BusinessMaster II+ to end-users for $159 and
-Businessmaster Plus with fully-formatted fill in the blanks screen and B
-Tree Indexing for $289. These packages are compileable with minor
-changes under CB-80.
-
- (signed)
-
- Bud Aaron
-
- BusinessMaster
- 4317 Sea Bright Dr.
- Carlsbad, CA 92008
diff --git a/bwbtest/C77B/00test.sh b/bwbtest/C77B/00test.sh
deleted file mode 100644
index e13a301..0000000
--- a/bwbtest/C77B/00test.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-# Puropose: Verify existing BWBASIC behavior
-# Author: Howard Wulf, AF5NE
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/BIZMII/
-# ash ./00test.sh
-#
-
-rm *.80
-rm *.OUT
-rm *.LPT
-rm *.dif
-
-# ----------------------------------------------
-# Regression Tests
-# ----------------------------------------------
-testcase()
-{
- TESTCASE=${1}
- echo "TESTCASE=${TESTCASE}"
- ~/bwbasic --tape ${TESTCASE}.INP --profile C77.PRO --profile ${TESTCASE}.PRO ${TESTCASE}.BAS 1> ${TESTCASE}.OUT 2> ${TESTCASE}.LPT
-
-
- echo "500 DATA ${TESTCASE}.OUT, ${TESTCASE}.80" > PAD80.INP
- ~/bwbasic --profile PAD80.PRO PAD80.BAS
-
-
- diff ${TESTCASE}.run ${TESTCASE}.80 > ${TESTCASE}.dif
- if test -s ${TESTCASE}.dif
- then
- echo less ${TESTCASE}.dif
- fi
-}
-
-# ----------------------------------------------
-# the regression tests assume these data files
-# ----------------------------------------------
-cp ./DATA/* .
-
-# ----------------------------------------------
-# now, we are ready to test
-# ----------------------------------------------
-# ~/bwbasic --tape BIZMII.INP --profile C77.PRO BIZMII.BAS
-testcase BIZMII
-
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/C77B/01test.sh b/bwbtest/C77B/01test.sh
deleted file mode 100644
index 64c51bc..0000000
--- a/bwbtest/C77B/01test.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-# Filename: 01test.sh
-# Purpose: automted regression review
-# Author: Howard Wulf, AF5NE
-# Date: 2015-01-29
-# Uasage: implementation defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic/NBS2
-# ash ./01test.sh
-#
-#
-
-# review ERRORS
-cat *.dif > dif.OUT
-if test -s dif.OUT
-then
- pwd > dif.OUT
- cat *.dif >> dif.OUT
- less dif.OUT
-fi
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/C77B/02ok.sh b/bwbtest/C77B/02ok.sh
deleted file mode 100644
index 65099a4..0000000
--- a/bwbtest/C77B/02ok.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-# Puropose: Promote current results to regression
-# Author: Howard Wulf
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/BP100
-# ash ./01ok.sh
-#
-
-for f in *.80; do mv "$f" "${f/.80/.run}"; done
-# EOF
diff --git a/bwbtest/C77B/03run.sh b/bwbtest/C77B/03run.sh
deleted file mode 100644
index 36ee58b..0000000
--- a/bwbtest/C77B/03run.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-# run BIZMII
-cp ./DATA/* .
-~/bwbasic --tape BIZMII.INP --profile C77.PRO BIZMII.BAS
diff --git a/bwbtest/C77B/99test.sh b/bwbtest/C77B/99test.sh
deleted file mode 100644
index bbf7cad..0000000
--- a/bwbtest/C77B/99test.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-# Puropose: Cleanup after tests have passed
-# Author: Howard Wulf, AF5NE
-# Date: 2014-03-28
-# Usage: implementatino defined
-# Example:
-# cd /sdcard/Download/BASIC/bwbasic3/BP100
-# ash ./99test.sh
-#
-
-rm *.80
-rm *.OUT
-rm *.LPT
-rm *.dif
-
-rm AP
-rm AR
-rm CG
-rm CGSIZE
-rm CHK
-rm CR
-rm CRSIZE
-rm DATE
-rm EDEP
-rm EDEPSIZE
-rm EF
-rm EP
-rm EPC
-rm EPSIZE
-rm EPT
-rm ES
-rm FG
-rm FGSIZE
-rm GL
-rm GLCD
-rm GLCDSIZE
-rm GLCK
-rm GLCKSIZE
-rm GLF
-rm GLH
-rm GLHSIZE
-rm GLJO
-rm GLJOSIZE
-rm GLREF
-rm GLS
-rm GLSIZE
-rm GLSSIZE
-rm GLT
-rm INV
-rm IR
-rm IRSIZE
-rm MA0
-rm MA0SIZE
-rm NM
-rm NMSIZE
-rm PO
-rm POE
-rm POSIZE
-rm TM
-rm VP
-rm VPSIZE
-
-# ----------------------------------------------
-# EOF
-# ----------------------------------------------
diff --git a/bwbtest/C77B/ALL.BAS b/bwbtest/C77B/ALL.BAS
deleted file mode 100644
index da9a7c5..0000000
--- a/bwbtest/C77B/ALL.BAS
+++ /dev/null
@@ -1,4 +0,0 @@
-2 rem This is ALL.BAS used to include FORMAT and CONTROL
-
-%INCLUDE FORMAT.BAS
-%INCLUDE CONTROL.BAS
diff --git a/bwbtest/C77B/APPENDA.TXT b/bwbtest/C77B/APPENDA.TXT
deleted file mode 100644
index 400e839..0000000
--- a/bwbtest/C77B/APPENDA.TXT
+++ /dev/null
@@ -1,35 +0,0 @@
-.pl 66
- APPENDIX A
-
- Handling the Diskettes
-
-(1) To load the diskette, remove it from its protective jacket.
- Insert the diskette with label up and the slot exposing the
- magnetic surface into the drive first. After the diskette
- "clicks" into place, gently close the compartment door.
-
-(2) Always place the diskette back in its protective envelope
- after use. NEVER place your fingers or thumb on the diskette
- through the window slot exposing the magnetic surface.
-
-(3) Do not leave the diskette lying around. Dirt, dust, or
- stains on the diskette could cause the loss of data. Never
- leave the diskette lying on the video unit or near an
- electric motor, since the presence of a magnetic field may
- also cause loss or scrambling of data.
-
-(4) Use a felt-tip pen to make any notes on the label of the
- diskette. Using a ballpoint pen or pencil could damage the
- diskette inside the envelope.
-
-(5) Never load the diskette with the disk drive off.
-
-(6) Never remove the diskette from the disk drive compartment
- with the red "BUSY" light on.
-
-(7) Never insert a diskette into the drive before powering the
- drive up; also never power the drive down while a diskette
- is still inserted.
-
-(8) Keep the disks stored at a temputure of 10 to 52 degrees
- centigrade or 50 to 125 degrees fahrenheit.
diff --git a/bwbtest/C77B/APPENDB.TXT b/bwbtest/C77B/APPENDB.TXT
deleted file mode 100644
index 3e85fa9..0000000
--- a/bwbtest/C77B/APPENDB.TXT
+++ /dev/null
@@ -1,31 +0,0 @@
-.pl 66
- APPENDIX B
-
- Disk File Capacities For A Single Sided, Single Density Disk
- Containing 250 K.Bytes of space.
-_____________________________________________________________________________
-|File Name |Record Size | # Records per Diskette | # Records per Diskette if|
-| | | | sorting is to be done |
-|----------|------------|------------------------|--------------------------|
-|NM |170 |1400 |700 |
-|GLH |150 |1600 |800 |
-|GLS |150 |1600 |800 |
-|GL |138 |1800 |900 |
-|GLJO |250 |1000 |500 |
-|GLCD |250 |1000 |500 |
-|GLCS |250 |1000 |500 |
-|GLCK |250 |1000 |500 |
-|GLCR |250 |1000 |500 |
-|EP |512 |350 |175 |
-|TM |128 |350 |175 |
-|EDEP |64 |3800 |1900 |
-|CR |384 |600 |300 |
-|IR |384 |600 |300 |
-|VP |384 |600 |300 |
-|PO |384 |600 |300 |
-|FG |256 |900 |450 |
-|RG |256 |900 |450 |
-|CG |256 |900 |450 |
-|MA |150 |1600 |800 |
------------------------------------------------------------------------------
-
diff --git a/bwbtest/C77B/APPENDC.TXT b/bwbtest/C77B/APPENDC.TXT
deleted file mode 100644
index 9110a9a..0000000
--- a/bwbtest/C77B/APPENDC.TXT
+++ /dev/null
@@ -1,122 +0,0 @@
-.pl 66
- APPENDIX C
-
- Data File Diskette Set-up
-
- The next step involves setting up data disks. Normally
-data disk run in drive B:. The exceptions will be where some
-posting and printing require data disks in drives A: and B:
-simultaneously. When this is required, an appropriate message is
-built into the system to advise you when to change disks. The
-basic Data diskette requirements are as follows:
-
- All Data diskettes should be preformatted.
-
-1. General Ledger File Diskette
-
- Transfer the following files from the sample data disk as
-supplied. These can be modified later as required.
-
- a. NM Company Name File
- b. DATE File Containing 8 System Dates.
- c. GL Sample General Ledger File.
- d. GLF Numeric Formats File.
- e. GLT General Ledger Tabs File.
- f. GLREF General Ledger Account # Reference File.
- g. GLH General Ledger Headings File.
- h. GLS General Ledger Subheadings File.
-
-2. Journal Files Diskette
-
- This must be a separate diskette from the General Ledger
-Diskette above. These files will be created by the user as
-required.
-
- a. GLJO General Journal File.
- b. GLCD Check DIsbursements File.
- c. GLCS Cash Disbursment File.
- d. GLCK Check Receipts File.
- e. GLCR Cash Receipts File.
-.pa
- Data File Diskette Set-up
-
-3. Payroll File Diskette
-
- Transfer the following files from the sample files diskette.
-These can be modified later as required.
-
- a. NM
- b. DATE
- c. GLF
- d. GLT
- e. EF Federal Withholding Tables.
- f. ES California Withholding Tables.
- g. EPC Payroll Cutoffs and Percentages.
- h. EPT Payroll Check Printing Tabs.
-
- The following files will be created when appropriate
- programs are run.
-
- i. EP Employee Master Information File.
-
- j. TM Time Card File.
- k. EDEP Federal 501 Deposit File.
-
-4. Customer Receivables Files Diskette
-
- Transfer the following files from the sample data diskette.
- These can be modified later as required.
-
- a. NM
- b. DATE
- c. GLF
- d. GLT
-
- The following files will be created when appropriate
-programs are run.
-
- e. Customer Master Information File.
-
-5. Invoice Register (Order Entry) File Diskette
-
- Place the AR/AP runtime disk in drive A:. Place the invoice
-register disk in drive B:.
- Type ctrl. "C" (hold the control key down and type the
-letter C).
- Type "CRUN2 INVENT". Creates INV (Invoice # File).
- The system will prompt you to allow Invoice # set-up.
- If you enter a "0", Invoices can be radomly numbered.
- If you desire "Forced Sequintial" Invoice numbers, type in
-the number of your first invoice.
-
- The system will take care of the rest. Other files will be
-created when appropriate programs are run.
-
- a. IR Invoice Register (Order) File.
- Data File Diskette Set-up
-
-6. Vendor Payables File Diskette
-
- This is as #4 a through d
-
- e. VP Vendor Master Information File.
-
-7. Purchase Order Register Diskette
-
- This is the same as #5 but do CRUN2 POENT to set Purchase
-order numbers. Creates POE.
-
- a. PR Purchase Order Register File.
-
-8. Inventory / Finished Goods File Diskette
-
- This file, if under 50 records, can be placed on the
-customer information diskette to speed order entry processing. If
-more items are required, make a seperate diskette and include NM,
-DATE, GLF, and GLT.
-
-9. All Other Diskettes
-
- All other diskettes except the mailing list files will
-require at least NM, DATE, GLF, and GLT.
-
diff --git a/bwbtest/C77B/APPENDD.TXT b/bwbtest/C77B/APPENDD.TXT
deleted file mode 100644
index 18bbb65..0000000
--- a/bwbtest/C77B/APPENDD.TXT
+++ /dev/null
@@ -1,36 +0,0 @@
-.pl 66
-
- APPENDIX D
-
- Programs Not Accessed Through The Menu.
-
- The entire system runs through menu control. The four
-exception are the following :
-
- GLCLEAR - This program can be run separately to clear all
- DOLLAR values in the GL file. In this way you
- can repost the General Ledger for testing
- purposes. To run this program install the GL
- program disk in drive A: and type :
- CRUN2 GLCLEAR.
-
- EPCLEAR - This program can be run separately to clear all
- DOLLAR values in the Employee payroll (EP) file.
- To run this program install the payroll program
- disk in drive A: and type : CRUN2 EPCLEAR.
-
- INVENT - This short program allows the first sequential
- invoice number to be set. If the number is set to
- 0 (zero), the operator can enter random invoice
- numbers. Any other setting will be the first
- invoice number in a FORCED sequence over which
- the operator has no control. This is an accounting
- safeguard. To run this program insert the AR/AP
- program disk in drive A: then type :
- CRUN2 INVENT
-
- POENT - This short program allows the first sequential
- purchase order number to be set. It functions like
- INVENT. To run this program insert the AR/AP
- program disk in drive A: then type :
- CRUN2 POENT
diff --git a/bwbtest/C77B/APPENDE.TXT b/bwbtest/C77B/APPENDE.TXT
deleted file mode 100644
index fe3ec87..0000000
--- a/bwbtest/C77B/APPENDE.TXT
+++ /dev/null
@@ -1,453 +0,0 @@
-.pl 66
- APPENDIX E
-
- COMPILATION OF PROGRAMS FOR BUSINESSMASTER II
-
- Creating a set of "RUNTIME" programs
-
-CPMUG note: The SUB files mentioned below were NOT contributed,
-and are NOT part of the CPMUG volumes. Each volume 87-90 which
-contains .SUB programs DOES contain a COMPILE.BAS, which may be
-used via symbolic parameter substitution. Each line of the file
-contains lines like:
-
-$1 $2EPTABS.BAS $3 $4
-
-$1 is the compiler name (e.g. CBASIC2)
-$2 is the disk containing the .BAS programs, (e.g. B:)
-$3 is the output disk for the INT file (e.g. C:)
-$4 is for the options, such as $b.
-
-To compile only, $3 may be "$BC"
-
-Thus to compile all the .BAS files on a volume in your B: drive,
-placing the .INT files on the C: drive, and suppress listing,
-type:
-
-submit b:compile cbasic2 b: c: $b
-
-If you have a two disk system, you will have to make a system
-disk which contains the minimal necessities: SUBMIT.COM,
-CBASIC2.COM, etc.
-
-Also note the split-out of files by disk does not exactly match
-the documentation below.
-
-Here is the original appendix E information:
-
-----------------------------------------------------------------
-
-Your Businessmaster II software is supplied on five diskettes
-(North Star single density requires 22 diskettes. SUB files
-should be edited accordingly on each diskette). Each diskette
-contains .BAS files plus six auxiliary .SUB files. A separate
-diskette contains sample data files.
-
- The .SUB files are:
-
-1. COPYA-B.SUB Copies program files from Drive A to Drive B.
-
-2. COPYB-A.SUB Copies program files from Drive B to Drive A.
-
-3. PIPPRN.SUB Allows the batch printing of all .BAS files.
-
-4. XREFPRN.SUB Allows the batch application of the CBASIC
- XREF to all .BAS files.
-
-5. COMPILE.SUB Allows the batch compilation of all programs
- on the diskette using CBAS2 aaaaaaaa B: $B. The diskette with
- the .BAS files must be in Drive A along with CBAS2. A
- preformatted diskette must be in Drive B.
-
-6. COMPILEP.SUB Allows the above operation but with a hard-
- copy print-out of the compilation. Uses CBAS2 aaaaaaaa B: $BF.
-
-
-
- Tables 1 through 5 list the files contained on each diskette.
-
-A Word of caution - in all the following operations, always use
-the "verify" function with PIP. i.e. PIP A:aaaaaaaa.xxx = B:[v].
-This gives some degree of file integrity regardless of rumors to
-the contrary.
-
-
-
-bizmii.bas
-master1.bas
-master11.bas
-master12.bas
-glentry.bas
-glsort.bas
-gljotran.bas
-gljosort.bas
-gljopost.bas
-glcdtran.bas
-glcdsort.bas
-glcdpost.bas
-glcktran.bas
-glcksort.bas
-glckpost.bas
-glchart.bas
-gltbal.bas
-glbalsht.bas
-glincome.bas
-gcincome.bas
-glbudget.bas
-gdchecks.bas
-glclear.bas
-format.bas
-control.bas
-readfile.bas
-all.bas
-check.bas
-copyb-a.sub
-copya-b.sub
-compile.sub
-compilep.sub
-pipprn.sub
-xrefprn.sub
-
-
-
-
-
- Table 1
-
-epentry.bas
-tmentry.bas
-epjotran.bas
-epsumary.bas
-epjopost.bas
-epchecks.bas
-eplist.bas
-epsort.bas
-fed941pr.bas
-w2print.bas
-epdposit.bas
-epclear.bas
-master5.bas
-master14.bas
-bizmii.bas
-format.bas
-control.bas
-readfile.bas
-all.bas
-check.bas
-copyb-a.sub
-copya-b.sub
-compile.sub
-compilep.sub
-pipprn.sub
-xrefprn.sub
-
-
-
-
-
- Table 2
-.pa
-
-crentry.bas
-crsort.bas
-crjotran.bas
-crjolist.bas
-crjopost.bas
-crfminv.bas
-crppinv.bas
-crrpt.bas
-invent.bas
-crlabels.bas
-vpentry.bas
-vpsort.bas
-vpjotran.bas
-vpjolist.bas
-vpjopost.bas
-vpfmpo.bas
-vppppo.bas
-vprpt.bas
-poent.bas
-vplabels.bas
-master2.bas
-master3.bas
-bizmii.bas
-format.bas
-control.bas
-readfile.bas
-all.bas
-check.bas
-copyb-a.sub
-copya-b.sub
-compile.sub
-compilep.sub
-pipprn.sub
-xrefprn.sub
-
-
-
-
- Table 3
-
-maentry.bas
-masort.bas
-malabels.bas
-crlabels.bas
-vplabels.bas
-eplabels.bas
-fgentry.bas
-fgsort.bas
-rgentry.bas
-rgsort.bas
-fgrpt.bas
-rgrpt.bas
-fgalert.bas
-rgalert.bas
-cgentry.bas
-cgsort.bas
-cgdepcal.bas
-cgfm4562.bas
-cgrpt.bas
-master4.bas
-master16.bas
-master6.bas
-bizmii.bas
-format.bas
-control.bas
-readfile.bas
-all.bas
-check.bas
-copyb-a.sub
-copya-b.sub
-compile.sub
-compilep.sub
-pipprn.sub
-xrefprn.sub
-
-
-
-
- Table 4
-
-namentry.bas
-nmsort.bas
-glhentry.bas
-glhsort.bas
-glsentry.bas
-glssort.bas
-daentry.bas
-taentry.bas
-fmtentry.bas
-eptabs.bas
-epcuts.bas
-efentry.bas
-esentry.bas
-mmaint.bas
-qmaint.bas
-ymaint.bas
-bizmii.bas
-master7.bas
-master8.bas
-master9.bas
-master15.bas
-format.bas
-control.bas
-readfile.bas
-all.bas
-check.bas
-copyb-a.sub (*)
-copya-b.sub (*)
-compile.sub
-compilep.sub (*)
-pipprn.sub (*)
-xrefprn.sub (*)
-nm
-date
-gl
-glref
-glh
-gls
-glt
-glf
-ef
-es
-epc
-ept
-ma0
-
-(*) Not on CPMUG disks.
-
-
-
- Table 5
-.pa
- Here is a step-by-step list of the operations necessary to get your
-system up and running:
-
-1. Make backup copies of the diskettes supplied.
-
-2. Put a "system" on each copied diskette using SYSGEN.
-
-3. PIP a copy of PIP.COM and SUBMIT.COM to each copied diskette.
-
-4. PIP a copy of CBAS2.COM and XREF.COM to each copied diskette.
-
-5. Place the copied Program diskette #1 in Drive A.
-
-6. Place a preformatted diskette labeled "Diskette #1 - .INT
- files" in Drive B.
-
-7. Type "SUBMIT COMPILE " to start the batch compilation of
- all .BAS files on the disk. Although the operation will
- proceed without your intervention, it is a good idea to
- monitor the operation to catch any erroneous compilations or
- disk failures. Note any errors and recompile any programs
- that fail to compile correctly the first time.
-
-8. Repeat steps 4, 5, and 6 for diskettes 2 through 5. Label
- each .INT diskette with its proper number.
-
-9. Now SYSGEN a "system" to each .INT diskette. Also PIP a copy
- of CRUN2 to each diskette.
-
-10. You now have an operational set of program diskettes. These
- diskettes will always be run in Drive A and are started up
- with CRUN2 BIZMII. You must ALWAYS start from BIZMII which
- sets up several variables and the %CHAIN function for the
- rest of the programs.
-
-The next step involves creating DATA diskettes for the system.
-Normally DATA diskettes will run in Drive B. The exceptions will
-be where some posting and printing programs require DATA
-diskettes in Drive A and Drive B simultaneously. When this is
-required, an appropriate message is built into the system to
-advise you. The basic DATA diskette requirements are as follows:
-
- All DATA diskettes should be preformatted.
-
-1. GENERAL LEDGER FILE DISKETTE
-
- PIP the following files from diskette #5 as supplied. These
- can be modified later as required.
-
- a. NM Company name file
- b. DATE File containing 8 system dates.
- c. GL Sample General Ledger file.
- d. GLF Numeric Formats file.
- e. GLT General Ledger Tabs file.
- f. GLREF General Ledger Account # Reference file.
- g. GLH General Ledger HEADINGs file.
- h. GLS General Ledger SUBHEADINGs file.
-
-
-2. JOURNAL FILES DISKETTE
-
- This must be a separate diskette from the GENERAL LEDGER
- DISKETTE above. These files will be created by the user as
- required.
-
- a. GLJO General Journal file.
- b. GLCD Check Disbursements file.
- c. GLCK Check Receipts file.
-
-
-3. PAYROLL FILE DISKETTE
-
- PIP the following files from diskette #5. These can be
- modified later as required.
-
- a. NM
- b. DATE
- c. GLF
- d. GLT
- e. EF Federal Withholding Tables.
- f. ES California Withholding Tables.
- g. EPC Payroll Cutoffs and percentages.
- h. EPT Payroll Check Printing Tabs.
-
- The following files will be created when appropriate programs
- are run.
-
- i. EP Employee Master Information file.
- j. TM Time Card file.
- k. EDEP Federal 501 Deposit file.
-
-
-4. CUSTOMER RECEIVABLES FILE DISKETTE
-
- PIP the following files from diskette #5. These can be
- modified later as required.
-
- a. NM
- b. DATE
- c. GLF
- d. GLT
-
- The following files will be created when appropriate programs
- are run.
-
- e. CR Customer Master Information file.
-
-
-5. INVOICE REGISTER (ORDER ENTRY) FILE DISKETTE
-
- Place program diskette #3 in Drive A. Place the INVOICE
- REGISTER diskette in Drive B.
-
- Issue a Control C (hold control key and type letter C).
-
- Type "CRUN2 INVENT". Creates INV (Invoice # file).
-
- The system will prompt you to allow Invoice # set-up.
-
- If you enter a "0", invoices can be randomly numbered.
-
- If you desire "forced sequential" Invoice numbers, type in
- the number of your first invoice.
-
- The system will take care of the rest. Other files will be
- created when appropriate programs are run.
-
- a. IR Invoice Register (Order) file.
-
-
-6. VENDOR PAYABLES FILE DISKETTE
-
- This is as #4, Customer diskette.
-
- e. VP Vendor Master Information file.
-
-
-
-7. PURCHASE ORDER REGISTER DISKETTE
-
- This is as #5 but do CRUN2 POENT to set number. Creates POE.
- a. PR Purchase Order Register file.
-
-
-8. INVENTORY / FINISHED GOODS FILE DISKETTE
-
- This file, if under 50 records, can be placed on the Customer
- Information diskette to speed order entry processing. If more
- items are required, make a separate diskette and include NM,
- DATE, GLF, and GLT.
-
-
-9. ALL OTHER DISKETTES
-
- All other diskettes except the mailing list files will
- require at least NM, DATE, GLF, and GLT.
-
-
-
-
- *** N O T I C E ***
-
-In all of the following operations, the first two entries labeled
-TAG and REFERENCE # or ACCOUNT #, must be NON-ZERO.
-
-If the TAG is zero (0), the record is assumed to be deleted and
-is ignored.
-
-If the REFERENCE # or ACCOUNT # is zero (0), the system treats
-that record as the last record in the file (end-of-file).
-
diff --git a/bwbtest/C77B/APPENDF.TXT b/bwbtest/C77B/APPENDF.TXT
deleted file mode 100644
index 47ced93..0000000
--- a/bwbtest/C77B/APPENDF.TXT
+++ /dev/null
@@ -1,617 +0,0 @@
-.pl 66
- APPENDIX F
-
- General File Information
-
- Perhaps the most important aspect of any business system is
-the general DATA file structure and the way data files are
-handled. In this system, all access to general DATA files is
-RANDOM or DIRECT. This means that we call each DATA file entry by
-a relative record number.
-
- The records are established via the ??ENTRY and ????TRAN
-programs. If a program that requires DATA files is entered and
-the file is NOT found on the disk in drive "B", the program
-"defaults" to the create new file part. It will ask you to either
-insert a diskette with the appropriate file in the drive and type
-"c" to continue or, if you want to create the file for the first
-time, typing an "n" will cause the system to ask you how many
-records you want.
-
- You should have some notion of the number of records
-required. In payroll for example if you have 10 employees, it
-would be reasonable to create between 15 and 25 records. In this
-way your data files can be established without sample files but
-for test purposes, running the sample files included can be very
-educational.
-
- In the file layouts that follow, the contents of each DATA
-record are shown. A group of DATA records makes up a file. In
-each of the layouts that follow the generic name of the file is
-indicated first, followed by the name used on the file diskette.
-COMPANY NAME ENTRY FILE is a generic name, NM is the actual file
-name on the diskette. Each record is 170 total bytes or
-characters long and contains the entries shown as Items 1 through
-11.
-
- The Item is followed by a description and a byte or character
-length for each item. The variable name most commonly used is the
-last entry.
-
-
-
-
-NAME ENTRY FILE NA (170 bytes)
-
-Item # Description Bytes Expression
-
-1 Tag 4 N(2,1)
-2 Ref Number 10 N(2,2)
-3 Name 24 K$(3,3)
-4 Company 24 K$(3,4)
-5 Address 24 K$(3,5)
-6 City 17 K$(3,6)
-7 State 2 K$(3,7)
-8 Zip Code 5 K$(3,8)
-9 Telephone 14 K$(3,9)
-10 Federal Tax ID # 20 K$(3,10)
-11 State Tax ID # 20 K$(3,11)
-
-
-DATE INFORMATION DATE
-
-
-Item # Description Bytes Expression
-
-1 Current date 8 D$(1)
-2 Period ending 8 D$(2)
-3 Prev period ending 8 D$(3)
-4 Month ending 8 D$(4)
-5 Quarter ending 8 D$(5)
-6 Year ending 8 D$(6)
-7 Reserved 8 D$(7)
-8 Fiscal ending 8 D$(8)
-
-
-
-
-
-
-
-
-
-
-GENERAL LEDGER REPORT TABS GLT
-
-
-Item # Description Bytes Expression
-
-1 Page width 3 T%(1)
-2 Tag tab 3 T%(2)
-3 Account number tab 3 T%(3)
-4 Major heading tab 3 T%(4)
-5 Subheading tab 3 T%(5)
-6 Partial total tab 3 T%(6)
-7 Partial tot dollar tab 3 T%(7)
-8 Final total tab 3 T%(8)
-9 Final tot dollar tab 3 T%(9)
-10 Date tab 3 T%(10)
-11 Page number tab 3 T%(11)
-12 Comp Name in Use Tag 3 T%(12)
-13 Lowest Bal Sht Acct # 10 T(13)
-14 Highest Bal Sht Acct # 10 T(14)
-15 Low Cost of Gds Acct # 10 T(15)
-16 Hi Cost of Gds Acct # 10 T(16)
-
-
-GENERAL LEDGER FORMATS GLF
-
-
-Item # Description Bytes Expression
-
-1 Dollar formats 20 L$
-2 Percentage formats 20 P$
-
-
-
-
-
-
-
-
-
-
-GENERAL LEDGER HEADING FILE GLH (150 bytes)
-
-
-Item # Description Bytes Expression
-
-1 Tag 4 N(2,1)
-2 Ledger Acct Number 10 N(2,2)
-3 Description 30 K$(3,3)
-4 First Acct Number 10 N(2,4)
-5 Last Acct Number 10 N(2,5)
-6 M-T-D Amount 12 N(2,6)
-7 Q-T-D Amount 12 N(2,7)
-8 Y-T-D Amount 12 N(2,8)
-9 M-T-D Percent 12 N(2,9)
-10 Q-T-D Percent 12 N(2,10)
-11 Y-T-D Percent 12 N(2,11)
-
-
-GENERAL LEDGER SUBHEADING FILE GLS (150 bytes)
-
-
-Item # Description Bytes Expression
-
-1 Tag 4 N(2,1)
-2 Ledger Acct Number 10 N(2,2)
-3 Description 30 K$(3,3)
-4 First Acct Number 10 N(2,4)
-5 Last Acct Number 10 N(2,5)
-6 M-T-D Amount 12 N(2,6)
-7 Q-T-D Amount 12 N(2,7)
-8 Y-T-D Amount 12 N(2,8)
-9 M-T-D Percent 12 N(2,9)
-10 Q-T-D Percent 12 N(2,10)
-11 Y-T-D Percent 12 N(2,11)
-
-
-
-
-
-
-PAYROLL CUTOFF AMOUNTS EPC
-
-
-Item # Description Bytes Expression
-
-1 FICA Cutoff 12 C(1)
-2 FICA Percent 12 C(2)
-3 SDI Cutoff 12 C(3)
-4 SDI Percent 12 C(4)
-5 FUTA Cutoff 12 C(5)
-6 FUTA Percent 12 C(6)
-7 SUTA Cutoff 12 C(7)
-8 SUTA Percent 12 C(8)
-
-Settings
-FICA 29,700 .0665
-SDI 11,400 .01
-FUTA 6,000 .007
-SUTA 6,000 ?
-
-
-.pa
-GENERAL LEDGER FILE GL (138 bytes)
-
-
-Item # Description Bytes Expression
-
-1 Tag 4 N(2,1)
-2 Ledger Acct Number 10 N(2,2)
-3 Description 30 K$(3,3)
-4 Month to date amt 12 N(2,4)
-5 Quarter to date amt 12 N(2,5)
-6 Year to date amt 12 N(2,6)
-7 Prev m to date 12 N(2,7)
-8 Prev q to date 12 N(2,8)
-9 Prev y to date 12 N(2,9)
-10 Budgeted amt 12 N(2,10)
-
-
-GENERAL JOURNAL GLJO (250 bytes)
-
-Item # Description Bytes Expression
-
-1 Tag 8 N(2,1)
-2 Major Acct # 10 N(2,2)
-3 Date 8 K$(3,3)
-4 To record 24 K$(3,4)
-5 Remarks 24 K$(3,5)
-6 Not used 1 K$(3,6)
-7 Major Amt 12 N(2,7)
-8 #1 Acct # 10 N(2,8)
-9 #1 Amount 12 N(2,9)
-10 #2 Acct # 10 N(2,10)
-11 #2 Amount 12 N(2,11)
-12 #3 Acct # 10 N(2,12)
-13 #3 Amount 12 N(2,13)
-14 #4 Acct # 10 N(2,14)
-15 #4 Amount 12 N(2,15)
-16 #5 Acct # 10 N(2,16)
-17 #5 Amount 12 N(2,17)
-18 #6 Acct # 10 N(2,18)
-19 #6 Amount 12 N(2,19)
-CHECK DISBURSEMENTS GLCD (250 bytes)
-
-Item # Description Bytes Expression
-
-1 Check # 8 N(2,1)
-2 Bank Acct # 10 N(2,2)
-3 Date 8 K$(3,3)
-4 In favor of 24 K$(3,4)
-5 Remarks 24 K$(3,5)
-6 Print Check(Y/N) 1 K$(3,6)
-7 Amount of check 12 N(2,7)
-8 #1 Acct # 10 N(2,8)
-9 #1 Amount 12 N(2,9)
-10 #2 Acct # 10 N(2,10)
-11 #2 Amount 12 N(2,11)
-12 #3 Acct # 10 N(2,12)
-13 #3 Amount 12 N(2,13)
-14 #4 Acct # 10 N(2,14)
-15 #4 Amount 12 N(2,15)
-16 #5 Acct # 10 N(2,16)
-17 #5 Amount 12 N(2,17)
-18 #6 Acct # 10 N(2,18)
-19 #6 Amount 12 N(2,19)
-
-
-CHECK RECEIPTS GLCK (250 bytes)
-
-Item # Description Bytes Expression
-
-1 Cust Tag # 8 N(2,1)
-2 Deposit Acct # 10 N(2,2)
-3 Date 8 K$(3,3)
-4 From 24 K$(3,4)
-5 For(remarks) 24 K$(3,5)
-6 Deposit Slip(Y/N) 1 K$(3,6)
-7 Amount of check 12 N(2,7)
-8 #1 Acct # 10 N(2,8)
-9 #1 Amount 12 N(2,9)
-10 #2 Acct # 10 N(2,10)
-11 #2 Amount 12 N(2,11)
-12 #3 Acct # 10 N(2,12)
-13 #3 Amount 12 N(2,13)
-14 #4 Acct # 10 N(2,14)
-15 #4 Amount 12 N(2,15)
-16 #5 Acct # 10 N(2,16)
-17 #5 Amount 12 N(2,17)
-18 #6 Acct # 10 N(2,18)
-19 #6 Amount 12 N(2,19)
-
-
-CONSOLIDATED EMPLOYEE PAYROLL EP (512 bytes)
-
-Item # Description Bytes Expression
-
-1 Employee # 8 N(2,1)
-2 Acct Number 10 N(2,2)
-3 Name 24 K$(3,3)
-4 Company 24 K$(3,4)
-5 Address 24 K$(3,5)
-6 City 17 K$(3,6)
-7 State 2 K$(3,7)
-8 Zip Code 5 K$(3,8)
-9 Telephone 14 K$(3,9)
-10 Soc Sec # 11 K$(3,10)
-11 Emp Date 8 K$(3,11)
-12 Term Date 8 K$(3,12)
-13 Marital Stat 2 K$(3,13)
-14 Hourly of salaried 1 K$(3,14)
-15 Pay periods - W/B/S/M 1 K$(3,15)
-16 Num of Exemptions 4 N(2,16)
-17 Hourly Rate 6 N(2,17)
-18 Hours this period 6 N(2,18)
-19 Quar to date hrs 6 N(2,19)
-20 Year to date hrs 6 N(2,20)
-
-Record X+1
-
-1 Gross Pay 12 N(0,1)
-2 Q-T-D Gross Pay 12 N(0,2)
-3 Y-T-D Gross Pay 12 N(0,3)
-4 FICA 12 N(0,4)
-5 Q-T-D FICA 12 N(0,5)
-6 Y-T-D FICA 12 N(0,6)
-7 Federal Tax 12 N(0,7)
-8 Q-T-D Federal Tax 12 N(0,8)
-9 Y-T-D Federal Tax 12 N(0,9)
-10 State Tax 12 N(0,10)
-11 Q-T-D State Tax 12 N(0,11)
-12 Y-T-D State Tax 12 N(0,12)
-13 State Disability 12 N(0,13)
-14 Q-T-D SDI 12 N(0,14)
-15 Y-T-D SDI 12 N(0,15)
-16 Misc Deductions 12 N(0,16)
-17 Q-T-D Misc Ded 12 N(0,17)
-18 Y-T-D Misc Ded 12 N(0,18)
-
-
-TIME CARD RECORD TM (128 bytes)
-
-Item # Description Bytes Expression
-
-1 Employee # 8 N(2,1)
-2 Acct Number 10 N(2,2)
-3 Name 24 K$(3,3)
-4 Pay period # 4 N(2,4)
-5 Reportable tips 12 N(2,5)
-6 Misc deductions 12 N(2,6)
-7 Regular hours 4 N(2,7)
-8 Time & 1/2 hours 4 N(2,8)
-9 Double time hours 4 N(2,9)
-10 Sick time hours 4 N(2,10)
-11 Holiday time hours 4 N(2,11)
-12 Vacation hours 4 N(2,12)
-
-.pa
-CONSOLIDATED EMPLOYEE PAYROLL CEP
-
-Item # Description Bytes Expression
-
-16 Num of Exemptions 4 N
-17 Hourly Rate 6 R
-18 Hours this period 6 H1
-19 Quar to date hrs 6 H2
-20 Year to date hrs 6 H3
-
-Record X+1
-
-1 Gross pay 12 E0
-2 Q-T-D Gross pay 12 E1
-3 Y-T-D Gross pay 12 E2
-4 FICA 12 F1
-5 Q-T-D FICA 12 F2
-6 Y-T-D FICA 12 F3
-7 Federal Tax 12 E3
-8 Q-T-D Federal Tax 12 E4
-9 Y-T-D Federal Tax 12 E5
-10 State Tax 12 E6
-11 Q-T-D State Tax 12 E7
-12 Y-T-D State Tax 12 E8
-13 State Disability 12 S1
-14 Q-T-D SDI 12 S2
-15 Y-T-D SDI 12 S3
-16 Misc Deductions 12 M1
-17 Q-T-D Misc Ded 12 M2
-18 Y-T-D Misc Ded 12 M3
-
-.pa
-Hourly payroll is calculated on full hours worked.
-
-For salaried employees, actual hours worked is carried
-but payroll is calculated on number of hours in the
-payroll period.
-
-WEEKLY=W 52 periods/year 7 days 40 hours
-BIWEEKLY=B 26 periods/year 14 days 80 hours
-SEMIMON=S 24 periods/year 15.2 days 86.66667 hours
-MONTHLY=M 12 periods/year 30.4 days 173.33333 hours
-
-
-FEDERAL DEPOSIT RECORD EDEP (64 bytes)
-
-Item # Description Bytes Expression
-
-1 Quarter(1,2,3 or 4) 1 N(2,1)
-2 Month(1,2,3) 1 N(2,2)
-3 Period(1,2,3 or 4) 1 N(2,3)
-4 Tax liability 12 N(2,4)
-5 Amt of deposit 12 N(2,5)
-6 Check # 8 K$(2,6)
-7 Date of deposit 8 K$(2,7)
-.pa
-CUSTOMER RECEIVABLES FILE CR (384 bytes)
-
-Item # Description Bytes Expression
-
-1 Tag 4 N(2,1)
-2 Acct Number 10 N(2,2)
-3 Name (attention) 24 K$(3,3)
-4 Company 24 K$(3,4)
-5 Address 24 K$(3,5)
-6 City 17 K$(3,6)
-7 State 2 K$(3,7)
-8 Zip Code 5 K$(3,8)
-9 Phone 14 K$(3,9)
-
-Shipping
-
-10 Name (attention) 24 K$(3,10)
-11 Company 24 K$(3,11)
-12 Address 24 K$(3,12)
-13 City 17 K$(3,13)
-14 State 2 K$(3,14)
-15 Zip Code 5 K$(3,15)
-16 Phone 14 K$(3,16)
-17 Date of last pmnt 8 K$(3,17)
-
-Record X+1
-
-1 Amt of last pmnt 12 N(2,3)
-2 Total y to date 12 N(2,4)
-3 Current charges 12 N(2,5)
-4 30-60 days 12 N(2,6)
-5 61-90 days 12 N(2,7)
-6 Over 90 days 12 N(2,8)
-
-
-.pa
-INVOICE REGISTER IR (384 bytes)
-
-Item # Description Bytes Expression
-
-1 Tag 8 N(2,1)
-2 A/R Acct # 10 N(2,2)
-3 Invoice # 10 N(2,3)
-4 Salesman 24 K$(3,4)
-5 Cust. Order # 24 K$(3,5)
-6 Shipping date 8 K$(3,6)
-7 Carrier (via) 8 K$(3,7)
-8 FOB Point 10 K$(3,8)
-9 Terms 10 K$(3,9)
-10 Tax Code 1 K$(3,10)
-11 Post,invoice,register 4 K$(3,11)
-12 Customer Tag # 4 N(2,12)
-13 Shipping Chgs 12 N(2,13)
-
-Record X+1
-
-1 - 10 Finished Goods Tag 4 G(1) - G(10)
-1 - 10 Quantity 10 Q(1) - Q(10)
-
-Calculate total invoice amount
-Calculate sales tax
-
-Questions:
-1. Do you want a picture of finished invoice
-2. Do you want order pick slips
-3. Shall we backorder low of out-of-stock items
-
-
-.pa
-VENDOR PAYABLES FILE VP (384 bytes)
-
-Item # Description Bytes Expression
-
-1 Tag 4 N(2,1)
-2 Acct Number 10 N(2,2)
-3 Name (attention) 24 K$(3,3)
-4 Company 24 K$(3,4)
-5 Address 24 K$(3,5)
-6 City 17 K$(3,6)
-7 State 2 K$(3,7)
-8 Zip Code 5 K$(3,8)
-9 Phone 14 K$(3,9)
-
-Shipping
-
-10 Name (attention) 24 K$(3,10)
-11 Company 24 K$(3,11)
-12 Address 24 K$(3,12)
-13 City 17 K$(3,13)
-14 State 2 K$(3,14)
-15 Zip Code 5 K$(3,15)
-16 Phone 14 K$(3,16)
-17 Date of last pmnt 8 K$(3,17)
-
-Record X+1
-
-1 Amt of last pmnt 12 N(2,3)
-2 Total y to date 12 N(2,4)
-3 Current charges 12 N(2,5)
-4 30-60 days 12 N(2,6)
-5 61-90 days 12 N(2,7)
-6 Over 90 days 12 N(2,8)
-
-
-.pa
-PURCHASE ORDER REGISTER PO (384 bytes)
-
-Item # Description Bytes Expression
-
-1 Tag 8 N(2,1)
-2 A/P Acct # 10 N(2,2)
-3 Purchase order # 10 N(2,3)
-4 Buyer 24 K$(3,4)
-5 Our Order # 24 K$(3,5)
-6 Required date 8 K$(3,6)
-7 Carrier (via) 8 K$(3,7)
-8 FOB Point 10 K$(3,8)
-9 Terms 10 K$(3,9)
-10 Tax Code 1 K$(3,10)
-11 Post,invoice,register 4 K$(3,11)
-12 Vendor Tag # 4 N(2,12)
-13 Shipping chgs 12 N(2,13)
-
-Record X+1
-
-1 - 10 Finished Goods Tag 4 G(1) - G(10)
-1 - 10 Quantity 10 Q(1) - Q(10)
-.pa
-FINISHED GOODS INVENTORY FG (256 bytes)
-
-Item # Description Bytes Expression
-
-1 Tag 4 N(2,1)
-2 Acct Number 10 N(2,2)
-3 Item # 7 K$(3,3)
-4 Part # 12 K$(3,4)
-5 Description 24 K$(3,5)
-6 Location(shelf,bin) 24 K$(3,6)
-7 Date of last issue 8 K$(3,7)
-8 Date of last receipt 8 K$(3,8)
-9 Vendor Code 10 K$(3,9)
-10 Vendor Tag # 4 N(2,10)
-11 Unit Cost 12 N(2,11)
-12 Selling Price 12 N(2,12)
-13 Quan on hand 8 N(2,13)
-14 Quan on order 8 N(2,14)
-15 Quan issued m-t-d 10 N(2,15)
-16 Quan issued q-t-d 10 N(2,16)
-17 Quan issued y-t-d 10 N(2,17)
-18 Min quan (stock) 10 N(2,18)
-19 Max quan (stock) 10 N(2,19)
-
-Calculate average cost
-Calculate reorder quantity
-
-
-.pa
-RAW GOODS INVENTORY RG (256 bytes)
-
-Item # Description Bytes Expression
-
-1 Tag 4 N(2,1)
-2 Acct Number 10 N(2,2)
-3 Item # 7 K$(3,3)
-4 Part # 12 K$(3,4)
-5 Description 24 K$(3,5)
-6 Location(shelf,bin) 24 K$(3,6)
-7 Date of last issue 8 K$(3,7)
-8 Date of last receipt 8 K$(3,8)
-9 Vendor Code 10 K$(3,9)
-10 Vendor Tag # 4 N(2,10)
-11 Unit Cost 12 N(2,11)
-12 Selling Price 12 N(2,12)
-13 Quan on hand 8 N(2,13)
-14 Quan on order 8 N(2,14)
-15 Quan issued m-t-d 10 N(2,15)
-16 Quan issued q-t-d 10 N(2,16)
-17 Quan issued y-t-d 10 N(2,17)
-18 Min quan (stock) 10 N(2,18)
-19 Max quan (stock) 10 N(2,19)
-
-
-Calculate average cost
-Calculate reorder quantity
-.pa
-MAILING LIST FILE MA (150 bytes)
-
-Item # Description Bytes Expression
-
-1 Tag 4 N(2,1)
-2 Ref Number 10 N(2,2)
-3 Name 24 K$(3,3)
-4 Company 24 K$(3,4)
-5 Address 24 K$(3,5)
-6 City 17 K$(3,6)
-7 State 2 K$(3,7)
-8 Zip Code 5 K$(3,8)
-9 Telephone 14 K$(3,9)
-.pa
-CAPITAL GOODS INVENTORY CG (256 bytes)
-
-Item # Description Bytes Expression
-
-1 Tag 4 N(2,1)
-2 Fixed Asset Acct # 10 N(2,2)
-3 Depreciation Acct # 10 N(2,3)
-4 Description 24 K$(3,4)
-5 Location 24 K$(3,5)
-6 New or Used 1 K$(3,6)
-7 Date acquired 8 K$(3,7)
-8 Depreciation method 2 K$(3,8)
-9 Cost or Basis 12 N(2,9) D1
-10 Depreciable basis 12 N(2,10) D2
-11 Prior years dep. 12 N(2,11) D3
-12 Useful life 4 N(2,12) D4
-13 Remaining life 4 N(2,13) D5
-14 Month to date dep. 12 N(2,14) D6
-15 Quarter to date dep. 12 N(2,15) D7
-16 Year to date dep. 12 N(2,16) D8
-17 Salvage value 12 N(2,17) D9
-
diff --git a/bwbtest/C77B/APPENDG.TXT b/bwbtest/C77B/APPENDG.TXT
deleted file mode 100644
index 0ad1bf6..0000000
--- a/bwbtest/C77B/APPENDG.TXT
+++ /dev/null
@@ -1,257 +0,0 @@
-.pl 66
- APPENDIX G
-
-ASSETS
-
-Tag Account # Description
-***********************************************************
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-
-.pa
-LIABILITIES
-
-Tag Account # Description
-***********************************************************
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-
-.pa
-EQUITY
-
-Tag Account # Description
-***********************************************************
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-
-.pa
-SALES
-
-Tag Account # Description
-***********************************************************
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-
-.pa
-EXPENSES
-
-Tag Account # Description
-***********************************************************
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-| | | |
------------------------------------------------------------
-
-.pa
-HEADINGS
-
-Tag Account # Description 1st Acct 2nd Acct
- Number Number
-***********************************************************
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-
-.pa
-SUBHEADINGS
-
-Tag Account # Description 1st Acct 2nd Acct
- Number Number
-***********************************************************
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-| | | | | |
------------------------------------------------------------
-
-
diff --git a/bwbtest/C77B/APPENDH.TXT b/bwbtest/C77B/APPENDH.TXT
deleted file mode 100644
index a77045c..0000000
--- a/bwbtest/C77B/APPENDH.TXT
+++ /dev/null
@@ -1,37 +0,0 @@
-.pl 66
- APPENDIX H
-
- It is possible to increase the size of a file. Each file has
-an associated SIZE file created with it and maintained throughout
-its life. For the GL file (for example) this file is called
-GLSIZE.
-
- When examined using any CPM Editor this file will be found to
-contain two numbers separated by a comma such as 38,100. The
-first number is the NEXT AVAILABLE RECORD. The second number is
-the TOTAL RECORDS.
-
- The following steps will allow the file size to be increased.
-
-1. Use any CPM Editor to enter the xxSIZE file as you would
- enter any document file.
-
-2. Change the number AFTER the comma to the new file size you
- desire.
-
-3. Exit from the editor and erase any .BAK file.
-
-4. Immediately start the system and proceed with the necessary
- menu calls to the General Ledger Entry program (in this
- example) or whatever file you are changing.
-
-5. Immediately do a BACK-UP AND SORT operation. The numbers
- shown in the menu before the BACK-UP AND SORT operation will
- be the new numbers you have entered but the actual data file
- WILL NOT have been increased in size to accomodate the extra
- records. Running the BACK-UP AND SORT operation is the ONLY
- way to physically increase the size of the data file.
-
- Obviously it is better to create a file with ample space to
-begin with but Murphy's Law DOES prevail.
-
\ No newline at end of file
diff --git a/bwbtest/C77B/BIZMII.BAS b/bwbtest/C77B/BIZMII.BAS
deleted file mode 100644
index b954176..0000000
--- a/bwbtest/C77B/BIZMII.BAS
+++ /dev/null
@@ -1,100 +0,0 @@
-1 rem This is the Master Menu Businessmaster II. (bizmii)
-
-%INCLUDE ALL.BAS
-%INCLUDE CHECK.BAS
-
-500 CONSOLE
-RESTORE
-1025 print clear$:print
-print "*** BusinessMaster II Master Menu ***"
-print
-2000 PRINT "1 - GENERAL LEDGER/GENERAL JOURNAL OPERATIONS" : REM MASTER1
-2010 PRINT
-2020 PRINT "2 - ORDER ENTRY/RECEIVABLES OPERATIONS" : REM MASTER2
-2030 PRINT
-2040 PRINT "3 - PURCHASE ORDER/PAYABLES OPERATIONS" : REM MASTER3
-2050 PRINT
-2060 PRINT "4 - INVENTORY OPERATIONS" : REM MASTER4
-2070 PRINT
-2080 PRINT "5 - EMPLOYEE PAYROLL OPERATIONS" : REM MASTER5
-2090 PRINT
-2100 PRINT "6 - MAILING LIST OPERATIONS" : REM MASTER6
-2110 PRINT
-IF CHECK5<>1 THEN PRINT ON$;
-2120 PRINT "7 - INITIALIZE SYSTEM/START-UP/MODIFY SYSTEM";"/ * DAILY DATE CHANGE *" : REM MASTER7
-IF CHECK5<>1 THEN PRINT OFF$;
-2130 PRINT
-2140 PRINT "8 - PERIODIC FILE MAINTENANCE" : REM MASTER8
-2150 PRINT
-2160 PRINT "9 - FINISHED"
-3000 PRINT
-3010 INPUT Z
-IF Z=20 THEN GOSUB 9600:GOTO 1025
-3020 IF Z<1 OR Z>9 THEN 1025
-4000 ON Z GOTO 9000,9050,9100,9150,9200,9250,9300,9350,9400
-9000 PRINT clear$:PRINT:PRINT"INSTALL PROGRAM DISK #1."
-9010 PRINT:INPUT "TYPE RETURN WHEN READY.";line temp$
-initialize
-9020 CHAIN "MASTER1"
-9050 PRINT clear$:PRINT:PRINT"INSTALL PROGRAM DISK #3."
-9060 PRINT:INPUT "TYPE RETURN WHEN READY.";line temp$
-initialize
-9070 CHAIN "MASTER2"
-9100 PRINT clear$:PRINT:PRINT"INSTALL PROGRAM DISK #3."
-9110 PRINT:INPUT "TYPE RETURN WHEN READY.";line temp$
-initialize
-9120 CHAIN "MASTER3"
-9150 PRINT clear$:PRINT:PRINT"INSTALL PROGRAM DISK #4."
-9160 PRINT:INPUT "TYPE RETURN WHEN READY.";line temp$
-initialize
-9170 CHAIN "MASTER4"
-9200 PRINT clear$:PRINT:PRINT"INSTALL PROGRAM DISK #2."
-9210 PRINT:INPUT "TYPE RETURN WHEN READY.";line temp$
-initialize
-9220 CHAIN "MASTER5"
-9250 PRINT clear$:PRINT:PRINT"INSTALL PROGRAM DISK #4."
-9260 PRINT:INPUT "TYPE RETURN WHEN READY.";line temp$
-initialize
-9270 CHAIN "MASTER6"
-initialize
-9300 CHAIN "MASTER7"
-9350 PRINT clear$:PRINT:PRINT"INSTALL PROGRAM DISK #5."
-9360 PRINT:INPUT "TYPE RETURN WHEN READY.";line temp$
-initialize
-9370 CHAIN "MASTER8"
-9400 IF Z>8 THEN 9700
-9500 GOTO 1025
-9600 PRINT CLEAR$;
-PRINT "DATES FOR THIS RUN :"
-FOR I%=1 TO 8
-PRINT I%,DATE1$(I%),D$(I%)
-NEXT I%
-PRINT
-PRINT "NAME FOR THIS RUN :"
-PRINT
-PRINT LEFT$(CO.NAME$,48)
-PRINT
-PRINT "TABS FOR THIS RUN :"
-L$="#####"
-PRINT USING L$;T%(1);T%(2);T%(3);T%(4);T%(5);T%(6);T%(7);T%(8)
-PRINT USING L$;T%(9);T%(10);T%(11);T%(12);A(13);A(14);A(15);A(16)
-PRINT
-PRINT "PRINT FORMATS FOR THIS RUN :"
-PRINT LLL$,PPP$
-input "To continue type ";line temp$
-RETURN
-9700 REM SETUP BOOT
-REM CREATE "$$$.SUB" RECL 128 AS 20
-REM PRINT #20;"CRUN2 BIZMII.INT$ "
-REM CLOSE 20
-PRINT CLEAR$
-PRINT CUR$
-PRINT " *********** SYSTEM SHUT-DOWN ***********"
-PRINT:PRINT
-PRINT " TAKE YOUR DISKS OUT OF ALL DRIVES"
-PRINT
-PRINT " THEN TURN YOUR SYSTEM OFF"
-9800 REM GOTO 9800
-REM %CHAIN 50,10500,700,1000
-END
-
diff --git a/bwbtest/C77B/BIZMII.INP b/bwbtest/C77B/BIZMII.INP
deleted file mode 100644
index c243667..0000000
--- a/bwbtest/C77B/BIZMII.INP
+++ /dev/null
@@ -1,253 +0,0 @@
-1
-OK
-2
-OK
-5
-OK
-6
-OK
-Y
-O
-7
-OK
-O
-Y
-8
-OK
-9
-OK
-2
-OK
-3
-OK
-OK
-OK
-OK
-OK
-OK
-4
-OK
-OK
-OK
-OK
-OK
-OK
-5
-OK
-OK
-OK
-OK
-OK
-OK
-8
-OK
-2
-2.6
-2
-6
-OK
-3
-OK
-3
-OK
-OK
-OK
-OK
-4
-OK
-OK
-OK
-OK
-4
-OK
-OK
-OK
-OK
-5
-OK
-OK
-OK
-OK
-7
-OK
-OK
-8
-OK
-2
-2.6
-2
-6
-OK
-4
-OK
-3
-OK
-4
-OK
-5
-OK
-6
-OK
-7
-OK
-3
-OK
-OK
-4
-OK
-OK
-1234567890
-5
-8
-OK
-5
-OK
-3
-OK
-4
-OK
-5
-OK
-N
-OK
-8
-OK
-1
-OK
-0
-0
-0
-4
-0
-0
-12/31/78
-8
-OK
-2
-8
-OK
-3
-OK
-NO
-NO
-NO
-TX
-OK
-9
-OK
-6
-OK
-2
-OK
-MA0
-2
-2.6
-2
-3
-OK
-2
-2.6
-2
-4
-OK
-2
-2.6
-2
-5
-OK
-2
-2.6
-2
-6
-OK
-7
-1
-OK
-2
-NO
-OK
-6
-2
-OK
-2
-OK
-6
-OK
-7
-3
-OK
-2
-NO
-OK
-6
-4
-1
-OK
-8
-2
-1
-F
-9
-OK
-7
-4
-2
-OK
-8
-2
-1
-F
-9
-OK
-7
-4
-3
-5
-OK
-2
-1
-F
-8
-9
-OK
-
-1
-OK
-1
-OK
-1
-100
-110
-THIS IS A TEST
-11
-NO
-YES
-8
-3
-70
-10
-111111.11
-YES
-4
-2222.22
-YES
-5
-33333.33
-YES
-11
-NO
-YES
-8
-3
-70
-6
-44444.44
-NO
-YES
-8
-9
-8
-OK
-9
-OK
-9
diff --git a/bwbtest/C77B/BIZMII.run b/bwbtest/C77B/BIZMII.run
deleted file mode 100644
index e784b0f..0000000
--- a/bwbtest/C77B/BIZMII.run
+++ /dev/null
@@ -1,3190 +0,0 @@
-
-
-LOADING DATES
-
-LOADING FORMATS
-
-LOADING TABS
-
-LOADING NAMES
-
-
-*** BusinessMaster II Master Menu ***
-
-1 - GENERAL LEDGER/GENERAL JOURNAL OPERATIONS
-
-2 - ORDER ENTRY/RECEIVABLES OPERATIONS
-
-3 - PURCHASE ORDER/PAYABLES OPERATIONS
-
-4 - INVENTORY OPERATIONS
-
-5 - EMPLOYEE PAYROLL OPERATIONS
-
-6 - MAILING LIST OPERATIONS
-
-7 - INITIALIZE SYSTEM/START-UP/MODIFY SYSTEM/ * DAILY DATE CHANGE *
-
-8 - PERIODIC FILE MAINTENANCE
-
-9 - FINISHED
-
-? 1
-
-
-INSTALL PROGRAM DISK #1.
-
-TYPE RETURN WHEN READY.? OK
-
-
-*** GENERAL LEDGER - JOURNAL MENU ***
-
-1 - ENTER G/L ACCOUNTS - MAKE ADJUSTING ENTRIES
-
-2 - LIST THE CHART OF ACCOUNTS
-
-3 - ENTER DISBURSEMENT TRANSACTIONS
-
-4 - ENTER RECEIPTS TRANSACTIONS
-
-5 - PRINT TRIAL BALANCE
-
-6 - PRINT BALANCE SHEET
-
-7 - PRINT INCOME STATEMENTS
-
-8 - PRINT BUDGET ANALYSIS
-
-9 - FINISHED
-
-? 2
-
-
-Install appropriate General Ledger disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING CHART OF ACCOUNTS
-
-
-*** GENERAL LEDGER - JOURNAL MENU ***
-
-1 - ENTER G/L ACCOUNTS - MAKE ADJUSTING ENTRIES
-
-2 - LIST THE CHART OF ACCOUNTS
-
-3 - ENTER DISBURSEMENT TRANSACTIONS
-
-4 - ENTER RECEIPTS TRANSACTIONS
-
-5 - PRINT TRIAL BALANCE
-
-6 - PRINT BALANCE SHEET
-
-7 - PRINT INCOME STATEMENTS
-
-8 - PRINT BUDGET ANALYSIS
-
-9 - FINISHED
-
-? 5
-
-
-Install appropriate General Ledger disk in Drive B:
-
-Type return to continue.? OK
-6403 < 6404 - LINE OUT OF ORDER: 6403 IF N(2,2)=0 THEN
-
-
-
-
-PRINTING TRIAL BALANCE
-
-
-*** GENERAL LEDGER - JOURNAL MENU ***
-
-1 - ENTER G/L ACCOUNTS - MAKE ADJUSTING ENTRIES
-
-2 - LIST THE CHART OF ACCOUNTS
-
-3 - ENTER DISBURSEMENT TRANSACTIONS
-
-4 - ENTER RECEIPTS TRANSACTIONS
-
-5 - PRINT TRIAL BALANCE
-
-6 - PRINT BALANCE SHEET
-
-7 - PRINT INCOME STATEMENTS
-
-8 - PRINT BUDGET ANALYSIS
-
-9 - FINISHED
-
-? 6
-
-
-Install appropriate General Ledger disk in Drive B:
-
-Type return to continue.? OK
-
-
-IS THIS BALANCE SHEET TO BE FOR THE MONTH TO DATE,
-QUARTER TO DATE, OR YEAR TO DATE (M, Q, OR Y)?
-? Y
-
-DO YOU WANT AN ORDINARY OR A COMPARATIVE
-BALANCE SHEET (O OR C) ?
-? O
-
-
-
-
-PRINTING BALANCE SHEET
-
-
-*** GENERAL LEDGER - JOURNAL MENU ***
-
-1 - ENTER G/L ACCOUNTS - MAKE ADJUSTING ENTRIES
-
-2 - LIST THE CHART OF ACCOUNTS
-
-3 - ENTER DISBURSEMENT TRANSACTIONS
-
-4 - ENTER RECEIPTS TRANSACTIONS
-
-5 - PRINT TRIAL BALANCE
-
-6 - PRINT BALANCE SHEET
-
-7 - PRINT INCOME STATEMENTS
-
-8 - PRINT BUDGET ANALYSIS
-
-9 - FINISHED
-
-? 7
-
-
-Install appropriate General Ledger disk in Drive B:
-
-Type return to continue.? OK
-
-
-DO YOU WANT AN ORDINARY OR A COMPARATIVE INCOME STATEMENT (O OR C) ? ? O
-
-IS THIS INCOME STATEMENT TO BE FOR THE MONTH TO DATE,
-QUARTER TO DATE, OR YEAR TO DATE (M, Q, OR Y)?
-? Y
-
-
-
-
-PRINTING INCOME STATEMENT
-
-
-*** GENERAL LEDGER - JOURNAL MENU ***
-
-1 - ENTER G/L ACCOUNTS - MAKE ADJUSTING ENTRIES
-
-2 - LIST THE CHART OF ACCOUNTS
-
-3 - ENTER DISBURSEMENT TRANSACTIONS
-
-4 - ENTER RECEIPTS TRANSACTIONS
-
-5 - PRINT TRIAL BALANCE
-
-6 - PRINT BALANCE SHEET
-
-7 - PRINT INCOME STATEMENTS
-
-8 - PRINT BUDGET ANALYSIS
-
-9 - FINISHED
-
-? 8
-
-
-Install appropriate General Ledger disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING EXPENSE BUDGET ANALYSIS
-
-
-*** GENERAL LEDGER - JOURNAL MENU ***
-
-1 - ENTER G/L ACCOUNTS - MAKE ADJUSTING ENTRIES
-
-2 - LIST THE CHART OF ACCOUNTS
-
-3 - ENTER DISBURSEMENT TRANSACTIONS
-
-4 - ENTER RECEIPTS TRANSACTIONS
-
-5 - PRINT TRIAL BALANCE
-
-6 - PRINT BALANCE SHEET
-
-7 - PRINT INCOME STATEMENTS
-
-8 - PRINT BUDGET ANALYSIS
-
-9 - FINISHED
-
-? 9
-
-
-Replace program disk #5 in drive A.
-Type return to continue.
-? OK
-
-
-*** BusinessMaster II Master Menu ***
-
-1 - GENERAL LEDGER/GENERAL JOURNAL OPERATIONS
-
-2 - ORDER ENTRY/RECEIVABLES OPERATIONS
-
-3 - PURCHASE ORDER/PAYABLES OPERATIONS
-
-4 - INVENTORY OPERATIONS
-
-5 - EMPLOYEE PAYROLL OPERATIONS
-
-6 - MAILING LIST OPERATIONS
-
-7 - INITIALIZE SYSTEM/START-UP/MODIFY SYSTEM/ * DAILY DATE CHANGE *
-
-8 - PERIODIC FILE MAINTENANCE
-
-9 - FINISHED
-
-? 2
-
-
-INSTALL PROGRAM DISK #3.
-
-TYPE RETURN WHEN READY.? OK
-
-
-*** SALES ORDER ENTRY / CUSTOMER RECEIVABLES MENU ***
-
-1 - ENTER NEW CUSTOMER INFORMATION
-
-2 - ENTER CUSTOMER ORDERS
-
-3 - LIST CUSTOMER ORDERS
-
-4 - PRINT PLAIN PAPER (FORMATTED) INVOICES
-
-5 - PRINT PRE-PRINTED INVOICES
-
-6 - POST ORDERS TO GENERAL LEDGER
-
-7 - PRINT AGED ACCOUNTS RECEIVABLE REPORT
-
-8 - PRINT CUSTOMER LABELS
-
-9 - FINISHED
-
-? 3
-
-
-Install appropriate Customer Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING INVOICE REGISTER
-
-INSTALL INVOICE REGISTER DISK IN DRIVE A
-
-INSTALL A CUSTOMER DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-
-RECORDS TO BE PRINTED 4
-
-
-TO PRINT REGISTER, TYPE RETURN.? OK
-
-
-INSTALL THE APPROPRIATE FINISHED GOODS DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-INSTALL CUSTOMER DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-INSTALL PROGRAM DISK IN DRIVE A
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-*** SALES ORDER ENTRY / CUSTOMER RECEIVABLES MENU ***
-
-1 - ENTER NEW CUSTOMER INFORMATION
-
-2 - ENTER CUSTOMER ORDERS
-
-3 - LIST CUSTOMER ORDERS
-
-4 - PRINT PLAIN PAPER (FORMATTED) INVOICES
-
-5 - PRINT PRE-PRINTED INVOICES
-
-6 - POST ORDERS TO GENERAL LEDGER
-
-7 - PRINT AGED ACCOUNTS RECEIVABLE REPORT
-
-8 - PRINT CUSTOMER LABELS
-
-9 - FINISHED
-
-? 4
-
-
-Install appropriate Customer Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING INVOICES
-
-INSTALL INVOICE REGISTER DISK IN DRIVE A
-
-INSTALL A CUSTOMER DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-
-INVOICES TO BE PRINTED 4
-
-
-TO PRINT INVOICES, TYPE RETURN.? OK
-
-
-INSTALL THE APPROPRIATE FINISHED GOODS DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-INSTALL CUSTOMER DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-INSTALL PROGRAM DISK IN DRIVE A
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-*** SALES ORDER ENTRY / CUSTOMER RECEIVABLES MENU ***
-
-1 - ENTER NEW CUSTOMER INFORMATION
-
-2 - ENTER CUSTOMER ORDERS
-
-3 - LIST CUSTOMER ORDERS
-
-4 - PRINT PLAIN PAPER (FORMATTED) INVOICES
-
-5 - PRINT PRE-PRINTED INVOICES
-
-6 - POST ORDERS TO GENERAL LEDGER
-
-7 - PRINT AGED ACCOUNTS RECEIVABLE REPORT
-
-8 - PRINT CUSTOMER LABELS
-
-9 - FINISHED
-
-? 5
-
-
-Install appropriate Customer Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING INVOICES
-
-INSTALL INVOICE REGISTER DISK IN DRIVE A
-
-INSTALL A CUSTOMER DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-
-INVOICES TO BE PRINTED 4
-
-
-TO PRINT INVOICES, TYPE RETURN.? OK
-
-
-INSTALL THE APPROPRIATE FINISHED GOODS DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-INSTALL CUSTOMER DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-INSTALL PROGRAM DISK IN DRIVE A
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-*** SALES ORDER ENTRY / CUSTOMER RECEIVABLES MENU ***
-
-1 - ENTER NEW CUSTOMER INFORMATION
-
-2 - ENTER CUSTOMER ORDERS
-
-3 - LIST CUSTOMER ORDERS
-
-4 - PRINT PLAIN PAPER (FORMATTED) INVOICES
-
-5 - PRINT PRE-PRINTED INVOICES
-
-6 - POST ORDERS TO GENERAL LEDGER
-
-7 - PRINT AGED ACCOUNTS RECEIVABLE REPORT
-
-8 - PRINT CUSTOMER LABELS
-
-9 - FINISHED
-
-? 8
-
-
-Install appropriate Customer Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-THIS IS THE MAILING LABEL PRINTING ROUTINE.
-
-IF YOU ARE NOT FAMILIAR WITH ITS OPERATION, PLEASE
-READ THE INSTRUCTIONS BEFORE PROCEEDING.
-
-
-HOW MANY LABELS ACROSS THE PAGE (1 TO 5)? 2
-
-
-INDICATE THE DISTANCE BETWEEN THE LEFT EDGES OF
-ANY TWO LABELS IN DECIMAL INCHES (I.E. 2.6).
-? 2.6
-
-
-INDICATE THE NUMBER OF SPACES BETWEEN LABELS (I.E. 2).
-? 2
-
-
-
-LABELS TO PRINT 3
-
-
-
-
-*** MAILING LIST MENU ***
-
-1 - UPDATE MAILING LIST
-
-2 - PRINT MAILING LABELS
-
-3 - PRINT CUSTOMER LABELS
-
-4 - PRINT VENDOR LABELS
-
-5 - PRINT EMPLOYEE LABELS
-
-6 - FINISHED
-
-? 6
-
-
-Replace program disk #5 in drive A.
-Type return to continue.
-? OK
-
-
-*** BusinessMaster II Master Menu ***
-
-1 - GENERAL LEDGER/GENERAL JOURNAL OPERATIONS
-
-2 - ORDER ENTRY/RECEIVABLES OPERATIONS
-
-3 - PURCHASE ORDER/PAYABLES OPERATIONS
-
-4 - INVENTORY OPERATIONS
-
-5 - EMPLOYEE PAYROLL OPERATIONS
-
-6 - MAILING LIST OPERATIONS
-
-7 - INITIALIZE SYSTEM/START-UP/MODIFY SYSTEM/ * DAILY DATE CHANGE *
-
-8 - PERIODIC FILE MAINTENANCE
-
-9 - FINISHED
-
-? 3
-
-
-INSTALL PROGRAM DISK #3.
-
-TYPE RETURN WHEN READY.? OK
-
-
-*** PURCHASE ORDER ENTRY / VENDOR PAYABLES MENU ***
-
-1 - ENTER NEW VENDOR INFORMATION
-
-2 - ENTER PURCHASE ORDERS
-
-3 - LIST PURCHASE ORDERS
-
-4 - PRINT PLAIN PAPER (FORMATTED) PURCHASE ORDERS
-
-5 - PRINT PRE-PRINTED PURCHASE ORDERS
-
-6 - POST PURCHASE ORDERS TO GENERAL LEDGER
-
-7 - PRINT AGED ACCOUNTS PAYABLE REPORT
-
-8 - PRINT VENDOR LABELS
-
-9 - FINISHED
-
-? 3
-
-
-Install appropriate Vendor Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING PURCHASE ORDER REGISTER
-
-INSTALL PURCHASE ORDER REGISTER DISK IN DRIVE A
-
-INSTALL A VENDOR DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-
-RECORDS TO BE PRINTED 1
-
-
-TO PRINT REGISTER, TYPE RETURN.? OK
-
-
-INSTALL PROGRAM DISK IN DRIVE A
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-*** PURCHASE ORDER ENTRY / VENDOR PAYABLES MENU ***
-
-1 - ENTER NEW VENDOR INFORMATION
-
-2 - ENTER PURCHASE ORDERS
-
-3 - LIST PURCHASE ORDERS
-
-4 - PRINT PLAIN PAPER (FORMATTED) PURCHASE ORDERS
-
-5 - PRINT PRE-PRINTED PURCHASE ORDERS
-
-6 - POST PURCHASE ORDERS TO GENERAL LEDGER
-
-7 - PRINT AGED ACCOUNTS PAYABLE REPORT
-
-8 - PRINT VENDOR LABELS
-
-9 - FINISHED
-
-? 4
-
-
-Install appropriate Vendor Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING PURCHASE ORDERS
-
-INSTALL PURCHASE ORDER REGISTER DISK IN DRIVE A
-
-INSTALL A VENDOR DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-
-PURCHASE ORDERS TO BE PRINTED 1
-
-
-TO PRINT PURCHASE ORDERS, TYPE RETURN.? OK
-
-
-INSTALL PROGRAM DISK IN DRIVE A
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-*** PURCHASE ORDER ENTRY / VENDOR PAYABLES MENU ***
-
-1 - ENTER NEW VENDOR INFORMATION
-
-2 - ENTER PURCHASE ORDERS
-
-3 - LIST PURCHASE ORDERS
-
-4 - PRINT PLAIN PAPER (FORMATTED) PURCHASE ORDERS
-
-5 - PRINT PRE-PRINTED PURCHASE ORDERS
-
-6 - POST PURCHASE ORDERS TO GENERAL LEDGER
-
-7 - PRINT AGED ACCOUNTS PAYABLE REPORT
-
-8 - PRINT VENDOR LABELS
-
-9 - FINISHED
-
-? 4
-
-
-Install appropriate Vendor Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING PURCHASE ORDERS
-
-INSTALL PURCHASE ORDER REGISTER DISK IN DRIVE A
-
-INSTALL A VENDOR DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-
-PURCHASE ORDERS TO BE PRINTED 1
-
-
-TO PRINT PURCHASE ORDERS, TYPE RETURN.? OK
-
-
-INSTALL PROGRAM DISK IN DRIVE A
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-*** PURCHASE ORDER ENTRY / VENDOR PAYABLES MENU ***
-
-1 - ENTER NEW VENDOR INFORMATION
-
-2 - ENTER PURCHASE ORDERS
-
-3 - LIST PURCHASE ORDERS
-
-4 - PRINT PLAIN PAPER (FORMATTED) PURCHASE ORDERS
-
-5 - PRINT PRE-PRINTED PURCHASE ORDERS
-
-6 - POST PURCHASE ORDERS TO GENERAL LEDGER
-
-7 - PRINT AGED ACCOUNTS PAYABLE REPORT
-
-8 - PRINT VENDOR LABELS
-
-9 - FINISHED
-
-? 5
-
-
-Install appropriate Vendor Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING PURCHASE ORDERS
-
-INSTALL PURCHASE ORDER REGISTER DISK IN DRIVE A
-
-INSTALL A VENDOR DISK IN DRIVE B
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-
-PURCHASE ORDERS TO BE PRINTED 1
-
-
-TO PRINT PURCHASE ORDERS, TYPE RETURN.? OK
-
-
-INSTALL PROGRAM DISK IN DRIVE A
-
-
-TYPE RETURN TO CONTINUE ? OK
-
-
-*** PURCHASE ORDER ENTRY / VENDOR PAYABLES MENU ***
-
-1 - ENTER NEW VENDOR INFORMATION
-
-2 - ENTER PURCHASE ORDERS
-
-3 - LIST PURCHASE ORDERS
-
-4 - PRINT PLAIN PAPER (FORMATTED) PURCHASE ORDERS
-
-5 - PRINT PRE-PRINTED PURCHASE ORDERS
-
-6 - POST PURCHASE ORDERS TO GENERAL LEDGER
-
-7 - PRINT AGED ACCOUNTS PAYABLE REPORT
-
-8 - PRINT VENDOR LABELS
-
-9 - FINISHED
-
-? 7
-
-
-Install appropriate Vendor Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING AGED ACCOUNTS PAYABLE REPORT
-
-RECORDS TO BE PRINTED 1
-
-TO DO PRINT REPORT, TYPE RETURN.? OK
-
-
-*** PURCHASE ORDER ENTRY / VENDOR PAYABLES MENU ***
-
-1 - ENTER NEW VENDOR INFORMATION
-
-2 - ENTER PURCHASE ORDERS
-
-3 - LIST PURCHASE ORDERS
-
-4 - PRINT PLAIN PAPER (FORMATTED) PURCHASE ORDERS
-
-5 - PRINT PRE-PRINTED PURCHASE ORDERS
-
-6 - POST PURCHASE ORDERS TO GENERAL LEDGER
-
-7 - PRINT AGED ACCOUNTS PAYABLE REPORT
-
-8 - PRINT VENDOR LABELS
-
-9 - FINISHED
-
-? 8
-
-
-Install appropriate Vendor Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-THIS IS THE MAILING LABEL PRINTING ROUTINE.
-
-IF YOU ARE NOT FAMILIAR WITH ITS OPERATION, PLEASE
-READ THE INSTRUCTIONS BEFORE PROCEEDING.
-
-
-HOW MANY LABELS ACROSS THE PAGE (1 TO 5)? 2
-
-
-INDICATE THE DISTANCE BETWEEN THE LEFT EDGES OF
-ANY TWO LABELS IN DECIMAL INCHES (I.E. 2.6).
-? 2.6
-
-
-INDICATE THE NUMBER OF SPACES BETWEEN LABELS (I.E. 2).
-? 2
-
-
-
-LABELS TO PRINT 1
-
-
-
-
-*** MAILING LIST MENU ***
-
-1 - UPDATE MAILING LIST
-
-2 - PRINT MAILING LABELS
-
-3 - PRINT CUSTOMER LABELS
-
-4 - PRINT VENDOR LABELS
-
-5 - PRINT EMPLOYEE LABELS
-
-6 - FINISHED
-
-? 6
-
-
-Replace program disk #5 in drive A.
-Type return to continue.
-? OK
-
-
-*** BusinessMaster II Master Menu ***
-
-1 - GENERAL LEDGER/GENERAL JOURNAL OPERATIONS
-
-2 - ORDER ENTRY/RECEIVABLES OPERATIONS
-
-3 - PURCHASE ORDER/PAYABLES OPERATIONS
-
-4 - INVENTORY OPERATIONS
-
-5 - EMPLOYEE PAYROLL OPERATIONS
-
-6 - MAILING LIST OPERATIONS
-
-7 - INITIALIZE SYSTEM/START-UP/MODIFY SYSTEM/ * DAILY DATE CHANGE *
-
-8 - PERIODIC FILE MAINTENANCE
-
-9 - FINISHED
-
-? 4
-
-
-INSTALL PROGRAM DISK #4.
-
-TYPE RETURN WHEN READY.? OK
-
-
-*** FINISHED / CAPITAL / RAW GOODS INVENTORY MENU ***
-
-1 - UPDATE FINISHED GOODS INVENTORY
-
-2 - UPDATE RAW GOODS INVENTORY
-
-3 - PRINT FINISHED GOODS REPORT
-
-4 - PRINT RAW GOODS REPORT
-
-5 - PRINT FINISHED GOODS ALERT
-
-6 - PRINT RAW GOODS ALERT
-
-7 - FIXED ASSET OPERATIONS
-
-8 - FINISHED
-
-? 3
-
-
-Install appropriate Finished Goods disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING FINISHED GOODS REPORT
-
-
-*** FINISHED / CAPITAL / RAW GOODS INVENTORY MENU ***
-
-1 - UPDATE FINISHED GOODS INVENTORY
-
-2 - UPDATE RAW GOODS INVENTORY
-
-3 - PRINT FINISHED GOODS REPORT
-
-4 - PRINT RAW GOODS REPORT
-
-5 - PRINT FINISHED GOODS ALERT
-
-6 - PRINT RAW GOODS ALERT
-
-7 - FIXED ASSET OPERATIONS
-
-8 - FINISHED
-
-? 4
-
-
-Install appropriate Raw Goods disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING RAW GOODS REPORT
-
-
-*** FINISHED / CAPITAL / RAW GOODS INVENTORY MENU ***
-
-1 - UPDATE FINISHED GOODS INVENTORY
-
-2 - UPDATE RAW GOODS INVENTORY
-
-3 - PRINT FINISHED GOODS REPORT
-
-4 - PRINT RAW GOODS REPORT
-
-5 - PRINT FINISHED GOODS ALERT
-
-6 - PRINT RAW GOODS ALERT
-
-7 - FIXED ASSET OPERATIONS
-
-8 - FINISHED
-
-? 5
-
-
-Install appropriate Finished Goods disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING FINISHED GOODS ALERT
-
-
-*** FINISHED / CAPITAL / RAW GOODS INVENTORY MENU ***
-
-1 - UPDATE FINISHED GOODS INVENTORY
-
-2 - UPDATE RAW GOODS INVENTORY
-
-3 - PRINT FINISHED GOODS REPORT
-
-4 - PRINT RAW GOODS REPORT
-
-5 - PRINT FINISHED GOODS ALERT
-
-6 - PRINT RAW GOODS ALERT
-
-7 - FIXED ASSET OPERATIONS
-
-8 - FINISHED
-
-? 6
-
-
-Install appropriate Raw Goods disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING RAW GOODS ALERT
-
-
-*** FINISHED / CAPITAL / RAW GOODS INVENTORY MENU ***
-
-1 - UPDATE FINISHED GOODS INVENTORY
-
-2 - UPDATE RAW GOODS INVENTORY
-
-3 - PRINT FINISHED GOODS REPORT
-
-4 - PRINT RAW GOODS REPORT
-
-5 - PRINT FINISHED GOODS ALERT
-
-6 - PRINT RAW GOODS ALERT
-
-7 - FIXED ASSET OPERATIONS
-
-8 - FINISHED
-
-? 7
-
-
-Install appropriate Capital Goods disk in Drive B:
-
-Type return to continue.? OK
-
-
-*** FIXED ASSET ACCOUNTING MENU ***
-
-1 - ENTER OR MODIFY CAPITAL GOODS
-
-2 - CALCULATE YEARS DEPRECIATION
-
-3 - PRINT DEPRECIATION REPORT
-
-4 - PRINT IRS FORM 4562 - DEPRECIATION
-
-5 - FINISHED
-
-? 3
-
-
-Install appropriate Capital Goods disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING DEPRECIATION REPORT
-
-RECORDS TO BE PRINTED 1
-
-TO PRINT REPORT, TYPE RETURN.? OK
-
-
-*** FIXED ASSET ACCOUNTING MENU ***
-
-1 - ENTER OR MODIFY CAPITAL GOODS
-
-2 - CALCULATE YEARS DEPRECIATION
-
-3 - PRINT DEPRECIATION REPORT
-
-4 - PRINT IRS FORM 4562 - DEPRECIATION
-
-5 - FINISHED
-
-? 4
-
-
-Install appropriate Capital Goods disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING DEPRECIATION REPORT
-
-RECORDS TO BE PRINTED 1
-
-TO PRINT REPORT, TYPE RETURN.? OK
-
-
-ENTER DEPRECIATION FROM ANY FORM 4832 (CLADR).
-? 1234567890
-
-
-*** FIXED ASSET ACCOUNTING MENU ***
-
-1 - ENTER OR MODIFY CAPITAL GOODS
-
-2 - CALCULATE YEARS DEPRECIATION
-
-3 - PRINT DEPRECIATION REPORT
-
-4 - PRINT IRS FORM 4562 - DEPRECIATION
-
-5 - FINISHED
-
-? 5
-
-
-*** FINISHED / CAPITAL / RAW GOODS INVENTORY MENU ***
-
-1 - UPDATE FINISHED GOODS INVENTORY
-
-2 - UPDATE RAW GOODS INVENTORY
-
-3 - PRINT FINISHED GOODS REPORT
-
-4 - PRINT RAW GOODS REPORT
-
-5 - PRINT FINISHED GOODS ALERT
-
-6 - PRINT RAW GOODS ALERT
-
-7 - FIXED ASSET OPERATIONS
-
-8 - FINISHED
-
-? 8
-
-
-Replace program disk #5 in drive A.
-Type return to continue.
-? OK
-
-
-*** BusinessMaster II Master Menu ***
-
-1 - GENERAL LEDGER/GENERAL JOURNAL OPERATIONS
-
-2 - ORDER ENTRY/RECEIVABLES OPERATIONS
-
-3 - PURCHASE ORDER/PAYABLES OPERATIONS
-
-4 - INVENTORY OPERATIONS
-
-5 - EMPLOYEE PAYROLL OPERATIONS
-
-6 - MAILING LIST OPERATIONS
-
-7 - INITIALIZE SYSTEM/START-UP/MODIFY SYSTEM/ * DAILY DATE CHANGE *
-
-8 - PERIODIC FILE MAINTENANCE
-
-9 - FINISHED
-
-? 5
-
-
-INSTALL PROGRAM DISK #2.
-
-TYPE RETURN WHEN READY.? OK
-
-
-*** EMPLOYEE PAYROLL SYSTEM MENU ***
-
-1 - UPDATE EMPLOYEE RECORDS
-
-2 - ENTER EMPLOYEE TIME CARDS
-
-3 - CALCULATE EMPLOYEE PAYROLL
-
-4 - PRINT PAYROLL SUMMARY
-
-5 - PRINT EMPLOYEE CHECKS
-
-6 - POST PAYROLL OPERATIONS
-
-7 - RECORD FEDERAL DEPOSITS (501)
-
-8 - PRINT FEDERAL AND STATE TAX FORMS (941/W2, ETC)
-
-9 - FINISHED
-
-? 3
-
-
-Install appropriate Employee Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-
-PAYROLL CALCULATION PROGRAM
----------------------------
-
-THERE ARE 20 AVAILABLE RECORDS
-OF THESE THERE ARE: 16 RECORDS OPEN
- 4 RECORDS USED
-
-NUMBER OF EMPLOYEES 4
-
-CALCULATING PAYROLL
-
-*** PLEASE WAIT ***
-
-
-*** EMPLOYEE PAYROLL SYSTEM MENU ***
-
-1 - UPDATE EMPLOYEE RECORDS
-
-2 - ENTER EMPLOYEE TIME CARDS
-
-3 - CALCULATE EMPLOYEE PAYROLL
-
-4 - PRINT PAYROLL SUMMARY
-
-5 - PRINT EMPLOYEE CHECKS
-
-6 - POST PAYROLL OPERATIONS
-
-7 - RECORD FEDERAL DEPOSITS (501)
-
-8 - PRINT FEDERAL AND STATE TAX FORMS (941/W2, ETC)
-
-9 - FINISHED
-
-? 4
-
-
-Install appropriate Employee Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-PRINTING PAYROLL REGISTER
-
-
-*** EMPLOYEE PAYROLL SYSTEM MENU ***
-
-1 - UPDATE EMPLOYEE RECORDS
-
-2 - ENTER EMPLOYEE TIME CARDS
-
-3 - CALCULATE EMPLOYEE PAYROLL
-
-4 - PRINT PAYROLL SUMMARY
-
-5 - PRINT EMPLOYEE CHECKS
-
-6 - POST PAYROLL OPERATIONS
-
-7 - RECORD FEDERAL DEPOSITS (501)
-
-8 - PRINT FEDERAL AND STATE TAX FORMS (941/W2, ETC)
-
-9 - FINISHED
-
-? 5
-
-
-Install appropriate Employee Information disk in Drive B:
-
-Type return to continue.? OK
-8400 < 8403 - LINE OUT OF ORDER: 8400 REM *** AND PRINT THE CHECK ***
-
-
-
-
-THIS IS THE PAYROLL CHECK PRINTING PROGRAM.
-
-SET PRINTER TO TOP OF FORM ****
-
-Would you like a ***VOID*** check printed to
-establish print positions ? (Y/N)
-? N
-
-
-CHECKS TO BE PRINTED = 4
-
-TO PRINT CHECKS, DO CARRIAGE RETURN. ? OK
-
-
-*** EMPLOYEE PAYROLL SYSTEM MENU ***
-
-1 - UPDATE EMPLOYEE RECORDS
-
-2 - ENTER EMPLOYEE TIME CARDS
-
-3 - CALCULATE EMPLOYEE PAYROLL
-
-4 - PRINT PAYROLL SUMMARY
-
-5 - PRINT EMPLOYEE CHECKS
-
-6 - POST PAYROLL OPERATIONS
-
-7 - RECORD FEDERAL DEPOSITS (501)
-
-8 - PRINT FEDERAL AND STATE TAX FORMS (941/W2, ETC)
-
-9 - FINISHED
-
-? 8
-
-
-Install appropriate Employee Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-*** FEDERAL AND STATE FORMS PRINTING MENU ***
-
-1 - PRINT 941 FORMS
-
-2 - PRINT STATE TAX RETURNS
-
-3 - PRINT FEDERAL AND STATE W2 FORMS
-
-4 - FINISHED
-
-? 1
-
-
-Install appropriate Employee Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-PRINTING FEDERAL FORM 941
-
-
-ENTER ADJUSTMENT OF WITHHELD INCOME TAX FOR PRECEDING
-QUARTER - LINE 4. ENTER INCREASE AS +, DECREASE AS -
-
-? 0
-
-
-ENTER TAXABLE TIPS REPORTED - LINE 7.
-
-? 0
-
-
-ENTER ADJUSTMENT OF FICA TAXES - LINE 9. ENTER INCREASE
-AS +, DECREASE AS -
-
-? 0
-
-
-SET FORM 941 TO FIRST PRINT LINE.
-
-ENTER QUARTER NUMBER (1,2,3 OR 4). ? 4
-
-
-ENTER OVERPAYMENT FROM PREVIOUS QUARTER.
-
-? 0
-
-
-ENTER FINAL DEPOSIT MADE IF NOT INCLUDED ABOVE.
-
-? 0
-ENTER DATE OF FINAL DEPOSIT IF ANY.
-
-? 12/31/78
-
-
-*** EMPLOYEE PAYROLL SYSTEM MENU ***
-
-1 - UPDATE EMPLOYEE RECORDS
-
-2 - ENTER EMPLOYEE TIME CARDS
-
-3 - CALCULATE EMPLOYEE PAYROLL
-
-4 - PRINT PAYROLL SUMMARY
-
-5 - PRINT EMPLOYEE CHECKS
-
-6 - POST PAYROLL OPERATIONS
-
-7 - RECORD FEDERAL DEPOSITS (501)
-
-8 - PRINT FEDERAL AND STATE TAX FORMS (941/W2, ETC)
-
-9 - FINISHED
-
-? 8
-
-
-Install appropriate Employee Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-*** FEDERAL AND STATE FORMS PRINTING MENU ***
-
-1 - PRINT 941 FORMS
-
-2 - PRINT STATE TAX RETURNS
-
-3 - PRINT FEDERAL AND STATE W2 FORMS
-
-4 - FINISHED
-
-? 2
-This program not implemented!
-
-
-*** EMPLOYEE PAYROLL SYSTEM MENU ***
-
-1 - UPDATE EMPLOYEE RECORDS
-
-2 - ENTER EMPLOYEE TIME CARDS
-
-3 - CALCULATE EMPLOYEE PAYROLL
-
-4 - PRINT PAYROLL SUMMARY
-
-5 - PRINT EMPLOYEE CHECKS
-
-6 - POST PAYROLL OPERATIONS
-
-7 - RECORD FEDERAL DEPOSITS (501)
-
-8 - PRINT FEDERAL AND STATE TAX FORMS (941/W2, ETC)
-
-9 - FINISHED
-
-? 8
-
-
-Install appropriate Employee Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-*** FEDERAL AND STATE FORMS PRINTING MENU ***
-
-1 - PRINT 941 FORMS
-
-2 - PRINT STATE TAX RETURNS
-
-3 - PRINT FEDERAL AND STATE W2 FORMS
-
-4 - FINISHED
-
-? 3
-
-
-Install appropriate Employee Information disk in Drive B:
-
-Type return to continue.? OK
-
-
-
-
-IS PENSION PLAN COVERAGE PROVIDED YOUR EMPLOYEES?
-
-? NO
-
-
-DID YOU FAIL TO COLLECT FICA TAX ON EMPLOYEES TIPS, PROVIDE
-MORE THAN $50,000 GROUP-TERM LIFE INSURANCE, OR HAVE ANY
-STATUTORY EMPLOYEES WHOSE EARNINGS ARE SUBJECT TO FICA BUT
-NOT SUBJECT TO FEDERAL INCOME TAX (YES OR NO TO ANY ONE,
-TWO, OR ALL THREE)?
-
-? NO
-
-
-DID ANY EMPLOYEES HAVE TIPS THAT MUST BE INCLUDED IN BOX 18
-
-? NO
-
-
-ENTER STATE NAME FOR BOX 22.
-
-? TX
-
-
-PRINTING W2 FORMS
-TYPE RETURN TO CONTINUE ? OK
-
-
-*** EMPLOYEE PAYROLL SYSTEM MENU ***
-
-1 - UPDATE EMPLOYEE RECORDS
-
-2 - ENTER EMPLOYEE TIME CARDS
-
-3 - CALCULATE EMPLOYEE PAYROLL
-
-4 - PRINT PAYROLL SUMMARY
-
-5 - PRINT EMPLOYEE CHECKS
-
-6 - POST PAYROLL OPERATIONS
-
-7 - RECORD FEDERAL DEPOSITS (501)
-
-8 - PRINT FEDERAL AND STATE TAX FORMS (941/W2, ETC)
-
-9 - FINISHED
-
-? 9
-
-
-Replace disk #5 in drive A.
-Type return to continue.
-? OK
-
-
-*** BusinessMaster II Master Menu ***
-
-1 - GENERAL LEDGER/GENERAL JOURNAL OPERATIONS
-
-2 - ORDER ENTRY/RECEIVABLES OPERATIONS
-
-3 - PURCHASE ORDER/PAYABLES OPERATIONS
-
-4 - INVENTORY OPERATIONS
-
-5 - EMPLOYEE PAYROLL OPERATIONS
-
-6 - MAILING LIST OPERATIONS
-
-7 - INITIALIZE SYSTEM/START-UP/MODIFY SYSTEM/ * DAILY DATE CHANGE *
-
-8 - PERIODIC FILE MAINTENANCE
-
-9 - FINISHED
-
-? 6
-
-
-INSTALL PROGRAM DISK #4.
-
-TYPE RETURN WHEN READY.? OK
-
-
-*** MAILING LIST MENU ***
-
-1 - UPDATE MAILING LIST
-
-2 - PRINT MAILING LABELS
-
-3 - PRINT CUSTOMER LABELS
-
-4 - PRINT VENDOR LABELS
-
-5 - PRINT EMPLOYEE LABELS
-
-6 - FINISHED
-
-? 2
-
-
-Install appropriate Mailing List disk in Drive B:
-
-Type return to continue.? OK
-