bwBASIC(1)

NAME
bwBASIC - BASIC Interpreter/Shell, version 2.10

SYNOPSIS
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 other classic BASIC dialects in C. 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. bwBASIC can be configured to emulate features, commands, functions and operators available in different dialects of BASIC interpreters; these are controlled by the various OPTION commands. 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 has only one command. Multi-statement lines are internally broken into distinct lines as they are loaded.

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.

QUICK REFERENCE LIST OF COMMANDS AND FUNCTIONS
Be aware that many of these commands and functions will not be available unless you have enabled a particular dialect using the OPTION VERSION command.

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. ? expressions... ABS( X ) ACOS( X ) ANGLE( X, Y ) ARGC ARGT$( X ) ARGV$( X ) ARGV( X ) ASC( A$ ) ASIN( X ) ATN( X ) CALL subroutine-name( [parameter [, ...] ] ) CASE ELSE CASE IF partial-expression CASE IS CASE constant CCUR( X ) CDBL( X ) CEIL( X ) CHAIN filename$ CHANGE A$ TO X | CHANGE X TO A$ CHDIR( A$ ) CHR$( X ) CINT( X ) CLEAR CLNG( X ) CLOAD [file-name$] CLOAD* ArrayName CLOSE( X ) CLS CMDS COLOR( X, Y ) COMMON variable [, ...] CONT COS( X ) COSH( X ) COT( X ) CSAVE [file-name$] CSAVE* ArrayName CSC( X ) CSNG( X ) CVC( A$ ) CVD( A$ ) CVI( A$ ) CVL( A$ ) CVS( A$ ) DATA constant[, ...] DATE DATE$ DEF FN DEF FNname(arg...)] = expression DEF SUB DEFDBL letter[-letter] [, ...] DEFINT letter[-letter] [, ...] DEFSNG letter[-letter] [, ...] DEFSTR letter[-letter] [, ...] DEG( X ) DELETE line [- line] DIM variable( elements [, ...]) [, ...] DO DO UNTIL expression DO WHILE expression EDIT ELSE ELSEIF END END FUNCTION END IF END SELECT END SUB ENVIRON$( A$ ) ENVIRON( A$ ) EOF( X ) EPS( X ) ERASE variable [, ...] ERL ERR ERR$ ERROR( X ) ERROR( X, A$ ) EXIT EXIT DO EXIT FOR EXIT FUNCTION EXIT SUB EXIT UNTIL EXIT WHILE EXP( X ) FIELD [#] device-number, number AS string-variable$ [, ...] FILEATTR( X, Y ) FILES FILES( A$ ) FIX( X ) FNCS FOR variable = start TO finish [STEP increment] FP( X ) FRE FRE( A$ ) FRE( X ) FREEFILE FUNCTION [ ( parameter [, ... ] ) ] GET( X ) GET( X, Y ) GO GOSUB line GOTO line HELP name HEX$( X ) IF expression THEN IF expression THEN line1 [ELSE line2] INKEY$ INP( X ) INPUT [# device-number]|[;]["prompt string";]list of variables INPUT$( X ) INPUT$( X, Y ) INSTR( A$, B$ ) INSTR( X, A$, B$ ) INT( X ) IP( X ) KILL( A$ ) LCASE$( A$ ) LEFT$( A$, X ) LEN( A$ ) [LET] variable = expression LINE INPUT [[#] device-number,]["prompt string";] string-variable$ LIST line1 [- line2] LOAD [file-name$] LOC( X ) LOCATE( X, Y ) LOF( X ) LOG( X ) LOG10( X ) LOG2( X ) LOOP LOOP UNTIL LOOP WHILE LPOS LPRINT [USING format-string$;] expressions... LSET string-variable$ = expression LTRIM$( A$ ) LWIDTH( X ) MAINTAINER MAX( X, Y ) MAXBYT MAXCUR MAXDBL MAXDEV MAXINT MAXLEN( A$ ) MAXLNG MAXLVL MAXNUM MAXSNG MERGE file-name MID$( A$, X ) MID$( A$, X, Y ) MID$( variable$, start [, count ] ) = expression MIN( X, Y ) MINBYT MINCUR MINDBL MINDEV MININT MINLNG MINNUM MINSNG MKC$( X ) MKD$( X ) MKDIR( A$ ) MKI$( X ) MKL$( X ) MKS$( X ) MOD( X, Y ) NAME old-file-name AS new-file-name NAME( A$, B$ ) NEW NEXT [variable] NULL( X ) OCT$( X ) ON ERROR GOTO errline | ON ERROR RESUME NEXT ON TIMER count GOSUB line ON expression GOTO | GOSUB line [, ...] OPEN file-name [FOR INPUT|OUTPUT|APPEND|BINARY|RANDOM] AS [#]device-number [LEN = record-length] OPEN( A$, X, B$ ) OPEN( A$, X, B$, Y ) OPTION ... OPTION ANGLE DEGREES OPTION ANGLE RADIANS OPTION ARITHMETIC DECIMAL OPTION ARITHMETIC FIXED OPTION ARITHMETIC NATIVE OPTION BASE 0 OPTION BASE 1 OPTION BUGS OFF OPTION BUGS ON OPTION COMMENT char OPTION COMPARE BINARY OPTION COMPARE DATABASE OPTION COMPARE TEXT OPTION COVERAGE OFF OPTION COVERAGE ON OPTION DATE format OPTION DISABLE COMMAND name OPTION DISABLE FUNCTION name OPTION DISABLE OPERATOR name OPTION ENABLE COMMAND name OPTION ENABLE FUNCTION name OPTION ENABLE OPERATOR name OPTION ERROR GOSUB OPTION ERROR GOTO OPTION INDENT number OPTION LABELS OFF OPTION LABELS ON OPTION STATEMENT char OPTION STRICT OFF OPTION STRICT ON OPTION TERMINAL ADM-3A OPTION TERMINAL ANSI OPTION TERMINAL NONE OPTION TIME format OPTION TRACE OFF OPTION TRACE ON OPTION VERSION [version] ORD( A$ ) OUT( X, Y ) PEEK( X ) PI POKE( X, Y ) POS POS( A$, B$ ) POS( A$, B$, X ) POS( X ) PRINT [# device-number,][USING format-string$;] expressions... PUT( X ) PUT( X, Y ) QUIT RAD( X ) RANDOMIZE RANDOMIZE( X ) READ variable [, ...] REM ... REMAINDER( X, Y ) RENUM REPEAT$( X, A$ ) REPEAT$( X, Y ) RESET RESTORE [line] RESUME [ 0 | line | NEXT ] RETURN RIGHT$( A$, X ) RMDIR( A$ ) RND RND( X ) ROUND( X, Y ) RSET string-variable$ = expression RTRIM$( A$ ) RUN [line | file-name$] SAVE [file-name$] SEC( X ) SEEK( X ) SEEK( X, Y ) SELECT SELECT CASE expression SGN( X ) SHELL( A$ ) SIN( X ) SINH( X ) SPACE$( X ) SPC( X ) SQR( X ) STOP STR$( X ) STRING$( X, A$ ) STRING$( X, Y ) SUB name [ ( parameter [,...] ) ] SWAP variable, variable SYSTEM TAB( X ) TAN( X ) TANH( X ) TIME TIME$ TIMER TIMER ON | STOP | OFF TRIM$( A$ ) TROFF TRON TRUNCATE( X, Y ) UCASE$( A$ ) UEND UNTIL expression USER LBL VAL( A$ ) VARS WAIT( X, Y ) WAIT( X, Y, Z ) WEND WHILE WIDTH( X ) WIDTH( X, Y ) WRITE [# device-number,] element [, .... ]

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. 4.b. Naming Conventions Command, function, label, and variable names are not case sensitive, so that "Run" and "RUN" and "run" are equivalent. 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 The available operators are determined by the OPTION VERSION setting. bwBASIC recognizes the following operators, with their level of precedence given (1 = highest): ^ 1 exponentiation [ 1 exponentiation * 2 multiplication / 2 division 3 integer division MOD 4 modulus (remainder) + 5 addition - 5 subtraction = 6 equality or assignment <> 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.i. Numerical Precision (NOT) bwBASIC utilizes numbers with only one level of precision. All numbers are internally represented using a C double. The Microsoft-style numeric type characters (!,@,#,%,&), just like the string type character ($), are part of the variable name and are also used to range-check the values. This allows most programs to run correctly, but does not handle all possible cases. The current implementation is not complete for all possible uses of numeric type characters. 4.j. OPTION VERSION and so on

All OPTION commands should be specified in your "profile.bas", so they will be effective when your BASIC program is LOADed. The OPTION VERSION command configures the behavior and availability of every BASIC keyword and operator. Depending upon the current OPTION VERSION setting, certain commands, functions and operators will be enabled or disabled. The OPTION VERSION setting also controls the default values for: OPTION STRICT ON | OFF OPTION ANGLE DEGREES | RADIANS OPTION BUGS ON | OFF OPTION LABELS ON | OFF OPTION COMPARE BINARY | TEXT OPTION BASE 0 | 1 OPTION COVERAGE ON | OFF OPTION TRACE ON | OFF OPTION COMMENT char OPTION STATEMENT char OPTION DATE format OPTION TIME format OPTION ERROR GOTO | GOSUB As an example of the choice of OPTION VERSION: "OPTION VERSION ECMA-116" makes "MOD" a function, while "OPTION VERSION BASIC-80' makes "MOD" an operator. The availability of every command and function for each "OPTION VERSION" setting is documented in section 5. The current list of available OPTION VERSION values are: OPTION VERSION BYWATER ' Bywater BASIC OPTION VERSION DARTMOUTH ' Dartmouth BASIC OPTION VERSION ECMA-55 ' ECMA-55 OPTION VERSION BASIC-80 ' Microsoft BASIC-80 OPTION VERSION TRS-83 ' TRS-80 Model III OPTION VERSION TRS-84 ' TRS-80 Model 4 OPTION VERSION GW-BASIC ' Microsoft GW-BASIC OPTION VERSION ECMA-116 ' ECMA-116 OPTION VERSION QBASIC ' Microsoft QBASIC OPTION VERSION VBDOS ' Microsoft VBDOS OPTION VERSION VB1 ' Microsoft VB1 OPTION VERSION VB2 ' Microsoft VB2 OPTION VERSION VB3 ' Microsoft VB3 OPTION VERSION VB4 ' Microsoft VB4 OPTION VERSION VB5 ' Microsoft VB5 OPTION VERSION VB6 ' Microsoft VB6 Currently, the above implementations are incomplete but usable. There are no plans to implement VB forms, controls, events, objects, DLLs, and so on, but some VB intrinsic keywords could be useful in TTY applications. Because OPTION VERSION is a command, it should be executed before a BASIC program is LOADed. The proper place to set OPTION VERSION is in "profile.bas", before any other desired OPTION commands.

Additional commands allow you to configure the available commands, functions and operators to support existing BASIC programs. They allow you to configure bwBASIC to support many different flavors of BASIC. OPTION COMMENT is provided to allow you to change the comment character. For example, if your existing BASIC program uses the exclamation-point as the comment character instead of the apostrophe, then add OPTION COMMENT ! to "profile.bas", after the OPTION VERSION command. OPTION STATEMENT is provided to allow you to change the statement seperator character. For example, if your existing BASIC program uses the back-slash as the statement seperator character instead of the colon, then add OPTION STATEMENT to "profile.bas", after the OPTION VERSION command.

OPTION DATE is provided to allow you to change the format of DATE$. For example, if you existing BASIC program expects the date format to be yyyy-mm-dd, then add OPTION DATE "%Y-%m-%d" to "profile.bas", after the OPTION VERSION command. The format is used by the C function strftime().

OPTION TIME is provided to allow you to change the format of TIME$. For example, if you existing BASIC program expects the time format to be HH-MM-SS, then add OPTION TIME "%H-%M-%S" to "profile.bas", after the OPTION VERSION command. The format is used by the C function strftime(). OPTION DISABLE COMMAND is provided to allow you to disable (hide) a specific command. For example, if your existing BASIC program uses QUIT as a variable, then add OPTION DISABLE COMMAND QUIT to "profile.bas", after the OPTION VERSION command. If the command contains spaces, then it should be quoted.

OPTION DISABLE FUNCTION is provided to allow you to disable (hide) a specific function. For example, if your existing BASIC program uses PI as a variable, then add OPTION DISABLE FUNCTION PI to "profile.bas", after the OPTION VERSION command. OPTION DISABLE OPERATOR is provided to allow you to disable (hide) a specific operator. For example, if your existing BASIC program uses MOD as a variable, then add OPTION DISABLE OPERATOR MOD to "profile.bas", after the OPTION VERSION command.

OPTION ENABLE COMMAND is provided to allow you to enable (show) a specific command. For example, if your existing BASIC program uses QUIT as a command, but is otherwise ECMA-55, then add OPTION ENABLE COMMAND QUIT to "profile.bas", after the OPTION VERSION command. If the command contains spaces, then it should be quoted. OPTION ENABLE FUNCTION is provided to allow you to enable (show) a specific function. For example, if your existing BASIC program uses PI as a function, but is otherwise ECMA-55, then add OPTION ENABLE FUNCTION PI to "profile.bas", after the OPTION VERSION command. OPTION ENABLE OPERATOR is provided to allow you to enable (show) a specific operator. For example, if your existing BASIC program uses MOD as an operator, but is otherwise ECMA-55, then add OPTION ENABLE OPERATOR MOD to "profile.bas", after the OPTION VERSION command.

OPTION ERROR GOSUB causes the program to GOSUB to the error handler. The error handler should exit with the RETURN command. This option configures the syntax of the ON ERROR command to ON ERROR GOSUB line, and ON ERROR RETURN NEXT. In the current version of bwBASIC, this is not the default setting for any exisiting OPTION VERSION settings. For example, if your existing BASIC program uses ON ERROR GOSUB, then add OPTION ERROR GOSUB to "profile.bas",after the OPTION VERSION command.

OPTION ERROR GOTO causes the program to GOTO to the error handler. The error handler should exit with the RESUME command. This option configures the syntax of the ON ERROR command to ON ERROR GOTO line, and ON ERROR RESUME NEXT. In the current version of bwBASIC, this is the default setting for all exisiting OPTION VERSION settings. For example, if your existing BASIC program uses ON ERROR GOTO, then add OPTION ERROR GOTO to "profile.bas",after the OPTION VERSION command.

OPTION LABELS OFF disables textual labels. so statements of the form "label:" and "GOTO label" are disallowed. For example, if your existing BASIC program does not use textual labels, then add OPTION LABELS OFF to "profile.bas", after the OPTION VERSION command.

OPTION LABELS ON enables textual labels. so statements of the form "label:" and "GOTO label" are allowed. The label must be on a line by itself and the label must end with the OPTION STATEMENT character. For example, if your existing BASIC program uses textual labels, then add OPTION LABELS ON to "profile.bas", after the OPTION VERSION command.

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".

Conflicting and pathological OPTION combinations are not supported. 4.k. OPTION BUGS

The OPTION BUGS command determines the behavior of a number of BASIC keywords. OPTION BUGS ON enables selected behaviors that exist in some BASIC derivatives. OPTION BUGS OFF enables the traditional ANSI/ECMA/ISO standard behavior. I haved considered several different names for this command, but have not yet thought of a better short name meaning "this dialect ignored multiple established, published, and traditional standards". Because OPTION BUGS is a command, it should be executed before a BASIC program is LOADed. The proper place to set OPTION BUGS is in "profile.bas", after any desired OPTION VERSION command.

With OPTION BUGS ON:

FOR ... ' values are evaluated left-to-right 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 variable names ' period and underscore are allowed

With OPTION BUGS OFF: FOR ... ' values are evaluated according to standard ON X GOTO ... ' an invalid value for X raises an ERROR ON X GOSUB ... ' an invalid value for X raises an ERROR X = VAL("X") ' raises an ERROR INPUT X ' empty string retries input INPUT X$ ' empty string retries input variable names ' period and underscore are not allowed

4.l. ERROR handling

bwBASIC implements a simplified error handling strategy. Errors are seperated into two categories:

a) certain errors which could be corrected with a simple error handler are trappable. These erorrs are: - Out of data (ERROR 4) - the last DATA item has already been READ. - the default behavior is to terminate the program. - Illegal function call (ERROR 5) - a function's parameter's value is invalid. - the default behavior is to terminate the program. - Overflow & Division by Zero (ERROR 6) - the default behavior is to display a warning message. - Advanced Feature (ERROR 73) - the function is not implemented on this platform. - the default behavior is to terminate the program. If an error handler exists, then it is executed, otherwise the defult behaivor is performed. The correct action to take in an error handler depends upon the specific application.

b) all other errors are fatal. These errors include: - Syntax Error - FOR without NEXT - NEXT without FOR - WHILE without WEND - WEND without WHILE - and so on. The program is immediately terminated. Previous versions of bwBASIC used ON ERROR GOSUB. This version defaults to ON ERROR GOTO instead, which could depend upon the OPTION VERSION setting. One possible fix for older bwBASIC programs is to add OPTION ERROR GOSUB as the first line of the program. Another fix would be to add OPTION ERROR GOSUB to your profile.bas file. 4.m. Implementation rules for functions and commands

In many BASIC dialects, there are significant differences between a command and a function. In this version of bwBASIC, the following rules have been used to determine 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.

These rules were chosen to allow maximum flexibility, while maintaining compatibility with existing BASIC programs.

An example of the results of the above rules is "LOCATE".

Since "LOCATE" is implemented as a function, you may:

a) call it as a subroutine like this:

100 LOCATE X, Y b) call it as a function like this:

100 LET N = LOCATE( X, Y ) ' N = 0

c) redefine it as a subroutine like this:

SUB LOCATE( X, Y ) ' ... END SUB

d) redefine it as a function like this:

FUNCTION LOCATE( X, Y ) ' ... END FUNCTION

e) overload it using subroutines like these: SUB LOCATE( X, Y ) ' ... END SUB SUB LOCATE( X, A$ ) ' ... END SUB SUB LOCATE( A$, X ) ' ... END SUB SUB LOCATE( A$, B$ ) ' ... END SUB f) overload it using functions like these: FUNCTION LOCATE( X, Y ) ' ... END FUNCTION FUNCTION LOCATE( X, A$ ) ' ... END FUNCTION FUNCTION LOCATE( A$, X ) ' ... END FUNCTION FUNCTION LOCATE( A$, B$ ) ' ... END FUNCTION

EXPANDED REFERENCE FOR COMMANDS AND FUNCTIONS

bwBASIC provides a simple "HELP" command to assist you in finding the command or function you are looking for. If you do not find the command you are looking for, then look to see if it has been implemented as a function. The following sections provide brief descriptions of every intrinsic command and function in bwBASIC. There are many good books which describe BASIC in detail. ============================================================ COMMANDS ============================================================

------------------------------------------------------------ SYNTAX: ? expressions... DESCRIPTION: This is just a shortcut for PRINT. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: CALL subroutine-name( [parameter [, ...] ] ) DESCRIPTION: Calls a subroutine that was defined by SUB and END SUB. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: CASE constant DESCRIPTION: Introduces an element of a SELECT CASE statement. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: CASE ELSE DESCRIPTION: Introduces a default SELECT CASE element. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: CASE IF partial-expression DESCRIPTION: Introduces a conditional SELECT CASE element. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: CASE IS DESCRIPTION: Same as CASE IF. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: CHAIN filename$ DESCRIPTION: Load and execute another BASIC program, without clearing variables. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: CHANGE A$ TO X | CHANGE X TO A$ DESCRIPTION: Changes a string to a numeric array or a numeric array to a string. VERSIONS: [X] BYWATER [X] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: CLEAR DESCRIPTION: Sets all numeric variables to 0, and all string variables to empty strings. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: CLOAD [file-name$] DESCRIPTION: Loads an ASCII BASIC program into memory. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: CLOAD* ArrayName DESCRIPTION: Loads a numeric array from a file saved using CSAVE*. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: CMDS DESCRIPTION: Prints a list of all implemented BASIC commands. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: COMMON variable [, ...] DESCRIPTION: Designates variables to be passed to a CHAINed program. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: CONT DESCRIPTION: Continue a BASIC program after a STOP has been executed. Program resumes at the line after the STOP. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: CSAVE [file-name$] DESCRIPTION: Saves the current program into the file file-name$ in ASCII format. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: CSAVE* ArrayName DESCRIPTION: Saves a numeric array into a file. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: DATA constant[, ...] DESCRIPTION: Stores numeric and string constants to be accessed by READ. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DEF FNname(arg...)] = expression DESCRIPTION: Defines a single line user-written function. For multiple line functions use the FUNCTION command. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DEF SUB DESCRIPTION: An internal command that allows the BASIC program to execute any function as though it were a command. You do not directly call this command. If your program has a line beginning with a functio name, then DEF SUB is used to execute the function and ignore the result. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DEFDBL letter[-letter] [, ...] DESCRIPTION: Declares variables with single-letter names as numeric variables. TODO: enforce the rnage of [MINDBL,MAXDBL]. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DEFINT letter[-letter] [, ...] DESCRIPTION: Declares variables with single-letter names as numeric variables. TODO: enforce the rnage of [MININT,MAXINT]. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DEFSNG letter[-letter] [, ...] DESCRIPTION: Declares variables with single-letter names as numeric variables. TODO: enforce the rnage of [MINSNG,MAXSNG]. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DEFSTR letter[-letter] [, ...] DESCRIPTION: Declares variables with single-letter names as string variables. TODO: enforce the range of [MINLEN,MAXLEN]. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DELETE line [- line] DESCRIPTION: Deletes program lines indicated by the argument(s). All program lines have a number, which is visible with the LIST command. If line numbers are not provided, they are assigned beginning with 1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DIM variable( elements [, ...]) [, ...] DESCRIPTION: Specifies the dimensions of an array variables. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DO DESCRIPTION: Top of a DO - LOOP structure. If the loop is not terminated by EXIT DO or LOOP UNTIL or LOOP WHILE, then it will loop forever. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DO UNTIL expression DESCRIPTION: Top of a DO - LOOP structure. If the expression is zero, then the loop is terminated. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: DO WHILE expression DESCRIPTION: Top of a DO - LOOP structure. If the expression is non-zero, then the loop is terminated. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: EDIT DESCRIPTION: implementation defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: ELSE DESCRIPTION: Introduces a default condition in a multi-line IF statement. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: ELSEIF DESCRIPTION: Introduces a secondary condition in a multi-line IF statement. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: END DESCRIPTION: Terminates program execution. If the BASIC program was executed from the operating system level, then control returns to the operating system, oterwise control reuturns to the BASIC prompt. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: END FUNCTION DESCRIPTION: Specifies the last line of a multi-line FUNCTION definition. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: END IF DESCRIPTION: Specifies the last line of a multi-line IF definition. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: END SELECT DESCRIPTION: Specifies the last line of a multi-line SELECT CASE definition. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: END SUB DESCRIPTION: Specifies the last line of a multi-line SUB definition. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: ERASE variable [, ...] DESCRIPTION: Eliminates arrayed variables from a program. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: EXIT DESCRIPTION: EXIT by itself is a syntax error. Use EXIT DO, EXIT FOR, EXIT FUNCTION, EXIT SUB, EXIT UNTIL, or EXIT WHILE. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: EXIT DO DESCRIPTION: Immediately exits the inner-most DO-LOOP strucure. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: EXIT FOR DESCRIPTION: Immediately exits the inner-most FOR-NEXT strucure. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: EXIT FUNCTION DESCRIPTION: Immediately exits the inner-most multi-line FUNCTION strucure. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: EXIT SUB DESCRIPTION: Immediately exits the inner-most multi-line SUB strucure. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: EXIT UNTIL DESCRIPTION: Immediately exits the inner-most UNTIL-UEND strucure. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: EXIT WHILE DESCRIPTION: Immediately exits the inner-most WHILE-END strucure. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: FIELD [#] device-number, number AS string-variable$ [, ...] DESCRIPTION: Assigns 'number' bytes in the buffer of random file 'device-number' to the variable 'string-variable$'. GET will automatically update the variable, and PUT will automatically use the variable. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: FNCS DESCRIPTION: Prints a list of all pre-defined BASIC functions. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: FOR variable = start TO finish [STEP increment] DESCRIPTION: Top of a FOR - NEXT structure. The loop will continue a fixed number of times, which is determined by the values of start, finish, and increment. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: FUNCTION [ ( parameter [, ... ] ) ] DESCRIPTION: Top line of a multi-line FUNCTION definition. The variable names specified are local to the FUNCTION definition, and are initialized BYVAL when the function is invoked by another routine. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: GO DESCRIPTION: GO by itself is a syntax error. Use GOTO or GOSUB instead. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: GOSUB line DESCRIPTION: Initiates a subroutine call to the line specified. The subroutine must end with RETURN. The 'line' may be a number or a label. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: GOTO line DESCRIPTION: Branches program execution to the specified line. The 'line' may be a number or a label. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: HELP name DESCRIPTION: Provides help on the specified 'name' which is a command name or function name. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: IF expression THEN line1 [ELSE line2] DESCRIPTION: Single line standard IF command. If the value of expression is non-zero, then branh to line1. If the value of expression is zero and ELSE is provided, then branch to line2. If the value of expression is zero and ELSE is not provided, continue to the next line. LABELS are not allowed. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: IF expression THEN DESCRIPTION: Top of a multi-line IF - END IF structure. If the value of expression is non-zero, then the program lines upto the next ELSE or ELSE IF command are executed, otherwise the program branches to the next ELSE or ELSE IF command. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: INPUT [# device-number]|[;]["prompt string";]list of variables DESCRIPTION: Reads input from the terminal or athe file specified by device-number. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: [LET] variable = expression DESCRIPTION: Assigns the value of expression to variable. The 'LET' keyword is optional. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: LINE INPUT [[#] device-number,]["prompt string";] string-variable$ DESCRIPTION: Reads entire line from the keyboard or a file into string-variable$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: LIST line1 [- line2] DESCRIPTION: Lists BASIC program lines from 'line1' to 'line2' VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: LOAD [file-name$] DESCRIPTION: Loads an ASCII BASIC program into memory. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: LOOP DESCRIPTION: Bottom of a DO - LOOP structure. IF the loop is not terminated by EXIT DO or DO UNTIL or DO WHILE, then it will loop forever. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: LOOP UNTIL DESCRIPTION: Bottom of a DO - LOOP structure. If the expression is zero, then the loop is terminated. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: LOOP WHILE DESCRIPTION: Bottom of a DO - LOOP structure. If the expression is non-zero, then the loop is terminated. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: LPRINT [USING format-string$;] expressions... DESCRIPTION: Send output to the default printer which is implementation defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: LSET string-variable$ = expression DESCRIPTION: Left-aligns the value of expression into string-variable$. If the length of the value is too short, then it is padded on the right with spaces. If the length of the value is too long, then it is truncated on the right. This is only for use with variables assigned to a random access buffer with FIELD command. VERSIONS: [X] BYWATER [_] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: MAINTAINER DESCRIPTION: This command is reserved for use by the Bywater BASIC maintainer and does whatever the maintainer wants it to do. It is not for the BASIC programmer. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: MERGE file-name DESCRIPTION: Merges the BASIC program in file-name into the current BASIC program. Lines in file-name replace any matching lines in the current program. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: MID$( variable$, start [, count ] ) = expression DESCRIPTION: Replaces a subtring of variable$ with expression. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: NAME old-file-name AS new-file-name DESCRIPTION: Changes the name of an existing file. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: NEW DESCRIPTION: Deletes the program in memory and clears all variables. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: NEXT [variable] DESCRIPTION: The bottom line of a FOR - NEXT structure. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: ON expression GOTO | GOSUB line [, ...] DESCRIPTION: Branches (GOTO) or calls (GOSUB) based on the rounded value of variable. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: ON ERROR GOTO errline | ON ERROR RESUME NEXT DESCRIPTION: Specifies what line to goto when a trappable error occurs. ON ERROR GOTO branches to 'errline'. ON ERROR RESUME NEXT branches to the line after the line causing the error. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: ON TIMER count GOSUB line DESCRIPTION: Specifies a line (or label) to gosub when count seconds have elaspsed after TIMER ON is executed. The interrupt routine should end with a RETURN command. Timer events only occur in running BASIC programs. The resolution of the clock is implementation defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: OPEN file-name [FOR INPUT|OUTPUT|APPEND|BINARY|RANDOM] AS [#]device-number [LEN = record-length] DESCRIPTION: Opens a file for use. INPUT, OUTPUT, and APPEND are for text files. BINARY is for binary files. RANDOM is for structured binary files and requires LEN. Files opened for RANDOM use GET and PUT. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: OPTION ... DESCRIPTION: OPTION by itself is a syntax error. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: OPTION ANGLE DEGREES DESCRIPTION: Configures the math functions to accept and return angles in degrees. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION ANGLE RADIANS DESCRIPTION: Configures the math functions to accept and return angles in radians. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION ARITHMETIC DECIMAL DESCRIPTION: Currently has no effect. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION ARITHMETIC FIXED DESCRIPTION: Currently has no effect. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION ARITHMETIC NATIVE DESCRIPTION: Currently has no effect. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION BASE 0 DESCRIPTION: Sets the lowest array subscript to 0. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: OPTION BASE 1 DESCRIPTION: Sets the lowest array subscript to 1. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: OPTION BUGS OFF DESCRIPTION: Disables bugs commonly found in BASIC-80 derivatives and clones. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION BUGS ON DESCRIPTION: Enables bugs commonly found in BASIC-80 derivatives and clones. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION COMMENT char DESCRIPTION: Sets the comment character. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION COMPARE BINARY DESCRIPTION: Causes string comparisons to be case-sensitive. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION COMPARE DATABASE DESCRIPTION: Causes string comparisons to be case-insensitive. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION COMPARE TEXT DESCRIPTION: Causes string comparisons to be case-insensitive. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION COVERAGE OFF DESCRIPTION: Disables BASIC code coverage recording, displayed using the LIST command. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION COVERAGE ON DESCRIPTION: Enables BASIC code coverage recording, displayed using the LIST command. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION DATE format DESCRIPTION: Sets the date format string used by C strftime() for DATE$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION DISABLE COMMAND name DESCRIPTION: Disables the specified BASIC command. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION DISABLE FUNCTION name DESCRIPTION: Disables the specified BASIC function. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION DISABLE OPERATOR name DESCRIPTION: Disables the specified BASIC operator. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION ENABLE COMMAND name DESCRIPTION: Enables the specified BASIC command. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION ENABLE FUNCTION name DESCRIPTION: Enables the specified BASIC function. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION ENABLE OPERATOR name DESCRIPTION: Enables the specified BASIC operator. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION INDENT number DESCRIPTION: Sets indention level for LIST. Zero means no indention. Default is 2. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION LABELS OFF DESCRIPTION: Disables text labels. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION LABELS ON DESCRIPTION: Enables text labels. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION STATEMENT char DESCRIPTION: Sets the statement seperator character. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION STRICT OFF DESCRIPTION: Disables checking for implicit array creation without using the DIM command. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION STRICT ON DESCRIPTION: Enables checking for implicit array creation without using the DIM command. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION TERMINAL ADM-3A DESCRIPTION: Enables ADM-3A terminal control codes for CLS, COLOR, and LOCATE. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION TERMINAL ANSI DESCRIPTION: Enables ANSI terminal control codes for CLS, COLOR, and LOCATE. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION TERMINAL NONE DESCRIPTION: Disables terminal control codes for CLS, COLOR, and LOCATE. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION TIME format DESCRIPTION: Sets the time format string used by C strftime() for TIME$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION TRACE OFF DESCRIPTION: Disables displaying a stack trace when an ERROR occurs. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION TRACE ON DESCRIPTION: Enables displaying a stack trace when an ERROR occurs. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: OPTION VERSION [version] DESCRIPTION: Selects a combination of OPTION settings and enables certain commands and functions. If no version is specified, displays a list of the available versions. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: PRINT [# device-number,][USING format-string$;] expressions... DESCRIPTION: Sends output to the console or a file. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: QUIT DESCRIPTION: Exits to the operating system. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: READ variable [, ...] DESCRIPTION: Reads values from DATA statements. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: REM ... DESCRIPTION: Remark. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: RENUM DESCRIPTION: Implementation defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: RESTORE [line] DESCRIPTION: Resets the line used for the next READ statement. 'line' may be either a number or a label. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: RESUME [ 0 | line | NEXT ] DESCRIPTION: Used in an error handler to specify the next line to execute. RESUME and RESUME 0 branch to ERL. RESUME NEXT branches to the line after ERL. RESUME line branches to the specified line. 'line' may be either a number or a label. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: RETURN DESCRIPTION: Concludes a subroutine called by GOSUB. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: RSET string-variable$ = expression DESCRIPTION: Right-aligns the value of expression into string-variable$. If the length of the value is too short, then it is padded on the left with spaces. If the length of the value is too long, then it is truncated on the right. This is only for use with variables assigned to a random access buffer with FIELD command. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: RUN [line | file-name$] DESCRIPTION: RUN executes the program in memory from the start. RUN line exexecutes the program in memory beginning at 'line'. RUN file-name$ loads a new BAASIC program and executes the program from the start. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: SAVE [file-name$] DESCRIPTION: Saves the current program into the file file-name$ in ASCII format. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: SELECT DESCRIPTION: SELECT by itself is a syntax error. Use SELECT CASE instead. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: SELECT CASE expression DESCRIPTION: Introduces a multi-line conditional selection statement. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: STOP DESCRIPTION: Interrupts program execution and displays the line number of the STOP command. For use when debugging BASIC programs. Whether STOP issues a SIGINT signal is implementation defined. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: SUB name [ ( parameter [,...] ) ] DESCRIPTION: Top line of a multi-line SUB definition. The variable names specified are local to the SUB definition, and are initialized BYVAL when the subroutine is invoked by another routine. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: SWAP variable, variable DESCRIPTION: Swaps the values of two variables. Both variables must be of the same type. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: SYSTEM DESCRIPTION: Exits to the operating system. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: TIMER ON | STOP | OFF DESCRIPTION: TIMER ON enables the interrupt. TIMER STOP disables the interrupt, but the count continues. TIMER OFF terminates the interrupt. When the specified seconds have elapsed, TIMER STOP is internaly executed before the interrupt is taken. TIMER ON should be executed just before the RETURN command if you want the interrupt to occur again. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: UEND DESCRIPTION: Bottom of a UNTIL - UEND structure. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: UNTIL expression DESCRIPTION: Top of a UNTIL - UEND structure. If the expression is zero, then the loop is terminated. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: USER LBL DESCRIPTION: An internal command that allows the BASIC program to find a user label. You do not directly call this command. If your program has a line with a label, then USER LBL is used to mark the line. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: VARS DESCRIPTION: Prints a list of all global variables. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: WEND DESCRIPTION: Bottom of a WHILE - WEND structure. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: WHILE DESCRIPTION: Top of a WHILE - WEND structure. If the expression is non-zero, then the loop is terminated. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: WRITE [# device-number,] element [, .... ] DESCRIPTION: Outputs variables to the screen or to a file. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ ============================================================ FUNCTIONS ============================================================ ------------------------------------------------------------ SYNTAX: N = ABS( X ) PARAMETER: X is a number DESCRIPTION: The absolute value of X. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = ACOS( X ) PARAMETER: X is a number DESCRIPTION: The arccosine of X in radians, where 0 <= ACOS(X) <= PI. X shall be in the range -1 <= X <= 1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = ANGLE( X, Y ) PARAMETER: X is a number PARAMETER: Y is a number DESCRIPTION: The angle in radians between the positive x-axis and the vector joining the origin to the point with coordinates (X, Y), where -PI < ANGLE(X,Y) <= PI. X and Y must not both be 0. Note that the counterclockwise is positive, e.g., ANGLE(1,1) = 45 degrees. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = ARGC DESCRIPTION: The number of parameters passed to a FUNCTION or SUB. If not in a FUNCTION or SUB, returns -1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = ARGT$( X ) PARAMETER: X is a number, [MININT,MAXINT] DESCRIPTION: The value of the X'th parameter to a FUNCTION or SUB; '$' or '#'. X in [1,ARGC]. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = ARGV( X ) PARAMETER: X is a number, [MININT,MAXINT] DESCRIPTION: The value of the X'th parameter to a FUNCTION or SUB. X in [1,ARGC] and ARGT$( X ) = '#'. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = ARGV$( X ) PARAMETER: X is a number, [MININT,MAXINT] DESCRIPTION: The value of the X'th parameter to a FUNCTION or SUB. X in [1,ARGC] and ARGT$( X ) = '$'. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = ASC( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: The ASCII code for the first letter in A$. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = ASIN( X ) PARAMETER: X is a number DESCRIPTION: The arcsine of X in radians, where -PI/2 <= ASIN(X) <= PI/2; X shall be in the range -1 <= X <= 1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = ATN( X ) PARAMETER: X is a number DESCRIPTION: The arctangent of X in radians, i.e. the angle whose tangent is X, where -PI/2 < ATN(X) < PI/2. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = CCUR( X ) PARAMETER: X is a number, [MINCUR,MAXCUR] DESCRIPTION: The currency (64-bit) integer value of X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = CDBL( X ) PARAMETER: X is a number, [MINDBL,MAXDBL] DESCRIPTION: The double-precision value of X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = CEIL( X ) PARAMETER: X is a number DESCRIPTION: The smallest integer not less than X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = CHDIR( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: Changes to the directory named to A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = CHR$( X ) PARAMETER: X is a number, [0,255] DESCRIPTION: The one-character string with the character corresponding to the ASCII code X. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = CINT( X ) PARAMETER: X is a number, [MININT,MAXINT] DESCRIPTION: The short (16-bit) integer value of X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = CLNG( X ) PARAMETER: X is a number, [MINLNG,MAXLNG] DESCRIPTION: The long (32-bit) integer value of X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = CLOSE( X ) PARAMETER: X is a number, [1,MAXDEV] DESCRIPTION: Close file number X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = CLS DESCRIPTION: Clears the screen. Cursor is positioned at row 1, column 1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = COLOR( X, Y ) PARAMETER: X is a number, [0,255] PARAMETER: Y is a number, [0,255] DESCRIPTION: Sets the foreground text color to X, and the background text color to Y. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = COS( X ) PARAMETER: X is a number DESCRIPTION: The cosine of X, where X is in radians. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = COSH( X ) PARAMETER: X is a number DESCRIPTION: The hyperbolic cosine of X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = COT( X ) PARAMETER: X is a number DESCRIPTION: The cotangent of X, where X is in radians. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = CSC( X ) PARAMETER: X is a number DESCRIPTION: The cosecant of X, where X is in radians. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = CSNG( X ) PARAMETER: X is a number, [MINFLT,MAXFLT] DESCRIPTION: The single-precision value of X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = CVC( A$ ) PARAMETER: A$ is a string, LEN >= sizeof(CUR) DESCRIPTION: The currency (64-bit) integer value in A$, which was created by MKC$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = CVD( A$ ) PARAMETER: A$ is a string, LEN >= sizeof(DBL) DESCRIPTION: The double-precision value in A$, which was created by MKD$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = CVI( A$ ) PARAMETER: A$ is a string, LEN >= sizeof(INT) DESCRIPTION: The short (16-bit) integer value in A$, which was created by MKI$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = CVL( A$ ) PARAMETER: A$ is a string, LEN >= sizeof(LNG) DESCRIPTION: The long (32-bit) integer value in A$, which was created by MKL$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = CVS( A$ ) PARAMETER: A$ is a string, LEN >= sizeof(FLT) DESCRIPTION: The single-precision value in A$, which was created by MKS$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = DATE DESCRIPTION: The current date in decimal form YYYDDD, where YYY are the number of years since 1900 and DDD is the ordinal number of the current day of the year; e.g., the value of DATE on May 9, 1977 was 77129. If there is no calendar available, then the value of DATE shall be -1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = DATE$ DESCRIPTION: BASIC-80: The current date based on the computer's internal clock as a string in the form 'MM-DD-YYYY'.ECMA-116: The date in the string representation 'YYYYMMDD' according to ISO 2014. For example, the value of DATE$ on May 9, 1977 was '19770509'. If there is not calendar available, then the value of DATE$ shall be '00000000'. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = DEF FN DESCRIPTION: User Function. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = DEG( X ) PARAMETER: X is a number DESCRIPTION: The number of degrees in X radians. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = ENVIRON( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: Sends the environment variable expression contained in A$ to the host operating system. A$ must contain the '=' character. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = ENVIRON$( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: The value of the environment variable named A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = EOF( X ) PARAMETER: X is a number, [1,MAXDEV] DESCRIPTION: If device number X is at the end-of-file, then -1, otherwise 0. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = EPS( X ) PARAMETER: X is a number DESCRIPTION: The maximum of (X-X1,X2-X, sigma) where X1 and X2 are the predecessor and successor of X and signma is the smallest positive value representable. If X has no predecessor the X1=X and if X has no successor the X2=X. Note EPS(0) is the smallest positive number representable by the implementation, and is therefor implementation-defined. Note also that EPS may produce different results for different arithmetic options (see OPTION ARITHMETIC). VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = ERL DESCRIPTION: The line number of the most recent error. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = ERR DESCRIPTION: The error number of the most recent error. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = ERR$ DESCRIPTION: The last error message. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = ERROR( X ) PARAMETER: X is a number, [0,255] DESCRIPTION: Simulate the error number in X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = ERROR( X, A$ ) PARAMETER: X is a number, [0,255] PARAMETER: A$ is a string, LEN >= 0 DESCRIPTION: Simulate the error number in X, with a custom message in A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = EXP( X ) PARAMETER: X is a number DESCRIPTION: The exponential value of X, i.e., the value of the base of natural logarithms (e = 2.71828) raised to the power of X; if EXP(X) is less that machine infinitesimal, then its value shall be replaced with zero. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = FILEATTR( X, Y ) PARAMETER: X is a number, [1,MAXDEV] PARAMETER: Y is a number, [MININT,MAXINT] DESCRIPTION: For file X, if Y = 1 then returns open mode, otherwise returns zero. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = FILES DESCRIPTION: Displays all the file names. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = FILES( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: Displays all the file names matching A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = FIX( X ) PARAMETER: X is a number DESCRIPTION: The truncated integer, part of X. FIX (X) is equivalent to SGN(X)*INT(ABS(X)). The major difference between FIX and INT is that FIX does not return the next lower number for negative X. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = FP( X ) PARAMETER: X is a number DESCRIPTION: The fractional part of X, i.e. X - IP(X). VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = FRE DESCRIPTION: The number of bytes of available memory. This function is provided for backward compatibility and it always returns a fixed value of 32000. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = FRE( X ) PARAMETER: X is a number DESCRIPTION: The number of bytes of available memory. This function is provided for backward compatibility and it always returns a fixed value of 32000. The value of X is ignored. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = FRE( A$ ) PARAMETER: A$ is a string, LEN >= 0 DESCRIPTION: The number of bytes of available memory. This function is provided for backward compatibility and it always returns a fixed value of 32000.The value of A$ is ignored. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = FREEFILE DESCRIPTION: The next available file number. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = GET( X ) PARAMETER: X is a number, [1,MAXDEV] DESCRIPTION: For file X, gets the next available record. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = GET( X, Y ) PARAMETER: X is a number, [1,MAXDEV] PARAMETER: Y is a number, [MININT,MAXINT] DESCRIPTION: For file X, gets record number Y. The first record number is 1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = HEX$( X ) PARAMETER: X is a number, [MININT,MAXINT] DESCRIPTION: The the hexadecimal (base 16) representation of X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = INKEY$ DESCRIPTION: The keypress, if available. If a keypress is not available, then immediately returns a null string (''). If not supported by the platform, then always returns an empty string, so use INPUT$(1) instead. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = INP( X ) PARAMETER: X is a number, [0,255] DESCRIPTION: The value read from machine port X. Not supported on all platforms. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = INPUT$( X ) PARAMETER: X is a number, [0,MAXLEN] DESCRIPTION: The string of X characters, read from the terminal. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = INPUT$( X, Y ) PARAMETER: X is a number, [0,MAXLEN] PARAMETER: Y is a number, [1,MAXDEV] DESCRIPTION: The string of X characters, read from file Y. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = INSTR( A$, B$ ) PARAMETER: A$ is a string, LEN >= 0 PARAMETER: B$ is a string, LEN >= 0 DESCRIPTION: The position at which B$ occurs in A$, beginning at position 1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = INSTR( X, A$, B$ ) PARAMETER: X is a number, [1,MAXLEN] PARAMETER: A$ is a string, LEN >= 0 PARAMETER: B$ is a string, LEN >= 0 DESCRIPTION: The position at which B$ occurs in A$, beginning at position X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = INT( X ) PARAMETER: X is a number DESCRIPTION: The largest integer not greater than X; e.g. INT(1.3) = 1 and INT(-1.3) = 2. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = IP( X ) PARAMETER: X is a number DESCRIPTION: The integer part of X, i.e., SGN(X)*INT(ABS(X)). VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = KILL( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: Removes the file named in A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = LCASE$( A$ ) PARAMETER: A$ is a string, LEN >= 0 DESCRIPTION: The string of characters from the value associatedwith A$ by replacing each upper-case-letter in the string by its lower-case version. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = LEFT$( A$, X ) PARAMETER: A$ is a string, LEN >= 0 PARAMETER: X is a number, [0,MAXLEN] DESCRIPTION: The X left-most characters of A$, beginning from postion 1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = LEN( A$ ) PARAMETER: A$ is a string, LEN >= 0 DESCRIPTION: The length of A$. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = LOC( X ) PARAMETER: X is a number, [1,MAXDEV] DESCRIPTION: The location of file X; the next record that GET or PUT statements will use. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = LOCATE( X, Y ) PARAMETER: X is a number, [0,255] PARAMETER: Y is a number, [0,255] DESCRIPTION: Locates the cursor to row X, column Y. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = LOF( X ) PARAMETER: X is a number, [1,MAXDEV] DESCRIPTION: The length of file X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = LOG( X ) PARAMETER: X is a number, > 0 DESCRIPTION: The natural logarithm of X; X shall be greater than zero. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = LOG10( X ) PARAMETER: X is a number, > 0 DESCRIPTION: The common logarithm of X; X shall be greater than zero. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = LOG2( X ) PARAMETER: X is a number, > 0 DESCRIPTION: The base 2 logarithm of X; X shall be greater than zero. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = LPOS DESCRIPTION: The current cursor position in the line for the printer. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = LTRIM$( A$ ) PARAMETER: A$ is a string, LEN >= 0 DESCRIPTION: The string of characters resulting from the value associated with A$ by deleting all leading space characters. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = LWIDTH( X ) PARAMETER: X is a number, [0,255] DESCRIPTION: For printer, sets the line width to X. Zero means no wrapping will occur. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = MAX( X, Y ) PARAMETER: X is a number PARAMETER: Y is a number DESCRIPTION: The smaller (algebraically) of the parameters. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MAXBYT DESCRIPTION: The largest finite positive number representable as a BYTE; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MAXCUR DESCRIPTION: The largest finite positive number representable as a CURRENCY; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MAXDBL DESCRIPTION: The largest finite positive number representable as a DOUBLE; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MAXDEV DESCRIPTION: The largest finite positive number useable as a FILE NUMBER; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MAXINT DESCRIPTION: The largest finite positive number representable as an INTEGER; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MAXLEN( A$ ) PARAMETER: A$ is a string, LEN >= 0 DESCRIPTION: The maximum length associated with the simple-string-variable A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MAXLNG DESCRIPTION: The largest finite positive number representable as a LONG; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MAXLVL DESCRIPTION: The maximum stack level; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MAXNUM DESCRIPTION: The largest finite positive number representable and manipulable by the implementation; implementation-defined. MAXNUM may represent diffent number for different arithmetic options (see OPTION ARITHMETIC). VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MAXSNG DESCRIPTION: The largest finite positive number representable as a SINGLE; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = MID$( A$, X ) PARAMETER: A$ is a string, LEN >= 0 PARAMETER: X is a number, [1,MAXLEN] DESCRIPTION: The characters of A$, starting from postion X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = MID$( A$, X, Y ) PARAMETER: A$ is a string, LEN >= 0 PARAMETER: X is a number, [1,MAXLEN] PARAMETER: Y is a number, [0,MAXLEN] DESCRIPTION: The Y characters of A$, starting from postion X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = MIN( X, Y ) PARAMETER: X is a number PARAMETER: Y is a number DESCRIPTION: The smaller (algebraically) of the parameters. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MINBYT DESCRIPTION: The largest finite negative number representable as a BYTE; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MINCUR DESCRIPTION: The largest finite negative number representable as a CURRENCY; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MINDBL DESCRIPTION: The largest finite negative number representable as a DOUBLE; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MINDEV DESCRIPTION: The largest finite negative number useable as a FILE NUMBER; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MININT DESCRIPTION: The largest finite negative number representable as an INTEGER; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MINLNG DESCRIPTION: The largest finite negative number representable as a LONG; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MINNUM DESCRIPTION: The largest finite negative number representable and manipulable by the implementation; implementation-defined. MINNUM may represent diffent number for different arithmetic options (see OPTION ARITHMETIC). VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = MINSNG DESCRIPTION: The largest finite negative number representable as a SINGLE; implementation-defined. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = MKC$( X ) PARAMETER: X is a number, [MINCUR,MAXCUR] DESCRIPTION: The internal representation of the currency (64-bit) integer X as a string. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [_] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = MKD$( X ) PARAMETER: X is a number, [MINDBL,MAXDBL] DESCRIPTION: The internal representation of X as a string. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = MKDIR( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: Makes the directory named in A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = MKI$( X ) PARAMETER: X is a number, [MININT,MAXINT] DESCRIPTION: The internal representation of the short (16-bit) integer X as a string. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = MKL$( X ) PARAMETER: X is a number, [MINLNG,MAXLNG] DESCRIPTION: The internal representation of the long (32-bit) integer X as a string. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = MKS$( X ) PARAMETER: X is a number, [MINFLT,MAXFLT] DESCRIPTION: The internal representation of X as a string. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = MOD( X, Y ) PARAMETER: X is a number PARAMETER: Y is a number, <> 0 DESCRIPTION: X modulo Y, i.e., X-Y*INT(X/Y). Y shall not equal zero. VERSIONS: [_] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = NAME( A$, B$ ) PARAMETER: A$ is a string, LEN >= 1 PARAMETER: B$ is a string, LEN >= 1 DESCRIPTION: Rename the file named A$ into B$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = NULL( X ) PARAMETER: X is a number, [0,255] DESCRIPTION: Appends X null characters after each line printed by LPRINT or LLIST. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = OCT$( X ) PARAMETER: X is a number, [MININT,MAXINT] DESCRIPTION: The the octal (base 8) representation of X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = OPEN( A$, X, B$ ) PARAMETER: A$ is a string, LEN >= 1 PARAMETER: X is a number, [1,MAXDEV] PARAMETER: B$ is a string, LEN >= 1 DESCRIPTION: Open file number X. A$ is the mode: I, O, A, R. B$ is the file name. Default the record length. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = OPEN( A$, X, B$, Y ) PARAMETER: A$ is a string, LEN >= 1 PARAMETER: X is a number, [1,MAXDEV] PARAMETER: B$ is a string, LEN >= 1 PARAMETER: Y is a number, [MININT,MAXINT] DESCRIPTION: Open file number X. A$ is the mode: I, O, A, R. B$ is the file name. Y is the record length. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = ORD( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: The ordinal position of the character named by the string associated with A$ in the collating sequence of ASCII character set, where the first member of the character set is in position zero. The acceptable values for the standard character set are shown in Table 1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = OUT( X, Y ) PARAMETER: X is a number, [MININT,MAXINT] PARAMETER: Y is a number, [0,255] DESCRIPTION: Sends Y to hardware port X. Not supported on all platforms. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = PEEK( X ) PARAMETER: X is a number, [MINLNG,MAXLNG] DESCRIPTION: The value read from hardware address X. Not supported on all platforms. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = PI DESCRIPTION: The constant 3.14159 which is the ratio of the circumference of a circle to its diameter. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = POKE( X, Y ) PARAMETER: X is a number, [MINLNG,MAXLNG] PARAMETER: Y is a number, [0,255] DESCRIPTION: Sends Y to hardware address X. Not supported on all platforms. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = POS DESCRIPTION: The current cursor position in the line. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = POS( X ) PARAMETER: X is a number, [1,MAXDEV] DESCRIPTION: The current cursor position in the line for file X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = POS( A$, B$ ) PARAMETER: A$ is a string, LEN >= 0 PARAMETER: B$ is a string, LEN >= 0 DESCRIPTION: The character position, within the value assocated with A$, of the first character of the first occurence of the value associated with B$, starting at the first character of A$. If there is not such occurence, then the value returned is zero. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = POS( A$, B$, X ) PARAMETER: A$ is a string, LEN >= 0 PARAMETER: B$ is a string, LEN >= 0 PARAMETER: X is a number, [1,MAXLEN] DESCRIPTION: The character position, within the value assocated with A$, of the first character of the first occurence of the value associated with B$, starting at the Xth character of A$. If there is not such occurence, then the value returned is zero. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = PUT( X ) PARAMETER: X is a number, [1,MAXDEV] DESCRIPTION: For file X, puts the next available record. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = PUT( X, Y ) PARAMETER: X is a number, [1,MAXDEV] PARAMETER: Y is a number, [MININT,MAXINT] DESCRIPTION: For file X, puts record number Y. The first record number is 1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = RAD( X ) PARAMETER: X is a number DESCRIPTION: The number of radians in X degrees. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = RANDOMIZE DESCRIPTION: Seeds the pseudo-random number generator with TIME. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = RANDOMIZE( X ) PARAMETER: X is a number DESCRIPTION: Seeds the pseudo-random number generator with X. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = REMAINDER( X, Y ) PARAMETER: X is a number PARAMETER: Y is a number, <> 0 DESCRIPTION: The remainder function, i.e., X-Y*IP(X/Y). Y shall not equal zero. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = REPEAT$( X, Y ) PARAMETER: X is a number, [0,MAXLEN] PARAMETER: Y is a number, [0,255] DESCRIPTION: The string consisting of X copies of CHR$(Y); X > 0. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = REPEAT$( X, A$ ) PARAMETER: X is a number, [0,MAXLEN] PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: The string consisting of X copies of A$; X > 0. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = RESET DESCRIPTION: Close all open files. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = RIGHT$( A$, X ) PARAMETER: A$ is a string, LEN >= 0 PARAMETER: X is a number, [0,MAXLEN] DESCRIPTION: The right-most X characters of A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = RMDIR( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: Removes the directory named in A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = RND DESCRIPTION: The next pseudo-random number in an implementation-defined sequence of pseudo-random numbers uniformly distributed in the range 0 <= RND < 1. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = RND( X ) PARAMETER: X is a number DESCRIPTION: Returns a pseudorandom number in the range [0,1]. The value of X is ignored. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = ROUND( X, Y ) PARAMETER: X is a number PARAMETER: Y is a number, [MININT,MAXINT] DESCRIPTION: The value of X rounded to Y decimal digits to the right of the decimal point (or -Y digits to the left if Y < 0); i.e., INT(X*10^Y+.5)/10^Y. Y must be in [-32,32]. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = RTRIM$( A$ ) PARAMETER: A$ is a string, LEN >= 0 DESCRIPTION: The string of characters resulting from the value associated with A$ by deleting all trailing space characters. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = SEC( X ) PARAMETER: X is a number DESCRIPTION: The secant of X, where X is in radians. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = SEEK( X ) PARAMETER: X is a number, [1,MAXDEV] DESCRIPTION: The location of file X; the next record that GET or PUT statements will use. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = SEEK( X, Y ) PARAMETER: X is a number, [1,MAXDEV] PARAMETER: Y is a number, [MININT,MAXINT] DESCRIPTION: For file X, move to record number Y; the first record number is 1. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = SGN( X ) PARAMETER: X is a number DESCRIPTION: The sign of X: -1 if X < 0, 0 if X = 0, and +1 if X > 0. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = SHELL( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: The exit code resulting from the execution of an operating system command. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = SIN( X ) PARAMETER: X is a number DESCRIPTION: The sine of X, where X is in radians. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = SINH( X ) PARAMETER: X is a number DESCRIPTION: The hyperbolic sine of X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = SPACE$( X ) PARAMETER: X is a number, [0,MAXLEN] DESCRIPTION: The string of X blank spaces. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = SPC( X ) PARAMETER: X is a number DESCRIPTION: The string of X blank spaces. Only for use within the PRINT command. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = SQR( X ) PARAMETER: X is a number, >= 0 DESCRIPTION: The non-negative square root of X; X shall be non-negative. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = STR$( X ) PARAMETER: X is a number DESCRIPTION: The string generated by the print-statement as the numeric-representation of the value associated with X. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = STRING$( X, A$ ) PARAMETER: X is a number, [0,MAXLEN] PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: The string X bytes long consisting of the first character of A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = STRING$( X, Y ) PARAMETER: X is a number, [0,MAXLEN] PARAMETER: Y is a number, [0,255] DESCRIPTION: The string X bytes long consisting of CHR$(Y). VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = TAB( X ) PARAMETER: X is a number DESCRIPTION: The string required to advance to column X. Only for use within the PRINT command. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = TAN( X ) PARAMETER: X is a number DESCRIPTION: The tangent of X, where X is in radians. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = TANH( X ) PARAMETER: X is a number DESCRIPTION: The hyperbolic tangent of X. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: N = TIME DESCRIPTION: The time elapsed since the previous midnight, expressed in seconds; e.g., the value of TIME at 11:15 AM is 40500. If there is no clock available, then the value of TIME shall be -1. The value of TIME at midnight shall be zero (not 86400). VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = TIME$ DESCRIPTION: The time of day in 24-hour notation according to ISO 3307. For example, the value of TIME$ at 11:15 AM is '11:15:00'. If there is no clock available, then the value of TIME$ shall be '99:99:99'. The value of TIME$ at midnight is '00:00:00'. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = TIMER DESCRIPTION: The time in the system clock in seconds elapsed since midnight. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: S$ = TRIM$( A$ ) PARAMETER: A$ is a string, LEN >= 0 DESCRIPTION: The string resulting from removing both leading and trailing spaces from A$. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = TROFF DESCRIPTION: Turn tracing OFF VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = TRON DESCRIPTION: Turn tracing ON VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = TRUNCATE( X, Y ) PARAMETER: X is a number PARAMETER: Y is a number, [MININT,MAXINT] DESCRIPTION: The value of X truncated to Y decimal digits to the right of the decimal point (or -Y digits to the left if Y < 0); i.e., IP(X*10^Y)/10^Y. Y in [-32,32]. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [_] BASIC-80 [_] TRS-83 [_] TRS-84 [_] GW-BASIC [X] ECMA-116 [_] QBASIC [_] VBDOS [_] VB1 [_] VB2 [_] VB3 [_] VB4 [_] VB5 [_] VB6 ------------------------------------------------------------ SYNTAX: S$ = UCASE$( A$ ) PARAMETER: A$ is a string, LEN >= 0 DESCRIPTION: The string of characters resulting from the value associated with A$ by replacing each lower-case-letter in the string by its upper-case version. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = VAL( A$ ) PARAMETER: A$ is a string, LEN >= 1 DESCRIPTION: The value of the numeric-constant associated with A$, if the string associated with A$ is a numeric-constant. Leading and trailing spaces in the string are ignored. If the evaluation of the numeric-constant would result in a value which causes an underflow, then the value returned shall be zero. For example, VAL(' 123.5 ' ) = 123.5, VAL('2.E-99') could be zero, and VAL('MCMXVII') causes an exception. VERSIONS: [X] BYWATER [X] DARTMOUTH [X] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [X] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = WAIT( X, Y ) PARAMETER: X is a number, [MININT,MAXINT] PARAMETER: Y is a number, [0,255] DESCRIPTION: Waits for the value of (INP(X) AND Y) to become nonzero. Not supported on all platforms. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = WAIT( X, Y, Z ) PARAMETER: X is a number, [MININT,MAXINT] PARAMETER: Y is a number, [0,255] PARAMETER: Z is a number, [0,255] DESCRIPTION: Waits for the value of ((INP(X) XOR Z) AND Y) to become nonzero. Not supported on all platforms. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = WIDTH( X ) PARAMETER: X is a number, [0,255] DESCRIPTION: For console, sets the line width to X. Zero means no wrapping will occur. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------ SYNTAX: N = WIDTH( X, Y ) PARAMETER: X is a number, [1,MAXDEV] PARAMETER: Y is a number, [0,255] DESCRIPTION: For file X, sets the line width to Y. Zero means no wrapping will occur. VERSIONS: [X] BYWATER [_] DARTMOUTH [_] ECMA-55 [X] BASIC-80 [X] TRS-83 [X] TRS-84 [X] GW-BASIC [_] ECMA-116 [X] QBASIC [X] VBDOS [X] VB1 [X] VB2 [X] VB3 [X] VB4 [X] VB5 [X] VB6 ------------------------------------------------------------

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 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., BWB.PROMPT$ = "Ok"+CHR$(10) will give an "Ok" prompt followed by a linefeed. The preset variable BWB.IMPLEMENTATION$ will 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. I am considering changing the behaviior of BWB.IMPLEMENTATION$ In future versions of bwBASIC to return the current OPTION TERMINAL setting.

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: INP reads a value from a hardware port. In the current version, using INP() will generate ERROR 73 on most platforms. 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 on most platforms. It is expected that you will provide a suitable implementation for your specific application. For example: SUB OUT( X, Y ) REM do something END SUB PEEK reads a value from a memory location. In the current version, using PEEK() will generate ERROR 73 on most platforms. 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 on most platforms. It is expected that you will provide a suitable implementation for your specific application. For example: SUB POKE( X, Y ) REM do something END SUB WAIT reads a value from a hardware port. In the current version, using WAIT() will generate ERROR 73 on most platforms. It is expected that you will provide a suitable implementation for your specific application. For example: SUB WAIT( X, Y ) REM do something END SUB SUB WAIT( X, Y, Z ) REM do something END SUB DEF USR Relies on CP/M or MSDOS conventions for binary executable files. USR Relies on CP/M or MSDOS conventions for binary executable files. VARPTR Relies on CP/M or MSDOS conventions for binary executable files. 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. In the interim, you might use the "ON TIMER" command to implement a simple multitasking BASIC program. 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. 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 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 LBOUND LINES MAT MIX MULTIPOINT OUTIN OUTPUT PARACT PICTURE PIXEL PLOT POINTS RECEIVE RENUMBER REWRITE ROTATE ROUND SEIZE SEND SHIFT TIMEOUT TRACE TRANSFORM UBOUND VIEWPORT WAIT VIEWPORT ZONEWIDTH

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.

COMMUNICATIONS:
email: tcamp@delphi.com