diff --git a/BYWATER.txt b/BYWATER.txt new file mode 100644 index 0000000..dc126a3 --- /dev/null +++ b/BYWATER.txt @@ -0,0 +1,2538 @@ +============================================================ + GENERAL +============================================================ + + +OPTION VERSION "BYWATER" +REM INTERNAL ID: B15 +REM DESCRIPTION: Bywater BASIC 3 +REM REFERENCE: Bywater BASIC Interpreter, version 3.20 +REM by Ted A. Campbell, Jon B. Volkoff, Paul Edwards, et al. +REM (c) 2014-2017, Howard Wulf, AF5NE +REM http://wwww.sourceforge.net/bwbasic/ +REM bwbasic-3.20.zip +REM +OPTION STRICT OFF +OPTION ANGLE RADIANS +OPTION BUGS ON +OPTION LABELS ON +OPTION COMPARE BINARY +OPTION COVERAGE OFF +OPTION TRACE ON +OPTION ERROR GOTO +OPTION IMPLICIT +OPTION BASE 0 +OPTION RECLEN 128 +OPTION DATE "%m/%d/%Y" +OPTION TIME "%H:%M:%S" +OPTION PUNCT STRING "$" +OPTION PUNCT DOUBLE "#" +OPTION PUNCT SINGLE "!" +OPTION PUNCT CURRENCY "@" +OPTION PUNCT LONG "&" +OPTION PUNCT INTEGER "%" +OPTION PUNCT BYTE "~" +OPTION PUNCT QUOTE """ +OPTION PUNCT COMMENT "'" +OPTION PUNCT STATEMENT ":" +OPTION PUNCT PRINT "?" +OPTION PUNCT INPUT " " +OPTION PUNCT IMAGE " " +OPTION PUNCT LPAREN "(" +OPTION PUNCT RPAREN ")" +OPTION PUNCT FILENUM "#" +OPTION PUNCT AT "@" +OPTION USING DIGIT "#" +OPTION USING COMMA "," +OPTION USING PERIOD "." +OPTION USING PLUS "+" +OPTION USING MINUS "-" +OPTION USING EXRAD "^" +OPTION USING DOLLAR "$" +OPTION USING FILLER "*" +OPTION USING LITERAL "_" +OPTION USING FIRST "!" +OPTION USING ALL "&" +OPTION USING LENGTH "\" + + +============================================================ + COMMANDS +============================================================ + + +------------------------------------------------------------ + SYNTAX: APPEND filename$ +DESCRIPTION: Merges the BASIC program in filename$ into the + current BASIC program; lines in filename$ + replace any matching lines in the current + program. +------------------------------------------------------------ + SYNTAX: AS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: AUTO [start [, increment]] +DESCRIPTION: Automatic line numbering for manual program + entry. If the line already exists, then an + asterisk is displayed and pressing ENTER + leaves the line as-is. If the line does not + exist, then an asterisk is not displayed and + pressing ENTER terminates AUTO mode. + Regardless whether the line exists, entering + the command MAN will terminate AUTO mode. + AUTO mode is also terminated by any ERROR or + by pressing control-C. +------------------------------------------------------------ + SYNTAX: BREAK line [, ...]] +DESCRIPTION: Diagnostic command to stop execution at the + specified line(s). BREAK only applies to + user-numbered lines. For multi-statement + lines, BREAK only applies to the first + statement. BREAK effectively inserts a + hidden STOP command immediately after the + line number. Once a BREAK occurrs on a + specified line, it is automatically removed. + To remove all existing BREAKs, execute BREAK + without any line numbers. +------------------------------------------------------------ + SYNTAX: BYE +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + SYNTAX: CALL subname( [parameter [, ...] ] ) +DESCRIPTION: Calls a subroutine that was defined by SUB and + END SUB. +------------------------------------------------------------ + SYNTAX: CASE constant [TO constant] +DESCRIPTION: Introduces an element of a SELECT CASE + statement. Multiple tests must be seperated + a comma. For example: CASE 1, 2 TO 3, IS > + 4, IF < 5 +------------------------------------------------------------ + SYNTAX: CASE IF operator constant +DESCRIPTION: Introduces an element of a SELECT CASE + statement. Multiple tests must be seperated + a comma. For example: CASE 1, 2 TO 3, IS > + 4, IF < 5 +------------------------------------------------------------ + SYNTAX: CASE IS operator constant +DESCRIPTION: Introduces an element of a SELECT CASE + statement. Multiple tests must be seperated + a comma. For example: CASE 1, 2 TO 3, IS > + 4, IF < 5 +------------------------------------------------------------ + SYNTAX: CASE ELSE +DESCRIPTION: Introduces a default SELECT CASE element. +------------------------------------------------------------ + SYNTAX: CHAIN filename$ [, linenumber] +DESCRIPTION: Load and execute another BASIC program, + without clearing common variables. For + System/370, the syntax is CHAIN + filename$,parameter$. +------------------------------------------------------------ + SYNTAX: CHANGE A$ TO X +DESCRIPTION: Changes a string to a numeric array. +------------------------------------------------------------ + SYNTAX: CHANGE X TO A$ +DESCRIPTION: Changes a numeric array to a string. +------------------------------------------------------------ + SYNTAX: CLEAR +DESCRIPTION: Sets all numeric variables to 0, and all + string variables to empty strings. +------------------------------------------------------------ + SYNTAX: CLOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: CLOAD* arrayname +DESCRIPTION: Loads a numeric array from a file saved using + CSAVE*. +------------------------------------------------------------ + SYNTAX: CMDS +DESCRIPTION: Prints a list of all implemented BASIC + commands. +------------------------------------------------------------ + SYNTAX: COMMON variable [, ...] +DESCRIPTION: Designates variables to be passed to a CHAINed + program. +------------------------------------------------------------ + SYNTAX: CONST variable [, ...] = value +DESCRIPTION: Assigns the value to variable. Any later + assignment to the variable causus a VARIABLE + NOT DECLARED error. +------------------------------------------------------------ + SYNTAX: CONT +DESCRIPTION: Continue a BASIC program after a STOP has been + executed. Program resumes at the line after + the STOP. +------------------------------------------------------------ + SYNTAX: CSAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: CSAVE* ArrayName +DESCRIPTION: Saves a numeric array into a file for later + loading by CLOAD*. +------------------------------------------------------------ + SYNTAX: DATA constant [, ...] +DESCRIPTION: Stores numeric and string constants to be + accessed by READ. +------------------------------------------------------------ + SYNTAX: DEF FNname[( arg [,...] )] = value +DESCRIPTION: Defines a single-line function. Single-line + functions require an equal sign. +------------------------------------------------------------ + SYNTAX: DEF FNname[( arg [,...] )] +DESCRIPTION: Defines a multiline function. Multi-line DEF + functions do not have an equal sign and must + end with FNEND. +------------------------------------------------------------ + SYNTAX: DEFBYT letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFCUR letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFDBL letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFINT letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFLNG letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFSNG letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFSTR letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + string variables. +------------------------------------------------------------ + 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. Deleting + a non-existing line does not cause an error. +------------------------------------------------------------ + SYNTAX: DIM [# filenum,] variable([ lower TO ] upper) +DESCRIPTION: Declares variables and specifies the + dimensions of array variables. For array + variables, if the lower bound is not + provided, then the OPTION BASE value is used. + If filenum is provided, then the variable is + virtual. +------------------------------------------------------------ + SYNTAX: DO UNTIL value +DESCRIPTION: Top of a DO - LOOP structure. Exits when + value is non-zero. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: DO WHILE value +DESCRIPTION: Top of a DO - LOOP structure. Exits when + value is zero. +------------------------------------------------------------ + SYNTAX: DSP variable [, ...]] +DESCRIPTION: Diagnostic command to display the value every + time the variable is assigned. To remove all + existing DSPs, execute DSP without any + variables. +------------------------------------------------------------ + SYNTAX: EDIT +DESCRIPTION: implementation defined. +------------------------------------------------------------ + SYNTAX: ELSE +DESCRIPTION: Introduces a default condition in a multi-line + IF statement. +------------------------------------------------------------ + SYNTAX: ELSEIF +DESCRIPTION: Introduces a secondary condition in a + multi-line IF statement. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: END FUNCTION +DESCRIPTION: Specifies the last line of a multi-line + FUNCTION definition. +------------------------------------------------------------ + SYNTAX: END IF +DESCRIPTION: Specifies the last line of a multi-line IF + definition. +------------------------------------------------------------ + SYNTAX: END SELECT +DESCRIPTION: Specifies the last line of a multi-line SELECT + CASE definition. +------------------------------------------------------------ + SYNTAX: END SUB +DESCRIPTION: Specifies the last line of a multi-line SUB + definition. +------------------------------------------------------------ + SYNTAX: ERASE variable [, ...] +DESCRIPTION: Eliminates arrayed variables from a program. +------------------------------------------------------------ + SYNTAX: EXCHANGE variable, variable +DESCRIPTION: Swaps the values of two variables. Both + variables must be of the same type. +------------------------------------------------------------ + SYNTAX: EXIT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: EXIT DO +DESCRIPTION: Immediately exits the inner-most DO-LOOP + strucure. +------------------------------------------------------------ + SYNTAX: EXIT FOR +DESCRIPTION: Immediately exits the inner-most FOR-NEXT + strucure. +------------------------------------------------------------ + SYNTAX: EXIT FUNCTION +DESCRIPTION: Immediately exits the inner-most multi-line + FUNCTION strucure. +------------------------------------------------------------ + SYNTAX: EXIT REPEAT +DESCRIPTION: Exit a REPEAT - UNTIL structure. +------------------------------------------------------------ + SYNTAX: EXIT SUB +DESCRIPTION: Immediately exits the inner-most multi-line + SUB strucure. +------------------------------------------------------------ + SYNTAX: EXIT WHILE +DESCRIPTION: Immediately exits the inner-most WHILE-END + strucure. +------------------------------------------------------------ + SYNTAX: FIELD [#] filenum, number AS variable$ [, ...] +DESCRIPTION: Assigns number bytes in the buffer of random + file filenum to the variable variable$. GET + will automatically update the variable, and + PUT will automatically use the variable. +------------------------------------------------------------ + SYNTAX: FNCS +DESCRIPTION: Prints a list of all pre-defined BASIC + functions. +------------------------------------------------------------ + SYNTAX: FNEND +DESCRIPTION: Specifies the last line of a multi-line DEF + function. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: GO +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: GO SUB 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. +------------------------------------------------------------ + SYNTAX: GO TO line +DESCRIPTION: Branches program execution to the specified + line. The line may be a number or a label. +------------------------------------------------------------ + SYNTAX: GOODBYE +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: GOTO line +DESCRIPTION: Branches program execution to the specified + line. The line may be a number or a label. +------------------------------------------------------------ + SYNTAX: HELP name +DESCRIPTION: Provides help on the specified name which is a + command name or function name. +------------------------------------------------------------ + SYNTAX: IF value THEN line1 [ELSE line2] +DESCRIPTION: Single line standard IF command. If the value + is non-zero, then branh to line1. If the + value is zero and ELSE is provided, then + branch to line2. Otherwise continue to the + next line. LABELS are not allowed. +------------------------------------------------------------ + SYNTAX: IF value THEN +DESCRIPTION: Top of a multi-line IF - END IF structure. If + the value 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. +------------------------------------------------------------ + SYNTAX: INPUT "prompt string" , variable [, ...] +DESCRIPTION: Reads input from the terminal after displaying + a prompt. +------------------------------------------------------------ + SYNTAX: INPUT # filenum , variable [, ...]s +DESCRIPTION: Reads input from the file specified by + filenum. +------------------------------------------------------------ + SYNTAX: INPUT variable [, ...] +DESCRIPTION: Reads input from the terminal. +------------------------------------------------------------ + SYNTAX: INPUT LINE variable$ +DESCRIPTION: Reads entire line from the terminal into + variable$. +------------------------------------------------------------ + SYNTAX: INPUT LINE # filenum , variable$ +DESCRIPTION: Reads entire line from a file into variable$. +------------------------------------------------------------ + SYNTAX: INPUT LINE "prompt string" , variable$ +DESCRIPTION: Reads entire line from the terminal into + variable$ after displaying a prompt +------------------------------------------------------------ + SYNTAX: [LET] variable [, ...] = value +DESCRIPTION: Assigns the value to the variable. The LET + keyword is optional. +------------------------------------------------------------ + SYNTAX: LINE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: LINE INPUT [[#] filenum,]["prompt string";] + variable$ +DESCRIPTION: Reads entire line from the keyboard or a file + into variable$. +------------------------------------------------------------ + SYNTAX: LIST line1 [- line2] +DESCRIPTION: Lists BASIC program lines from line1 to line2 + to the console on stdout. +------------------------------------------------------------ + SYNTAX: LISTNH line1 [- line2] +DESCRIPTION: Lists BASIC program lines from line1 to line2 + to the console on stdout. +------------------------------------------------------------ + SYNTAX: LLIST line1 [- line2] +DESCRIPTION: Lists BASIC program lines from line1 to line2 + to the printer on stderr. +------------------------------------------------------------ + SYNTAX: LOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: LOOP UNTIL value +DESCRIPTION: Bottom of a DO - LOOP structure. Exits when + value is nonz-zero. +------------------------------------------------------------ + SYNTAX: LOOP WHILE value +DESCRIPTION: Bottom of a DO - LOOP structure. Exits when + value is zero. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: LPRINT [USING format-string$;] value ... +DESCRIPTION: Send output to the printer (stderr). +------------------------------------------------------------ + SYNTAX: LSET variable$ = value +DESCRIPTION: Left-aligns the value into 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. +------------------------------------------------------------ + SYNTAX: MAINTAINER +DESCRIPTION: This command is reserved for use by the + Bywater BASIC maintainer. It is not for the + BASIC programmer. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS HTML +DESCRIPTION: Dump COMMAND vs VERSION as HTML table +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS ID +DESCRIPTION: Dump COMMAND #define. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS MANUAL +DESCRIPTION: Dump COMMAND manual. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS_SWITCH +DESCRIPTION: Dump COMMAND switch. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS TABLE +DESCRIPTION: Dump COMMAND table. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG OFF +DESCRIPTION: Disable degug tracing. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG ON +DESCRIPTION: Enable degug tracing. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS HTML +DESCRIPTION: Dump FUNCTION vs VERSION as HTML table. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS ID +DESCRIPTION: Dump FUNCTION #define. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS MANUAL +DESCRIPTION: Dump FUNCTION manual. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS SWITCH +DESCRIPTION: Dump FUNCTION switch. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS TABLE +DESCRIPTION: Dump FUNCTION table. +------------------------------------------------------------ + SYNTAX: MAINTAINER MANUAL +DESCRIPTION: Dump manual for the currently selected OPTION + VERSION. +------------------------------------------------------------ + SYNTAX: MAINTAINER STACK +DESCRIPTION: Dump the BASIC stack. +------------------------------------------------------------ + SYNTAX: MARGIN # filenumber, width +DESCRIPTION: Sets the file margin for writing; filenumber + <= 0 is ignored. +------------------------------------------------------------ + SYNTAX: MERGE filename$ +DESCRIPTION: Merges the BASIC program in filename$ into the + current BASIC program. Lines in filename$ + replace any matching lines in the current + program. +------------------------------------------------------------ + SYNTAX: MID$( variable$, start [, count ] ) = value +DESCRIPTION: Replaces a subtring of variable$ with value. +------------------------------------------------------------ + SYNTAX: NAME old$ AS new$ +DESCRIPTION: Changes the name of an existing file. +------------------------------------------------------------ + SYNTAX: NEW +DESCRIPTION: Deletes the program in memory and clears all + variables. +------------------------------------------------------------ + SYNTAX: NEXT [variable] +DESCRIPTION: The bottom line of a FOR - NEXT structure. +------------------------------------------------------------ + SYNTAX: OF +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON value GOSUB line [, ...] +DESCRIPTION: Calls based on the rounded value. +------------------------------------------------------------ + SYNTAX: ON value GOTO line [, ...] +DESCRIPTION: Branches based on the rounded value. +------------------------------------------------------------ + SYNTAX: ON ERROR +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON ERROR GOSUB errline +DESCRIPTION: When a trappable error occurs, execute GOSUB + errline. The error handler must terminate + with a RETURN command. If the line number is + 0 (zerp), then use the default error handler. + Valid when OPTION ERROR GOSUB. +------------------------------------------------------------ + SYNTAX: ON ERROR GOTO errline +DESCRIPTION: When a trappable error occurs, execute GOTO + errline. The error handler must terminate + with a RESUME command. If the line number is + 0 (zerp), then use the default error handler. + Valid when OPTION ERROR GOTO. +------------------------------------------------------------ + SYNTAX: ON ERROR RESUME +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON ERROR RESUME NEXT +DESCRIPTION: When a trappable error occurs, execution + continues with the next line. Valid when + OPTION ERROR GOTO. +------------------------------------------------------------ + SYNTAX: ON ERROR RETURN +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON ERROR RETURN NEXT +DESCRIPTION: When a trappable error occurs, execution + continues with the next line. Valid when + OPTION ERROR GOSUB. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: OPEN filename$ + FOR INPUT|OUTPUT|APPEND|BINARY|RANDOM|VIRTUAL + AS [#] fileenumber + [LEN [=] record-length] +DESCRIPTION: Opens a file for use. + RANDOM requires LEN. +------------------------------------------------------------ + SYNTAX: OPTION +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE DEGREES +DESCRIPTION: Configures these math functions to accept and + return angles in degrees: ACOS, ACS, ANGLE, + ARCSIN, ASIN, ASN, ARCTAN, ATN, ATAN, COS, + COT, CSC, SEC, SIN and TAN. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE GRADIANS +DESCRIPTION: Configures these math functions to accept and + return angles in gradians: ACOS, ANGLE, + ASIN, ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN + and TAN. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE RADIANS +DESCRIPTION: Configures these math functions to accept and + return angles in radians: ACOS, ANGLE, ASIN, + ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN and + TAN. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC DECIMAL +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC FIXED +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC NATIVE +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION BASE integer +DESCRIPTION: Sets the default lowest array subscript. +------------------------------------------------------------ + SYNTAX: OPTION BUGS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION BUGS BOOLEAN +DESCRIPTION: Boolean results are 1 or 0 instead of bitwise. +------------------------------------------------------------ + SYNTAX: OPTION BUGS OFF +DESCRIPTION: Disables bugs commonly found in many BASIC + dialects. +------------------------------------------------------------ + SYNTAX: OPTION BUGS ON +DESCRIPTION: Enables bugs commonly found in many BASIC + dialects. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE BINARY +DESCRIPTION: Causes string comparisons to be + case-sensitive. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE DATABASE +DESCRIPTION: Causes string comparisons to be + case-insensitive. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE TEXT +DESCRIPTION: Causes string comparisons to be + case-insensitive. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE OFF +DESCRIPTION: Disables BASIC code coverage recording, + displayed using the LIST command. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE ON +DESCRIPTION: Enables BASIC code coverage recording, + displayed using the LIST command. +------------------------------------------------------------ + SYNTAX: OPTION DATE format$ +DESCRIPTION: Sets the date format string used by C + strftime() for DATE$. +------------------------------------------------------------ + SYNTAX: OPTION DIGITS integer +DESCRIPTION: Sets the number of significant digits for + PRINT. Setting the value to zero restores + the default. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE COMMAND name$ +DESCRIPTION: Disables the specified BASIC command. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE FUNCTION name$ +DESCRIPTION: Disables the specified BASIC function. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE OPERATOR name$ +DESCRIPTION: Disables the specified BASIC operator. +------------------------------------------------------------ + SYNTAX: OPTION EDIT string$ +DESCRIPTION: Sets the program name used by the EDIT + command. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE COMMAND name$ +DESCRIPTION: Enables the specified BASIC command. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE FUNCTION name$ +DESCRIPTION: Enables the specified BASIC function. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE OPERATOR name$ +DESCRIPTION: Enables the specified BASIC operator. +------------------------------------------------------------ + SYNTAX: OPTION ERROR +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ERROR GOSUB +DESCRIPTION: When an error occurs, GOSUB to the error + handler. The error handler exits with + RETURN. +------------------------------------------------------------ + SYNTAX: OPTION ERROR GOTO +DESCRIPTION: When an error occurs, GOTO to the error + handler. The error handler exits with + RESUME. +------------------------------------------------------------ + SYNTAX: OPTION EXPLICIT +DESCRIPTION: All variables must be declared using DIM. +------------------------------------------------------------ + SYNTAX: OPTION EXTENSION string$ +DESCRIPTION: Sets the BASIC filename extension, commonly + ".bas". +------------------------------------------------------------ + SYNTAX: OPTION FILES string$ +DESCRIPTION: Sets the program name used by the FILES + command. +------------------------------------------------------------ + SYNTAX: OPTION IMPLICIT +DESCRIPTION: Variables need not be declared using DIM, + provided arrays have no more that 10 + elements. This is the opposite of OPTION + EXPLICIT, and is the default for all versions + of BASIC. +------------------------------------------------------------ + SYNTAX: OPTION INDENT integer +DESCRIPTION: Sets indention level for LIST. Zero means no + indention. Default is 2. +------------------------------------------------------------ + SYNTAX: OPTION LABELS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION LABELS OFF +DESCRIPTION: Disables text labels. +------------------------------------------------------------ + SYNTAX: OPTION LABELS ON +DESCRIPTION: Enables text labels. +------------------------------------------------------------ + SYNTAX: OPTION PROMPT string$ +DESCRIPTION: Sets the BASIC prompt. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT AT char$ +DESCRIPTION: Sets the PRINT AT character, commonly "@". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT BYTE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type BYTE, commonly "~". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT COMMENT char$ +DESCRIPTION: Sets the shortcut COMMENT character. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT CURRENCY char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type CURRENCY, commonly "@". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT DOUBLE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type DOUBLE, commonly "#". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT FILENUM char$ +DESCRIPTION: Sets the FILE NUMBER prefix character, + commonly "#". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT IMAGE char$ +DESCRIPTION: Sets the shortcut IMAGE character, commonly + ":". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT INPUT char$ +DESCRIPTION: Sets the shortcut INPUT character, commonly + "!". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT INTEGER char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type INTEGER, commonly "%". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT LONG char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type LONG, commonly "&". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT LPAREN char$ +DESCRIPTION: Sets the LEFT PARENTHESIS character, commonly + "(". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT_PRINT char$ +DESCRIPTION: Sets the shortcut PRINT character, commonly + "?". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT QUOTE char$ +DESCRIPTION: Sets the QUOTE character, commonly """ +------------------------------------------------------------ + SYNTAX: OPTION PUNCT RPAREN char$ +DESCRIPTION: Sets the RIGHT PARENTHESIS character, commonly + ")". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT SINGLE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type SINGLE, commonly "!". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT STATEMENT char$ +DESCRIPTION: Sets the statement seperator character, + commonly ":". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT STRING char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type STRING, commonly "$". +------------------------------------------------------------ + SYNTAX: OPTION RECLEN integer +DESCRIPTION: Sets the default RANDOM record length. +------------------------------------------------------------ + SYNTAX: OPTION RENUM string$ +DESCRIPTION: Sets the program name used by the RENUM + command. +------------------------------------------------------------ + SYNTAX: OPTION ROUND +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ROUND BANK +DESCRIPTION: Round using the Banker rule. +------------------------------------------------------------ + SYNTAX: OPTION ROUND MATH +DESCRIPTION: Round using mathematical rules. +------------------------------------------------------------ + SYNTAX: OPTION ROUND TRUNCATE +DESCRIPTION: Round using truncation. +------------------------------------------------------------ + SYNTAX: OPTION SCALE integer +DESCRIPTION: Sets the number of digits to round after the + decimal point for PRINT. Setting the value + to zero disables rounding. +------------------------------------------------------------ + SYNTAX: OPTION SLEEP double +DESCRIPTION: Sets multiplier for SLEEP and WAIT. Zero + means no waiting. Default is 1. +------------------------------------------------------------ + SYNTAX: OPTION STDERR filename$ +DESCRIPTION: Sets the file used for STDERR, which is used + by LPRINT commands. +------------------------------------------------------------ + SYNTAX: OPTION STDIN filename$ +DESCRIPTION: Sets the file used for STDIN, which is used by + INPUT commands. +------------------------------------------------------------ + SYNTAX: OPTION STDOUT filename$ +DESCRIPTION: Sets the file used for STDOUT, which is used + by PRINT commands. +------------------------------------------------------------ + SYNTAX: OPTION STRICT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION STRICT OFF +DESCRIPTION: Disables checking for implicit array creation + without using the DIM command. +------------------------------------------------------------ + SYNTAX: OPTION STRICT ON +DESCRIPTION: Enables checking for implicit array creation + without using the DIM command. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL ADM +DESCRIPTION: Enables ADM-3A terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL ANSI +DESCRIPTION: Enables ANSI terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL NONE +DESCRIPTION: Disables terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TIME format$ +DESCRIPTION: Sets the time format string used by C + strftime() for TIME$. +------------------------------------------------------------ + SYNTAX: OPTION TRACE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION TRACE OFF +DESCRIPTION: Disables displaying a stack trace when an + ERROR occurs. +------------------------------------------------------------ + SYNTAX: OPTION TRACE ON +DESCRIPTION: Enables displaying a stack trace when an ERROR + occurs. +------------------------------------------------------------ + SYNTAX: OPTION USING +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION USING ALL char$ +DESCRIPTION: Specifies the magic ALL character for the + PRINT USING command. A common value is "&". +------------------------------------------------------------ + SYNTAX: OPTION USING COMMA char$ +DESCRIPTION: Specifies the magic COMMA character for the + PRINT USING command. A common value is ",". +------------------------------------------------------------ + SYNTAX: OPTION USING DIGIT char$ +DESCRIPTION: Specifies the magic DIGIT character for the + PRINT USING command. A common value is "#". +------------------------------------------------------------ + SYNTAX: OPTION USING DOLLAR char$ +DESCRIPTION: Specifies the magic DOLLAR character for the + PRINT USING command. A common value is "$". +------------------------------------------------------------ + SYNTAX: OPTION USING EXRAD char$ +DESCRIPTION: Specifies the magic EXRAD character for the + PRINT USING command. A common value is "^". +------------------------------------------------------------ + SYNTAX: OPTION USING FILLER char$ +DESCRIPTION: Specifies the magic FILLER character for the + PRINT USING command. A common value is "*". +------------------------------------------------------------ + SYNTAX: OPTION USING FIRST char$ +DESCRIPTION: Specifies the magic FIRST character for the + PRINT USING command. A common value is "!". +------------------------------------------------------------ + SYNTAX: OPTION USING LENGTH char$ +DESCRIPTION: Specifies the magic LENGTH character for the + PRINT USING command. A common value is "\". +------------------------------------------------------------ + SYNTAX: OPTION USING LITERAL char$ +DESCRIPTION: Specifies the magic LITERAL character for the + PRINT USING command. A common value is "_". +------------------------------------------------------------ + SYNTAX: OPTION USING MINUS char$ +DESCRIPTION: Specifies the magic MINUS character for the + PRINT USING command. A common value is "-". +------------------------------------------------------------ + SYNTAX: OPTION USING PERIOD char$ +DESCRIPTION: Specifies the magic PERIOD character for the + PRINT USING command. A common value is ".". +------------------------------------------------------------ + SYNTAX: OPTION USING PLUS char$ +DESCRIPTION: Specifies the magic PLUS character for the + PRINT USING command. A common value is "+". +------------------------------------------------------------ + SYNTAX: OPTION VERSION version$ +DESCRIPTION: Selects a specific BASIC version, which is a + combination of OPTION settings, commands, + functions and operators. If no version is + specified, displays a list of the available + versions. +------------------------------------------------------------ + SYNTAX: OPTION ZONE integer +DESCRIPTION: Sets the PRINT zone width. Setting the value + to zero restores the default. +------------------------------------------------------------ + SYNTAX: POP +DESCRIPTION: Pops one GOSUB from the return stack. +------------------------------------------------------------ + SYNTAX: PRINT # filenum , [USING format$;] value ... +DESCRIPTION: Sends output to a file. +------------------------------------------------------------ + SYNTAX: PRINT [USING format$;] value ... +DESCRIPTION: Sends output to the screen. +------------------------------------------------------------ + SYNTAX: QUIT +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + SYNTAX: READ variable [, ...] +DESCRIPTION: Reads values from DATA statements. +------------------------------------------------------------ + SYNTAX: RECALL ArrayName +DESCRIPTION: Loads a numeric array from a file saved using + STORE. +------------------------------------------------------------ + SYNTAX: REM ... +DESCRIPTION: Remark. +------------------------------------------------------------ + SYNTAX: RENUM +DESCRIPTION: Implementation defined. +------------------------------------------------------------ + SYNTAX: REPEAT +DESCRIPTION: Top of a REPEAT - UNTIL structure. +------------------------------------------------------------ + SYNTAX: RESTORE [line] +DESCRIPTION: Resets the line used for the next READ + statement. line may be either a number or a + label. +------------------------------------------------------------ + SYNTAX: RESUME +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to ERL. +------------------------------------------------------------ + SYNTAX: RESUME line +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to the specified + line. +------------------------------------------------------------ + SYNTAX: RESUME NEXT +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to the line after + ERL. +------------------------------------------------------------ + SYNTAX: RESUME 0 +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to ERL. +------------------------------------------------------------ + SYNTAX: RETURN +DESCRIPTION: Concludes a subroutine called by GOSUB. +------------------------------------------------------------ + SYNTAX: RSET variable$ = value +DESCRIPTION: Right-aligns the value into 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. +------------------------------------------------------------ + SYNTAX: RUN filename$ +DESCRIPTION: Loads a new BAASIC program and executes the + program from the start. +------------------------------------------------------------ + SYNTAX: RUN line +DESCRIPTION: Executes the program in memory beginning at + line. +------------------------------------------------------------ + SYNTAX: RUN +DESCRIPTION: Executes the program in memory from the start. +------------------------------------------------------------ + SYNTAX: RUNNH line +DESCRIPTION: Executes the program in memory beginning at + line. +------------------------------------------------------------ + SYNTAX: RUNNH filename$ +DESCRIPTION: Loads a new BAASIC program and executes the + program from the start. +------------------------------------------------------------ + SYNTAX: RUNNH +DESCRIPTION: Executes the program in memory from the start. +------------------------------------------------------------ + SYNTAX: SAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: SELECT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: SELECT CASE value +DESCRIPTION: Introduces a multi-line conditional selection + statement. +------------------------------------------------------------ + SYNTAX: STEP +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: STORE ArrayName +DESCRIPTION: Saves a numeric array into a file for later + loading by RECALL. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: SUBEND +DESCRIPTION: Specifies the last line of a multi-line SUB + definition. Same as END SUB. +------------------------------------------------------------ + SYNTAX: SWAP variable, variable +DESCRIPTION: Swaps the values of two variables. Both + variables must be of the same type. +------------------------------------------------------------ + SYNTAX: SYSTEM +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + SYNTAX: THEN +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: TIMER +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: TIMER OFF +DESCRIPTION: TIMER OFF terminates the timer interrupt. +------------------------------------------------------------ + SYNTAX: TIMER ON +DESCRIPTION: TIMER ON enables the timer 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. +------------------------------------------------------------ + SYNTAX: TIMER STOP +DESCRIPTION: TIMER STOP disables the interrupt, but the + count continues. +------------------------------------------------------------ + SYNTAX: TLOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: TO +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: TSAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: UNTIL value +DESCRIPTION: Bottom of a REPEAT - UNTIL. If the value is + non-zero, then the loop is terminated. +------------------------------------------------------------ + SYNTAX: VARS +DESCRIPTION: Prints a list of all global variables. +------------------------------------------------------------ + SYNTAX: WEND +DESCRIPTION: Bottom of a WHILE - WEND structure. +------------------------------------------------------------ + SYNTAX: WHILE value +DESCRIPTION: Top of a WHILE - WEND structure. If the value + is non-zero, then the loop is terminated. +------------------------------------------------------------ + SYNTAX: WRITE # filenum, value [, .... ] +DESCRIPTION: Outputs value to a file. Strings are quoted + and each value is seperated by a omma. +------------------------------------------------------------ + SYNTAX: WRITE value [, .... ] +DESCRIPTION: Outputs value to the screen. Strings are + quoted and each value is seperated by a + comma. +------------------------------------------------------------ + + +============================================================ + FUNCTIONS +============================================================ + + +------------------------------------------------------------ + SYNTAX: N = ABS( X ) + PARAMETER: X is a number +DESCRIPTION: The absolute value of X. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = ACS( X ) + PARAMETER: X is a number +DESCRIPTION: The arccosine of X in radians, where 0 <= + ACS(X) <= PI. X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ACSD( X ) + PARAMETER: X is a number +DESCRIPTION: The arccosine of X in degrees, where 0 <= + ACSD(X) <= 180. X shall be in the range -1 + <= X <= 1. +------------------------------------------------------------ + SYNTAX: N = ACSG( X ) + PARAMETER: X is a number +DESCRIPTION: The arccosine of X in gradians, where 0 <= + ACS(X) <= 200. X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = ARCSIN( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in radians, where -PI/2 <= + ARCSIN(X) <= PI/2; X shall be in the range -1 + <= X <= 1. +------------------------------------------------------------ + SYNTAX: N = ARCTAN( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in radians, i.e. the angle + whose tangent is X, where -PI/2 < ARCTAN(X) < + PI/2. +------------------------------------------------------------ + SYNTAX: N = ARGC +DESCRIPTION: The number of parameters passed to a FUNCTION + or SUB. If not in a FUNCTION or SUB, returns + -1. +------------------------------------------------------------ + SYNTAX: S$ = ARGT$( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The type of the Xth parameter to a FUNCTION or + SUB. If the Xth parameter is a string, then + return value is "$". If the Xth parameter is + a number, then return value is not "$". X in + [1,ARGC]. +------------------------------------------------------------ + SYNTAX: N = ARGV( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The numeric value of the Xth parameter to a + FUNCTION or SUB. X in [1,ARGC] and ARGT$( X + ) <> "$". +------------------------------------------------------------ + SYNTAX: S$ = ARGV$( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The string value of the Xth parameter to a + FUNCTION or SUB. X in [1,ARGC] and ARGT$( X + ) = "$". +------------------------------------------------------------ + SYNTAX: N = ASC( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The numeric code for the first letter in A$. + For example, ASC("ABC") returns 65 on ASCII + systems. +------------------------------------------------------------ + SYNTAX: N = ASC( A$, X ) + PARAMETER: A$ is a string, LEN >= 1 + PARAMETER: X is a number, [1,MAXLEN] +DESCRIPTION: The numeric code of the Xth character in A$. + Same as ASC(MID$(A$,X)). +------------------------------------------------------------ + SYNTAX: N = ASCII( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The numeric code for the first letter in A$. + For example, ASCII("ABC") returns 65 on ASCII + systems. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = ASN( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in radians, where -PI/2 <= + ASN(X) <= PI/2; X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ASND( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in degrees, where -90 <= + ASN(X) <= 90; X shall be in the range -1 <= X + <= 1. +------------------------------------------------------------ + SYNTAX: N = ASNG( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in gradians, where -100 <= + ASNG(X) <= 100; X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ATAN( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in radians, i.e. the angle + whose tangent is X, where -PI/2 < ATAN(X) < + PI/2. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = ATND( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in degrees, i.e. the angle + whose tangent is X, where -90 < ATND(X) < 90. +------------------------------------------------------------ + SYNTAX: N = ATNG( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in gradians, i.e. the + angle whose tangent is X, where -100 < + ATND(X) < 100. +------------------------------------------------------------ + SYNTAX: N = BASE +DESCRIPTION: The current OPTION BASE setting. +------------------------------------------------------------ + SYNTAX: N = CCUR( X ) + PARAMETER: X is a number, [MINCUR,MAXCUR] +DESCRIPTION: The currency (64-bit) integer value of X. +------------------------------------------------------------ + SYNTAX: N = CDBL( X ) + PARAMETER: X is a number, [MINDBL,MAXDBL] +DESCRIPTION: The double-precision value of X. +------------------------------------------------------------ + SYNTAX: N = CEIL( X ) + PARAMETER: X is a number +DESCRIPTION: The smallest integer not less than X. +------------------------------------------------------------ + SYNTAX: S$ = CHAR( X, Y ) + PARAMETER: X is a number, [0,255] + PARAMETER: Y is a number, [0,MAXLEN] +DESCRIPTION: The string Y bytes long consisting of CHR$(X). + Same as STRING$(Y,X). +------------------------------------------------------------ + SYNTAX: S$ = CHAR$( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHAR$(65) returns "A". +------------------------------------------------------------ + SYNTAX: N = CHDIR( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: Changes to the directory named to A$. +------------------------------------------------------------ + SYNTAX: S$ = CHR( X ) + PARAMETER: X is a number +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHR(65) returns "A". +------------------------------------------------------------ + SYNTAX: S$ = CHR$( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHR$(65) returns "A". +------------------------------------------------------------ + SYNTAX: N = CINT( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The short (16-bit) integer value of X. +------------------------------------------------------------ + SYNTAX: N = CLG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: S$ = CLK( X ) + PARAMETER: X is a number +DESCRIPTION: The time of day in 24-hour notation according + to ISO 3307. For example, the value of CLK + at 11:15 AM is "11:15:00". If there is no + clock available, then the value of CLK shall + be "99:99:99". The value of TIME$ at + midnight is "00:00:00". The value of + parameter X is ignored. +------------------------------------------------------------ + SYNTAX: S$ = CLK$ +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". +------------------------------------------------------------ + SYNTAX: N = CLNG( X ) + PARAMETER: X is a number, [MINLNG,MAXLNG] +DESCRIPTION: The long (32-bit) integer value of X. +------------------------------------------------------------ + SYNTAX: N = CLOG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = CLOSE +DESCRIPTION: Close all open files. +------------------------------------------------------------ + SYNTAX: N = CLOSE( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: Close file number X. +------------------------------------------------------------ + SYNTAX: N = CLS +DESCRIPTION: Clears the screen. Cursor is positioned at row + 1, column 1. +------------------------------------------------------------ + SYNTAX: N = CODE( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The numeric code for the first letter in A$. + For example, CODE("ABC") returns 65 on ASCII + systems. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = COMMAND$( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The command line parameters. COMMAND$(0) is + the BASIC program name. COMMAND$(1) is the + first parameter after the BASIC program name, + and so on. Support for parameters varies by + operating system, compiler, and so on. X in + [0..9] +------------------------------------------------------------ + SYNTAX: N = COS( X ) + PARAMETER: X is a number +DESCRIPTION: The cosine of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = COSD( X ) + PARAMETER: X is a number +DESCRIPTION: The cosine of X, where X is in degrees. +------------------------------------------------------------ + SYNTAX: N = COSG( X ) + PARAMETER: X is a number +DESCRIPTION: The cosine of X, where X is in gradians. +------------------------------------------------------------ + SYNTAX: N = COSH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic cosine of X. +------------------------------------------------------------ + SYNTAX: N = COT( X ) + PARAMETER: X is a number +DESCRIPTION: The cotangent of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = COUNT +DESCRIPTION: The current cursor position in the line. +------------------------------------------------------------ + SYNTAX: N = CSC( X ) + PARAMETER: X is a number +DESCRIPTION: The cosecant of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = CSH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic cosine of X. +------------------------------------------------------------ + SYNTAX: N = CSNG( X ) + PARAMETER: X is a number, [MINFLT,MAXFLT] +DESCRIPTION: The single-precision value of X. +------------------------------------------------------------ + SYNTAX: S$ = CUR( 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. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: N = CVD( A$ ) + PARAMETER: A$ is a string, LEN >= sizeof(DBL) +DESCRIPTION: The double-precision value in A$, which was + created by MKD$. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: N = CVS( A$ ) + PARAMETER: A$ is a string, LEN >= sizeof(FLT) +DESCRIPTION: The single-precision value in A$, which was + created by MKS$. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = DATE$ +DESCRIPTION: The current date based on the internal clock + as a string in the format set by OPTION DATE. +------------------------------------------------------------ + SYNTAX: N = DEG +DESCRIPTION: Configures the math functions to accept and + return angles in degrees. +------------------------------------------------------------ + SYNTAX: N = DEG( X ) + PARAMETER: X is a number +DESCRIPTION: The number of degrees in X radians. +------------------------------------------------------------ + SYNTAX: N = DEGREE +DESCRIPTION: Configures the math functions to accept and + return angles in degrees. +------------------------------------------------------------ + SYNTAX: N = DEGREE( X ) + PARAMETER: X is a number +DESCRIPTION: The number of degrees in X radians. +------------------------------------------------------------ + SYNTAX: N = DET +DESCRIPTION: The determinant of the last MAT INV. Zero + means error. +------------------------------------------------------------ + SYNTAX: N = DIM( ... ) +DESCRIPTION: DIM( arrayname ). The total number of + dimensions of the array. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = ENVIRON$( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The value of the environment variable named + A$. +------------------------------------------------------------ + SYNTAX: N = EOF( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: If device number X is at the end-of-file, then + -1, otherwise 0. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + SYNTAX: N = ERL +DESCRIPTION: The line number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERR +DESCRIPTION: The error number of the most recent error. +------------------------------------------------------------ + SYNTAX: S$ = ERR$ +DESCRIPTION: The last error message. +------------------------------------------------------------ + SYNTAX: N = ERRL +DESCRIPTION: The line number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERRN +DESCRIPTION: The error number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERROR( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: Simulate the error number in X. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: S$ = ERROR$ +DESCRIPTION: The last error message. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = FILEATTR( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [MININT,MAXINT] +DESCRIPTION: For file X, if Y = 1 then returns open mode, + otherwise returns zero. +------------------------------------------------------------ + SYNTAX: N = FILES +DESCRIPTION: Displays all the file names. +------------------------------------------------------------ + SYNTAX: N = FILES( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: Displays all the file names matching A$. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = FLOW +DESCRIPTION: Turn tracing ON +------------------------------------------------------------ + SYNTAX: N = FP( X ) + PARAMETER: X is a number +DESCRIPTION: The fractional part of X, i.e. X - IP(X). +------------------------------------------------------------ + SYNTAX: N = FRAC( X ) + PARAMETER: X is a number +DESCRIPTION: The fractional part of X, i.e. X - IP(X). +------------------------------------------------------------ + SYNTAX: N = FRE +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. +------------------------------------------------------------ + 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 only and it always returns a + fixed value of 32000.The value of A$ is + ignored. +------------------------------------------------------------ + SYNTAX: N = FRE( X ) + PARAMETER: X is a number +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. The value of X is + ignored. +------------------------------------------------------------ + SYNTAX: N = FREEFILE +DESCRIPTION: The next available file number. +------------------------------------------------------------ + SYNTAX: N = GET( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: For file X, gets the next available record. +------------------------------------------------------------ + SYNTAX: N = GET( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [MININT,MAXINT] +DESCRIPTION: For file X, gets record number Y. The first + record number is 1. +------------------------------------------------------------ + SYNTAX: N = GRAD +DESCRIPTION: Configures the math functions to accept and + return angles in gradians. +------------------------------------------------------------ + SYNTAX: N = GRADIAN +DESCRIPTION: Configures the math functions to accept and + return angles in gradians. +------------------------------------------------------------ + SYNTAX: S$ = HEX$( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The the hexadecimal (base 16) representation + of X. +------------------------------------------------------------ + SYNTAX: N = HOME +DESCRIPTION: Clears the screen. Cursor is positioned at row + 1, column 1. +------------------------------------------------------------ + SYNTAX: N = INDEX( 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. +------------------------------------------------------------ + SYNTAX: S$ = INKEY$ +DESCRIPTION: The keypress, if available. If a keypress is + not available, then immediately returns an + empty string. If not supported by the + platform, then always returns an empty + string, so use INPUT$(1) instead. +------------------------------------------------------------ + SYNTAX: N = INP( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The value read from machine port X. Causes + ERROR 73. +------------------------------------------------------------ + SYNTAX: S$ = INPUT$( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X characters, read from the + terminal. +------------------------------------------------------------ + SYNTAX: S$ = INPUT$( X, Y ) + PARAMETER: X is a number, [0,MAXLEN] + PARAMETER: Y is a number, [MININT,MAXINT] +DESCRIPTION: The string of X characters, read from file Y. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = IP( X ) + PARAMETER: X is a number +DESCRIPTION: The integer part of X, i.e., + SGN(X)*INT(ABS(X)). +------------------------------------------------------------ + SYNTAX: S$ = KEY +DESCRIPTION: The keypress, if available. If a keypress is + not available, then immediately returns an + empty string. If not supported by the + platform, then always returns an empty + string, so use INPUT$(1) instead. +------------------------------------------------------------ + SYNTAX: S$ = KEY$ +DESCRIPTION: The keypress, if available. If a keypress is + not available, then immediately returns an + empty string. If not supported by the + platform, then always returns an empty + string, so use INPUT$(1) instead. +------------------------------------------------------------ + SYNTAX: N = KILL( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: Removes the file named in A$. +------------------------------------------------------------ + SYNTAX: N = LBOUND( ... ) +DESCRIPTION: LBOUND( arrayname [, dimension] ). The lower + bound of the array. The dimension defaults + to 1. dimension in [1,DIM(arrayname)] +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = LEN( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +DESCRIPTION: The length of A$. +------------------------------------------------------------ + SYNTAX: N = LOC( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The location of file X; the next record that + GET or PUT statements will use. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = LOF( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The length of file X. +------------------------------------------------------------ + SYNTAX: N = LOG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The natural logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LOG10( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LOG2( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The base 2 logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LPOS +DESCRIPTION: The current cursor position in the line for + the printer. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = MAX( A$, B$ ) + PARAMETER: A$ is a string, LEN >= 0 + PARAMETER: B$ is a string, LEN >= 0 +DESCRIPTION: The larger of the parameters. +------------------------------------------------------------ + SYNTAX: N = MAX( X, Y ) + PARAMETER: X is a number + PARAMETER: Y is a number +DESCRIPTION: The larger of the parameters. +------------------------------------------------------------ + SYNTAX: N = MAXBYT +DESCRIPTION: The largest finite positive number + representable as a BYTE; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXCUR +DESCRIPTION: The largest finite positive number + representable as a CURRENCY; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXDBL +DESCRIPTION: The largest finite positive number + representable as a DOUBLE; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXDEV +DESCRIPTION: The largest finite positive number useable as + a FILE NUMBER; implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXINT +DESCRIPTION: The largest finite positive number + representable as an INTEGER; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXLEN +DESCRIPTION: The maximum string length. +------------------------------------------------------------ + SYNTAX: N = MAXLEN( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +DESCRIPTION: The maximum length associated with the + simple-string-variable A$. +------------------------------------------------------------ + SYNTAX: N = MAXLNG +DESCRIPTION: The largest finite positive number + representable as a LONG; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXLVL +DESCRIPTION: The maximum stack level; + implementation-defined. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + SYNTAX: N = MAXSNG +DESCRIPTION: The largest finite positive number + representable as a SINGLE; + implementation-defined. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = MIN( X, Y ) + PARAMETER: X is a number + PARAMETER: Y is a number +DESCRIPTION: The smaller of the parameters. +------------------------------------------------------------ + SYNTAX: S$ = MIN( A$, B$ ) + PARAMETER: A$ is a string, LEN >= 0 + PARAMETER: B$ is a string, LEN >= 0 +DESCRIPTION: The smaller of the parameters. +------------------------------------------------------------ + SYNTAX: N = MINBYT +DESCRIPTION: The largest finite negative number + representable as a BYTE; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MINCUR +DESCRIPTION: The largest finite negative number + representable as a CURRENCY; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MINDBL +DESCRIPTION: The largest finite negative number + representable as a DOUBLE; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MINDEV +DESCRIPTION: The largest finite negative number useable as + a FILE NUMBER; implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MININT +DESCRIPTION: The largest finite negative number + representable as an INTEGER; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MINLNG +DESCRIPTION: The largest finite negative number + representable as a LONG; + implementation-defined. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + SYNTAX: N = MINSNG +DESCRIPTION: The largest finite negative number + representable as a SINGLE; + implementation-defined. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = MKD$( X ) + PARAMETER: X is a number, [MINDBL,MAXDBL] +DESCRIPTION: The internal representation of X as a string. +------------------------------------------------------------ + SYNTAX: N = MKDIR( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: Makes the directory named in A$. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = MKS$( X ) + PARAMETER: X is a number, [MINFLT,MAXFLT] +DESCRIPTION: The internal representation of X as a string. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: N = NOFLOW +DESCRIPTION: Turn tracing OFF +------------------------------------------------------------ + SYNTAX: N = NULL( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: Appends X null characters after each line + printed by LPRINT or LLIST. +------------------------------------------------------------ + SYNTAX: N = NUM +DESCRIPTION: The number of values processed by the last MAT + INPUT. Zero means error. +------------------------------------------------------------ + SYNTAX: N = NUM( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +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, NUM( " 123.5 " ) = 123.5, NUM( + "2.E-99" ) could be zero, and NUM( "MCMXVII" + ) causes an exception. +------------------------------------------------------------ + SYNTAX: S$ = NUM$( X ) + PARAMETER: X is a number +DESCRIPTION: The string generated by the print-statement as + the numeric-representation of the value + associated with X. +------------------------------------------------------------ + SYNTAX: S$ = OCT$( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The the octal (base 8) representation of X. +------------------------------------------------------------ + SYNTAX: N = OPEN( A$, X, B$ ) + PARAMETER: A$ is a string, LEN >= 1 + PARAMETER: X is a number, [MININT,MAXINT] + 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. +------------------------------------------------------------ + SYNTAX: N = OPEN( A$, X, B$, Y ) + PARAMETER: A$ is a string, LEN >= 1 + PARAMETER: X is a number, [MININT,MAXINT] + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = PAUSE( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then PAUSE + does nothing. The resolution is + implementation defined. +------------------------------------------------------------ + SYNTAX: N = PEEK( X ) + PARAMETER: X is a number, [MINLNG,MAXLNG] +DESCRIPTION: The value read from hardware address X. + Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = PI +DESCRIPTION: The constant 3.14159 which is the ratio of the + circumference of a circle to its diameter. +------------------------------------------------------------ + SYNTAX: N = PI( X ) + PARAMETER: X is a number +DESCRIPTION: The constant 3.14159 which is the ratio of the + circumference of a circle to its diameter, + times X. +------------------------------------------------------------ + 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. Causes ERROR + 73. +------------------------------------------------------------ + SYNTAX: N = POS +DESCRIPTION: The current cursor position in the line. +------------------------------------------------------------ + SYNTAX: N = POS( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The current cursor position in the line for + file X. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = PUT( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: For file X, puts the next available record. +------------------------------------------------------------ + SYNTAX: N = PUT( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [MININT,MAXINT] +DESCRIPTION: For file X, puts record number Y. The first + record number is 1. +------------------------------------------------------------ + SYNTAX: N = RAD +DESCRIPTION: Configures the math functions to accept and + return angles in radians. +------------------------------------------------------------ + SYNTAX: N = RAD( X ) + PARAMETER: X is a number +DESCRIPTION: The number of radians in X degrees. +------------------------------------------------------------ + SYNTAX: N = RADIAN +DESCRIPTION: Configures the math functions to accept and + return angles in radians. +------------------------------------------------------------ + SYNTAX: N = RANDOMIZE +DESCRIPTION: Seeds the pseudo-random number generator with + TIME. +------------------------------------------------------------ + SYNTAX: N = RANDOMIZE( X ) + PARAMETER: X is a number +DESCRIPTION: Seeds the pseudo-random number generator with + X. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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 + LEFT$(A$,1); X > 0. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = RESET +DESCRIPTION: Close all open files. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: N = RMDIR( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: Removes the directory named in A$. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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]. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = SEC( X ) + PARAMETER: X is a number +DESCRIPTION: The secant of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = SEEK( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The location of file X; the next record that + GET or PUT statements will use. +------------------------------------------------------------ + SYNTAX: N = SEEK( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [MININT,MAXINT] +DESCRIPTION: For file X, move to record number Y; the first + record number is 1. +------------------------------------------------------------ + SYNTAX: S$ = SEG( 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. +------------------------------------------------------------ + SYNTAX: S$ = SEG$( 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = SHELL( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The exit code resulting from the execution of + an operating system command. +------------------------------------------------------------ + SYNTAX: N = SIN( X ) + PARAMETER: X is a number +DESCRIPTION: The sine of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = SIND( X ) + PARAMETER: X is a number +DESCRIPTION: The sine of X, where X is in degrees. +------------------------------------------------------------ + SYNTAX: N = SING( X ) + PARAMETER: X is a number +DESCRIPTION: The sine of X, where X is in gradians. +------------------------------------------------------------ + SYNTAX: N = SINH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic sine of X. +------------------------------------------------------------ + SYNTAX: N = SLEEP( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then SLEEP + does nothing. The resolution is + implementation defined. +------------------------------------------------------------ + SYNTAX: N = SNH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic sine of X. +------------------------------------------------------------ + SYNTAX: S$ = SPACE$( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X blank spaces. +------------------------------------------------------------ + SYNTAX: S$ = SPC( X ) + PARAMETER: X is a number +DESCRIPTION: The string of X spaces. Only for use within + the PRINT command. +------------------------------------------------------------ + SYNTAX: N = SQR( X ) + PARAMETER: X is a number, >= 0 +DESCRIPTION: The non-negative square root of X; X shall be + non-negative. +------------------------------------------------------------ + SYNTAX: S$ = STR( 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). +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = TAN( X ) + PARAMETER: X is a number +DESCRIPTION: The tangent of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = TAND( X ) + PARAMETER: X is a number +DESCRIPTION: The tangent of X, where X is in degrees. +------------------------------------------------------------ + SYNTAX: N = TANG( X ) + PARAMETER: X is a number +DESCRIPTION: The tangent of X, where X is in gradians. +------------------------------------------------------------ + SYNTAX: N = TANH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic tangent of X. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + 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". +------------------------------------------------------------ + SYNTAX: S$ = TIME$( X ) + PARAMETER: X is a number +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". The value of X is + ignored. +------------------------------------------------------------ + SYNTAX: N = TIMER +DESCRIPTION: The time in the system clock in seconds + elapsed since midnight. +------------------------------------------------------------ + SYNTAX: S$ = TRIM$( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +DESCRIPTION: The string resulting from removing both + leading and trailing spaces from A$. +------------------------------------------------------------ + SYNTAX: N = TROFF +DESCRIPTION: Turn tracing OFF +------------------------------------------------------------ + SYNTAX: N = TRON +DESCRIPTION: Turn tracing ON +------------------------------------------------------------ + 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]. +------------------------------------------------------------ + SYNTAX: N = UBOUND( ... ) +DESCRIPTION: UBOUND( arrayname [, dimension] ). The upper + bound of the array. The dimension defaults + to 1. dimension in [1,DIM(arrayname)] +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = WAIT( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then WAIT does + nothing. The resolution is implementation + defined. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = WIDTH( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [0,255] +DESCRIPTION: If X = 0, sets the console width to Y. + If X < 0, sets the printer width to Y. + If X is an open file number, sets the file + line width to Y. + Otherwise sets the console rows to X and the + line width to Y. + A value of zero for Y means no wrapping will + occur. +------------------------------------------------------------ + + +============================================================ + OPERATORS +============================================================ + + +------------------------------------------------------------ + SYNTAX: X ** Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: X [ Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: X ^ Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: # X +DESCRIPTION: Posation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: + X +DESCRIPTION: Posation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: - X +DESCRIPTION: Negation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: X * Y +DESCRIPTION: Multiplication + PRECEDENCE: 12 +------------------------------------------------------------ + SYNTAX: X / Y +DESCRIPTION: Division + PRECEDENCE: 12 +------------------------------------------------------------ + SYNTAX: X \ Y +DESCRIPTION: Integer Division + PRECEDENCE: 11 +------------------------------------------------------------ + SYNTAX: X MOD Y +DESCRIPTION: Integer Modulus + PRECEDENCE: 10 +------------------------------------------------------------ + SYNTAX: X + Y +DESCRIPTION: Addition + PRECEDENCE: 9 +------------------------------------------------------------ + SYNTAX: X - Y +DESCRIPTION: Subtraction + PRECEDENCE: 9 +------------------------------------------------------------ + SYNTAX: X & Y +DESCRIPTION: Concatenation + PRECEDENCE: 8 +------------------------------------------------------------ + SYNTAX: X < Y +DESCRIPTION: Less than + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X <= Y +DESCRIPTION: Less than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X <> Y +DESCRIPTION: Not Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X = Y +DESCRIPTION: Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X =< Y +DESCRIPTION: Less than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X => Y +DESCRIPTION: Greater than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X > Y +DESCRIPTION: Greater than + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X >< Y +DESCRIPTION: Not Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X >= Y +DESCRIPTION: Greater than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: A$ LIKE B$ +DESCRIPTION: Compare A$ to the pattern in B$ + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: NOT X +DESCRIPTION: Bitwise NOT + PRECEDENCE: 6 +------------------------------------------------------------ + SYNTAX: X AND Y +DESCRIPTION: Bitwise AND + PRECEDENCE: 5 +------------------------------------------------------------ + SYNTAX: X OR Y +DESCRIPTION: Bitwise OR + PRECEDENCE: 4 +------------------------------------------------------------ + SYNTAX: X XOR Y +DESCRIPTION: Bitwise Exclusive OR + PRECEDENCE: 3 +------------------------------------------------------------ + SYNTAX: X EQV Y +DESCRIPTION: Bitwise EQV + PRECEDENCE: 2 +------------------------------------------------------------ + SYNTAX: X IMP Y +DESCRIPTION: Bitwise IMP + PRECEDENCE: 1 +------------------------------------------------------------ + + diff --git a/Bwbasic-3.2-options.txt b/Bwbasic-3.2-options.txt new file mode 100644 index 0000000..dc126a3 --- /dev/null +++ b/Bwbasic-3.2-options.txt @@ -0,0 +1,2538 @@ +============================================================ + GENERAL +============================================================ + + +OPTION VERSION "BYWATER" +REM INTERNAL ID: B15 +REM DESCRIPTION: Bywater BASIC 3 +REM REFERENCE: Bywater BASIC Interpreter, version 3.20 +REM by Ted A. Campbell, Jon B. Volkoff, Paul Edwards, et al. +REM (c) 2014-2017, Howard Wulf, AF5NE +REM http://wwww.sourceforge.net/bwbasic/ +REM bwbasic-3.20.zip +REM +OPTION STRICT OFF +OPTION ANGLE RADIANS +OPTION BUGS ON +OPTION LABELS ON +OPTION COMPARE BINARY +OPTION COVERAGE OFF +OPTION TRACE ON +OPTION ERROR GOTO +OPTION IMPLICIT +OPTION BASE 0 +OPTION RECLEN 128 +OPTION DATE "%m/%d/%Y" +OPTION TIME "%H:%M:%S" +OPTION PUNCT STRING "$" +OPTION PUNCT DOUBLE "#" +OPTION PUNCT SINGLE "!" +OPTION PUNCT CURRENCY "@" +OPTION PUNCT LONG "&" +OPTION PUNCT INTEGER "%" +OPTION PUNCT BYTE "~" +OPTION PUNCT QUOTE """ +OPTION PUNCT COMMENT "'" +OPTION PUNCT STATEMENT ":" +OPTION PUNCT PRINT "?" +OPTION PUNCT INPUT " " +OPTION PUNCT IMAGE " " +OPTION PUNCT LPAREN "(" +OPTION PUNCT RPAREN ")" +OPTION PUNCT FILENUM "#" +OPTION PUNCT AT "@" +OPTION USING DIGIT "#" +OPTION USING COMMA "," +OPTION USING PERIOD "." +OPTION USING PLUS "+" +OPTION USING MINUS "-" +OPTION USING EXRAD "^" +OPTION USING DOLLAR "$" +OPTION USING FILLER "*" +OPTION USING LITERAL "_" +OPTION USING FIRST "!" +OPTION USING ALL "&" +OPTION USING LENGTH "\" + + +============================================================ + COMMANDS +============================================================ + + +------------------------------------------------------------ + SYNTAX: APPEND filename$ +DESCRIPTION: Merges the BASIC program in filename$ into the + current BASIC program; lines in filename$ + replace any matching lines in the current + program. +------------------------------------------------------------ + SYNTAX: AS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: AUTO [start [, increment]] +DESCRIPTION: Automatic line numbering for manual program + entry. If the line already exists, then an + asterisk is displayed and pressing ENTER + leaves the line as-is. If the line does not + exist, then an asterisk is not displayed and + pressing ENTER terminates AUTO mode. + Regardless whether the line exists, entering + the command MAN will terminate AUTO mode. + AUTO mode is also terminated by any ERROR or + by pressing control-C. +------------------------------------------------------------ + SYNTAX: BREAK line [, ...]] +DESCRIPTION: Diagnostic command to stop execution at the + specified line(s). BREAK only applies to + user-numbered lines. For multi-statement + lines, BREAK only applies to the first + statement. BREAK effectively inserts a + hidden STOP command immediately after the + line number. Once a BREAK occurrs on a + specified line, it is automatically removed. + To remove all existing BREAKs, execute BREAK + without any line numbers. +------------------------------------------------------------ + SYNTAX: BYE +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + SYNTAX: CALL subname( [parameter [, ...] ] ) +DESCRIPTION: Calls a subroutine that was defined by SUB and + END SUB. +------------------------------------------------------------ + SYNTAX: CASE constant [TO constant] +DESCRIPTION: Introduces an element of a SELECT CASE + statement. Multiple tests must be seperated + a comma. For example: CASE 1, 2 TO 3, IS > + 4, IF < 5 +------------------------------------------------------------ + SYNTAX: CASE IF operator constant +DESCRIPTION: Introduces an element of a SELECT CASE + statement. Multiple tests must be seperated + a comma. For example: CASE 1, 2 TO 3, IS > + 4, IF < 5 +------------------------------------------------------------ + SYNTAX: CASE IS operator constant +DESCRIPTION: Introduces an element of a SELECT CASE + statement. Multiple tests must be seperated + a comma. For example: CASE 1, 2 TO 3, IS > + 4, IF < 5 +------------------------------------------------------------ + SYNTAX: CASE ELSE +DESCRIPTION: Introduces a default SELECT CASE element. +------------------------------------------------------------ + SYNTAX: CHAIN filename$ [, linenumber] +DESCRIPTION: Load and execute another BASIC program, + without clearing common variables. For + System/370, the syntax is CHAIN + filename$,parameter$. +------------------------------------------------------------ + SYNTAX: CHANGE A$ TO X +DESCRIPTION: Changes a string to a numeric array. +------------------------------------------------------------ + SYNTAX: CHANGE X TO A$ +DESCRIPTION: Changes a numeric array to a string. +------------------------------------------------------------ + SYNTAX: CLEAR +DESCRIPTION: Sets all numeric variables to 0, and all + string variables to empty strings. +------------------------------------------------------------ + SYNTAX: CLOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: CLOAD* arrayname +DESCRIPTION: Loads a numeric array from a file saved using + CSAVE*. +------------------------------------------------------------ + SYNTAX: CMDS +DESCRIPTION: Prints a list of all implemented BASIC + commands. +------------------------------------------------------------ + SYNTAX: COMMON variable [, ...] +DESCRIPTION: Designates variables to be passed to a CHAINed + program. +------------------------------------------------------------ + SYNTAX: CONST variable [, ...] = value +DESCRIPTION: Assigns the value to variable. Any later + assignment to the variable causus a VARIABLE + NOT DECLARED error. +------------------------------------------------------------ + SYNTAX: CONT +DESCRIPTION: Continue a BASIC program after a STOP has been + executed. Program resumes at the line after + the STOP. +------------------------------------------------------------ + SYNTAX: CSAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: CSAVE* ArrayName +DESCRIPTION: Saves a numeric array into a file for later + loading by CLOAD*. +------------------------------------------------------------ + SYNTAX: DATA constant [, ...] +DESCRIPTION: Stores numeric and string constants to be + accessed by READ. +------------------------------------------------------------ + SYNTAX: DEF FNname[( arg [,...] )] = value +DESCRIPTION: Defines a single-line function. Single-line + functions require an equal sign. +------------------------------------------------------------ + SYNTAX: DEF FNname[( arg [,...] )] +DESCRIPTION: Defines a multiline function. Multi-line DEF + functions do not have an equal sign and must + end with FNEND. +------------------------------------------------------------ + SYNTAX: DEFBYT letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFCUR letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFDBL letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFINT letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFLNG letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFSNG letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFSTR letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + string variables. +------------------------------------------------------------ + 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. Deleting + a non-existing line does not cause an error. +------------------------------------------------------------ + SYNTAX: DIM [# filenum,] variable([ lower TO ] upper) +DESCRIPTION: Declares variables and specifies the + dimensions of array variables. For array + variables, if the lower bound is not + provided, then the OPTION BASE value is used. + If filenum is provided, then the variable is + virtual. +------------------------------------------------------------ + SYNTAX: DO UNTIL value +DESCRIPTION: Top of a DO - LOOP structure. Exits when + value is non-zero. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: DO WHILE value +DESCRIPTION: Top of a DO - LOOP structure. Exits when + value is zero. +------------------------------------------------------------ + SYNTAX: DSP variable [, ...]] +DESCRIPTION: Diagnostic command to display the value every + time the variable is assigned. To remove all + existing DSPs, execute DSP without any + variables. +------------------------------------------------------------ + SYNTAX: EDIT +DESCRIPTION: implementation defined. +------------------------------------------------------------ + SYNTAX: ELSE +DESCRIPTION: Introduces a default condition in a multi-line + IF statement. +------------------------------------------------------------ + SYNTAX: ELSEIF +DESCRIPTION: Introduces a secondary condition in a + multi-line IF statement. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: END FUNCTION +DESCRIPTION: Specifies the last line of a multi-line + FUNCTION definition. +------------------------------------------------------------ + SYNTAX: END IF +DESCRIPTION: Specifies the last line of a multi-line IF + definition. +------------------------------------------------------------ + SYNTAX: END SELECT +DESCRIPTION: Specifies the last line of a multi-line SELECT + CASE definition. +------------------------------------------------------------ + SYNTAX: END SUB +DESCRIPTION: Specifies the last line of a multi-line SUB + definition. +------------------------------------------------------------ + SYNTAX: ERASE variable [, ...] +DESCRIPTION: Eliminates arrayed variables from a program. +------------------------------------------------------------ + SYNTAX: EXCHANGE variable, variable +DESCRIPTION: Swaps the values of two variables. Both + variables must be of the same type. +------------------------------------------------------------ + SYNTAX: EXIT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: EXIT DO +DESCRIPTION: Immediately exits the inner-most DO-LOOP + strucure. +------------------------------------------------------------ + SYNTAX: EXIT FOR +DESCRIPTION: Immediately exits the inner-most FOR-NEXT + strucure. +------------------------------------------------------------ + SYNTAX: EXIT FUNCTION +DESCRIPTION: Immediately exits the inner-most multi-line + FUNCTION strucure. +------------------------------------------------------------ + SYNTAX: EXIT REPEAT +DESCRIPTION: Exit a REPEAT - UNTIL structure. +------------------------------------------------------------ + SYNTAX: EXIT SUB +DESCRIPTION: Immediately exits the inner-most multi-line + SUB strucure. +------------------------------------------------------------ + SYNTAX: EXIT WHILE +DESCRIPTION: Immediately exits the inner-most WHILE-END + strucure. +------------------------------------------------------------ + SYNTAX: FIELD [#] filenum, number AS variable$ [, ...] +DESCRIPTION: Assigns number bytes in the buffer of random + file filenum to the variable variable$. GET + will automatically update the variable, and + PUT will automatically use the variable. +------------------------------------------------------------ + SYNTAX: FNCS +DESCRIPTION: Prints a list of all pre-defined BASIC + functions. +------------------------------------------------------------ + SYNTAX: FNEND +DESCRIPTION: Specifies the last line of a multi-line DEF + function. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: GO +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: GO SUB 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. +------------------------------------------------------------ + SYNTAX: GO TO line +DESCRIPTION: Branches program execution to the specified + line. The line may be a number or a label. +------------------------------------------------------------ + SYNTAX: GOODBYE +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: GOTO line +DESCRIPTION: Branches program execution to the specified + line. The line may be a number or a label. +------------------------------------------------------------ + SYNTAX: HELP name +DESCRIPTION: Provides help on the specified name which is a + command name or function name. +------------------------------------------------------------ + SYNTAX: IF value THEN line1 [ELSE line2] +DESCRIPTION: Single line standard IF command. If the value + is non-zero, then branh to line1. If the + value is zero and ELSE is provided, then + branch to line2. Otherwise continue to the + next line. LABELS are not allowed. +------------------------------------------------------------ + SYNTAX: IF value THEN +DESCRIPTION: Top of a multi-line IF - END IF structure. If + the value 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. +------------------------------------------------------------ + SYNTAX: INPUT "prompt string" , variable [, ...] +DESCRIPTION: Reads input from the terminal after displaying + a prompt. +------------------------------------------------------------ + SYNTAX: INPUT # filenum , variable [, ...]s +DESCRIPTION: Reads input from the file specified by + filenum. +------------------------------------------------------------ + SYNTAX: INPUT variable [, ...] +DESCRIPTION: Reads input from the terminal. +------------------------------------------------------------ + SYNTAX: INPUT LINE variable$ +DESCRIPTION: Reads entire line from the terminal into + variable$. +------------------------------------------------------------ + SYNTAX: INPUT LINE # filenum , variable$ +DESCRIPTION: Reads entire line from a file into variable$. +------------------------------------------------------------ + SYNTAX: INPUT LINE "prompt string" , variable$ +DESCRIPTION: Reads entire line from the terminal into + variable$ after displaying a prompt +------------------------------------------------------------ + SYNTAX: [LET] variable [, ...] = value +DESCRIPTION: Assigns the value to the variable. The LET + keyword is optional. +------------------------------------------------------------ + SYNTAX: LINE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: LINE INPUT [[#] filenum,]["prompt string";] + variable$ +DESCRIPTION: Reads entire line from the keyboard or a file + into variable$. +------------------------------------------------------------ + SYNTAX: LIST line1 [- line2] +DESCRIPTION: Lists BASIC program lines from line1 to line2 + to the console on stdout. +------------------------------------------------------------ + SYNTAX: LISTNH line1 [- line2] +DESCRIPTION: Lists BASIC program lines from line1 to line2 + to the console on stdout. +------------------------------------------------------------ + SYNTAX: LLIST line1 [- line2] +DESCRIPTION: Lists BASIC program lines from line1 to line2 + to the printer on stderr. +------------------------------------------------------------ + SYNTAX: LOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: LOOP UNTIL value +DESCRIPTION: Bottom of a DO - LOOP structure. Exits when + value is nonz-zero. +------------------------------------------------------------ + SYNTAX: LOOP WHILE value +DESCRIPTION: Bottom of a DO - LOOP structure. Exits when + value is zero. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: LPRINT [USING format-string$;] value ... +DESCRIPTION: Send output to the printer (stderr). +------------------------------------------------------------ + SYNTAX: LSET variable$ = value +DESCRIPTION: Left-aligns the value into 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. +------------------------------------------------------------ + SYNTAX: MAINTAINER +DESCRIPTION: This command is reserved for use by the + Bywater BASIC maintainer. It is not for the + BASIC programmer. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS HTML +DESCRIPTION: Dump COMMAND vs VERSION as HTML table +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS ID +DESCRIPTION: Dump COMMAND #define. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS MANUAL +DESCRIPTION: Dump COMMAND manual. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS_SWITCH +DESCRIPTION: Dump COMMAND switch. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS TABLE +DESCRIPTION: Dump COMMAND table. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG OFF +DESCRIPTION: Disable degug tracing. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG ON +DESCRIPTION: Enable degug tracing. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS HTML +DESCRIPTION: Dump FUNCTION vs VERSION as HTML table. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS ID +DESCRIPTION: Dump FUNCTION #define. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS MANUAL +DESCRIPTION: Dump FUNCTION manual. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS SWITCH +DESCRIPTION: Dump FUNCTION switch. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS TABLE +DESCRIPTION: Dump FUNCTION table. +------------------------------------------------------------ + SYNTAX: MAINTAINER MANUAL +DESCRIPTION: Dump manual for the currently selected OPTION + VERSION. +------------------------------------------------------------ + SYNTAX: MAINTAINER STACK +DESCRIPTION: Dump the BASIC stack. +------------------------------------------------------------ + SYNTAX: MARGIN # filenumber, width +DESCRIPTION: Sets the file margin for writing; filenumber + <= 0 is ignored. +------------------------------------------------------------ + SYNTAX: MERGE filename$ +DESCRIPTION: Merges the BASIC program in filename$ into the + current BASIC program. Lines in filename$ + replace any matching lines in the current + program. +------------------------------------------------------------ + SYNTAX: MID$( variable$, start [, count ] ) = value +DESCRIPTION: Replaces a subtring of variable$ with value. +------------------------------------------------------------ + SYNTAX: NAME old$ AS new$ +DESCRIPTION: Changes the name of an existing file. +------------------------------------------------------------ + SYNTAX: NEW +DESCRIPTION: Deletes the program in memory and clears all + variables. +------------------------------------------------------------ + SYNTAX: NEXT [variable] +DESCRIPTION: The bottom line of a FOR - NEXT structure. +------------------------------------------------------------ + SYNTAX: OF +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON value GOSUB line [, ...] +DESCRIPTION: Calls based on the rounded value. +------------------------------------------------------------ + SYNTAX: ON value GOTO line [, ...] +DESCRIPTION: Branches based on the rounded value. +------------------------------------------------------------ + SYNTAX: ON ERROR +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON ERROR GOSUB errline +DESCRIPTION: When a trappable error occurs, execute GOSUB + errline. The error handler must terminate + with a RETURN command. If the line number is + 0 (zerp), then use the default error handler. + Valid when OPTION ERROR GOSUB. +------------------------------------------------------------ + SYNTAX: ON ERROR GOTO errline +DESCRIPTION: When a trappable error occurs, execute GOTO + errline. The error handler must terminate + with a RESUME command. If the line number is + 0 (zerp), then use the default error handler. + Valid when OPTION ERROR GOTO. +------------------------------------------------------------ + SYNTAX: ON ERROR RESUME +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON ERROR RESUME NEXT +DESCRIPTION: When a trappable error occurs, execution + continues with the next line. Valid when + OPTION ERROR GOTO. +------------------------------------------------------------ + SYNTAX: ON ERROR RETURN +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON ERROR RETURN NEXT +DESCRIPTION: When a trappable error occurs, execution + continues with the next line. Valid when + OPTION ERROR GOSUB. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: OPEN filename$ + FOR INPUT|OUTPUT|APPEND|BINARY|RANDOM|VIRTUAL + AS [#] fileenumber + [LEN [=] record-length] +DESCRIPTION: Opens a file for use. + RANDOM requires LEN. +------------------------------------------------------------ + SYNTAX: OPTION +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE DEGREES +DESCRIPTION: Configures these math functions to accept and + return angles in degrees: ACOS, ACS, ANGLE, + ARCSIN, ASIN, ASN, ARCTAN, ATN, ATAN, COS, + COT, CSC, SEC, SIN and TAN. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE GRADIANS +DESCRIPTION: Configures these math functions to accept and + return angles in gradians: ACOS, ANGLE, + ASIN, ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN + and TAN. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE RADIANS +DESCRIPTION: Configures these math functions to accept and + return angles in radians: ACOS, ANGLE, ASIN, + ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN and + TAN. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC DECIMAL +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC FIXED +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC NATIVE +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION BASE integer +DESCRIPTION: Sets the default lowest array subscript. +------------------------------------------------------------ + SYNTAX: OPTION BUGS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION BUGS BOOLEAN +DESCRIPTION: Boolean results are 1 or 0 instead of bitwise. +------------------------------------------------------------ + SYNTAX: OPTION BUGS OFF +DESCRIPTION: Disables bugs commonly found in many BASIC + dialects. +------------------------------------------------------------ + SYNTAX: OPTION BUGS ON +DESCRIPTION: Enables bugs commonly found in many BASIC + dialects. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE BINARY +DESCRIPTION: Causes string comparisons to be + case-sensitive. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE DATABASE +DESCRIPTION: Causes string comparisons to be + case-insensitive. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE TEXT +DESCRIPTION: Causes string comparisons to be + case-insensitive. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE OFF +DESCRIPTION: Disables BASIC code coverage recording, + displayed using the LIST command. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE ON +DESCRIPTION: Enables BASIC code coverage recording, + displayed using the LIST command. +------------------------------------------------------------ + SYNTAX: OPTION DATE format$ +DESCRIPTION: Sets the date format string used by C + strftime() for DATE$. +------------------------------------------------------------ + SYNTAX: OPTION DIGITS integer +DESCRIPTION: Sets the number of significant digits for + PRINT. Setting the value to zero restores + the default. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE COMMAND name$ +DESCRIPTION: Disables the specified BASIC command. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE FUNCTION name$ +DESCRIPTION: Disables the specified BASIC function. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE OPERATOR name$ +DESCRIPTION: Disables the specified BASIC operator. +------------------------------------------------------------ + SYNTAX: OPTION EDIT string$ +DESCRIPTION: Sets the program name used by the EDIT + command. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE COMMAND name$ +DESCRIPTION: Enables the specified BASIC command. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE FUNCTION name$ +DESCRIPTION: Enables the specified BASIC function. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE OPERATOR name$ +DESCRIPTION: Enables the specified BASIC operator. +------------------------------------------------------------ + SYNTAX: OPTION ERROR +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ERROR GOSUB +DESCRIPTION: When an error occurs, GOSUB to the error + handler. The error handler exits with + RETURN. +------------------------------------------------------------ + SYNTAX: OPTION ERROR GOTO +DESCRIPTION: When an error occurs, GOTO to the error + handler. The error handler exits with + RESUME. +------------------------------------------------------------ + SYNTAX: OPTION EXPLICIT +DESCRIPTION: All variables must be declared using DIM. +------------------------------------------------------------ + SYNTAX: OPTION EXTENSION string$ +DESCRIPTION: Sets the BASIC filename extension, commonly + ".bas". +------------------------------------------------------------ + SYNTAX: OPTION FILES string$ +DESCRIPTION: Sets the program name used by the FILES + command. +------------------------------------------------------------ + SYNTAX: OPTION IMPLICIT +DESCRIPTION: Variables need not be declared using DIM, + provided arrays have no more that 10 + elements. This is the opposite of OPTION + EXPLICIT, and is the default for all versions + of BASIC. +------------------------------------------------------------ + SYNTAX: OPTION INDENT integer +DESCRIPTION: Sets indention level for LIST. Zero means no + indention. Default is 2. +------------------------------------------------------------ + SYNTAX: OPTION LABELS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION LABELS OFF +DESCRIPTION: Disables text labels. +------------------------------------------------------------ + SYNTAX: OPTION LABELS ON +DESCRIPTION: Enables text labels. +------------------------------------------------------------ + SYNTAX: OPTION PROMPT string$ +DESCRIPTION: Sets the BASIC prompt. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT AT char$ +DESCRIPTION: Sets the PRINT AT character, commonly "@". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT BYTE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type BYTE, commonly "~". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT COMMENT char$ +DESCRIPTION: Sets the shortcut COMMENT character. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT CURRENCY char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type CURRENCY, commonly "@". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT DOUBLE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type DOUBLE, commonly "#". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT FILENUM char$ +DESCRIPTION: Sets the FILE NUMBER prefix character, + commonly "#". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT IMAGE char$ +DESCRIPTION: Sets the shortcut IMAGE character, commonly + ":". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT INPUT char$ +DESCRIPTION: Sets the shortcut INPUT character, commonly + "!". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT INTEGER char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type INTEGER, commonly "%". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT LONG char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type LONG, commonly "&". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT LPAREN char$ +DESCRIPTION: Sets the LEFT PARENTHESIS character, commonly + "(". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT_PRINT char$ +DESCRIPTION: Sets the shortcut PRINT character, commonly + "?". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT QUOTE char$ +DESCRIPTION: Sets the QUOTE character, commonly """ +------------------------------------------------------------ + SYNTAX: OPTION PUNCT RPAREN char$ +DESCRIPTION: Sets the RIGHT PARENTHESIS character, commonly + ")". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT SINGLE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type SINGLE, commonly "!". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT STATEMENT char$ +DESCRIPTION: Sets the statement seperator character, + commonly ":". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT STRING char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type STRING, commonly "$". +------------------------------------------------------------ + SYNTAX: OPTION RECLEN integer +DESCRIPTION: Sets the default RANDOM record length. +------------------------------------------------------------ + SYNTAX: OPTION RENUM string$ +DESCRIPTION: Sets the program name used by the RENUM + command. +------------------------------------------------------------ + SYNTAX: OPTION ROUND +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ROUND BANK +DESCRIPTION: Round using the Banker rule. +------------------------------------------------------------ + SYNTAX: OPTION ROUND MATH +DESCRIPTION: Round using mathematical rules. +------------------------------------------------------------ + SYNTAX: OPTION ROUND TRUNCATE +DESCRIPTION: Round using truncation. +------------------------------------------------------------ + SYNTAX: OPTION SCALE integer +DESCRIPTION: Sets the number of digits to round after the + decimal point for PRINT. Setting the value + to zero disables rounding. +------------------------------------------------------------ + SYNTAX: OPTION SLEEP double +DESCRIPTION: Sets multiplier for SLEEP and WAIT. Zero + means no waiting. Default is 1. +------------------------------------------------------------ + SYNTAX: OPTION STDERR filename$ +DESCRIPTION: Sets the file used for STDERR, which is used + by LPRINT commands. +------------------------------------------------------------ + SYNTAX: OPTION STDIN filename$ +DESCRIPTION: Sets the file used for STDIN, which is used by + INPUT commands. +------------------------------------------------------------ + SYNTAX: OPTION STDOUT filename$ +DESCRIPTION: Sets the file used for STDOUT, which is used + by PRINT commands. +------------------------------------------------------------ + SYNTAX: OPTION STRICT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION STRICT OFF +DESCRIPTION: Disables checking for implicit array creation + without using the DIM command. +------------------------------------------------------------ + SYNTAX: OPTION STRICT ON +DESCRIPTION: Enables checking for implicit array creation + without using the DIM command. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL ADM +DESCRIPTION: Enables ADM-3A terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL ANSI +DESCRIPTION: Enables ANSI terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL NONE +DESCRIPTION: Disables terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TIME format$ +DESCRIPTION: Sets the time format string used by C + strftime() for TIME$. +------------------------------------------------------------ + SYNTAX: OPTION TRACE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION TRACE OFF +DESCRIPTION: Disables displaying a stack trace when an + ERROR occurs. +------------------------------------------------------------ + SYNTAX: OPTION TRACE ON +DESCRIPTION: Enables displaying a stack trace when an ERROR + occurs. +------------------------------------------------------------ + SYNTAX: OPTION USING +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION USING ALL char$ +DESCRIPTION: Specifies the magic ALL character for the + PRINT USING command. A common value is "&". +------------------------------------------------------------ + SYNTAX: OPTION USING COMMA char$ +DESCRIPTION: Specifies the magic COMMA character for the + PRINT USING command. A common value is ",". +------------------------------------------------------------ + SYNTAX: OPTION USING DIGIT char$ +DESCRIPTION: Specifies the magic DIGIT character for the + PRINT USING command. A common value is "#". +------------------------------------------------------------ + SYNTAX: OPTION USING DOLLAR char$ +DESCRIPTION: Specifies the magic DOLLAR character for the + PRINT USING command. A common value is "$". +------------------------------------------------------------ + SYNTAX: OPTION USING EXRAD char$ +DESCRIPTION: Specifies the magic EXRAD character for the + PRINT USING command. A common value is "^". +------------------------------------------------------------ + SYNTAX: OPTION USING FILLER char$ +DESCRIPTION: Specifies the magic FILLER character for the + PRINT USING command. A common value is "*". +------------------------------------------------------------ + SYNTAX: OPTION USING FIRST char$ +DESCRIPTION: Specifies the magic FIRST character for the + PRINT USING command. A common value is "!". +------------------------------------------------------------ + SYNTAX: OPTION USING LENGTH char$ +DESCRIPTION: Specifies the magic LENGTH character for the + PRINT USING command. A common value is "\". +------------------------------------------------------------ + SYNTAX: OPTION USING LITERAL char$ +DESCRIPTION: Specifies the magic LITERAL character for the + PRINT USING command. A common value is "_". +------------------------------------------------------------ + SYNTAX: OPTION USING MINUS char$ +DESCRIPTION: Specifies the magic MINUS character for the + PRINT USING command. A common value is "-". +------------------------------------------------------------ + SYNTAX: OPTION USING PERIOD char$ +DESCRIPTION: Specifies the magic PERIOD character for the + PRINT USING command. A common value is ".". +------------------------------------------------------------ + SYNTAX: OPTION USING PLUS char$ +DESCRIPTION: Specifies the magic PLUS character for the + PRINT USING command. A common value is "+". +------------------------------------------------------------ + SYNTAX: OPTION VERSION version$ +DESCRIPTION: Selects a specific BASIC version, which is a + combination of OPTION settings, commands, + functions and operators. If no version is + specified, displays a list of the available + versions. +------------------------------------------------------------ + SYNTAX: OPTION ZONE integer +DESCRIPTION: Sets the PRINT zone width. Setting the value + to zero restores the default. +------------------------------------------------------------ + SYNTAX: POP +DESCRIPTION: Pops one GOSUB from the return stack. +------------------------------------------------------------ + SYNTAX: PRINT # filenum , [USING format$;] value ... +DESCRIPTION: Sends output to a file. +------------------------------------------------------------ + SYNTAX: PRINT [USING format$;] value ... +DESCRIPTION: Sends output to the screen. +------------------------------------------------------------ + SYNTAX: QUIT +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + SYNTAX: READ variable [, ...] +DESCRIPTION: Reads values from DATA statements. +------------------------------------------------------------ + SYNTAX: RECALL ArrayName +DESCRIPTION: Loads a numeric array from a file saved using + STORE. +------------------------------------------------------------ + SYNTAX: REM ... +DESCRIPTION: Remark. +------------------------------------------------------------ + SYNTAX: RENUM +DESCRIPTION: Implementation defined. +------------------------------------------------------------ + SYNTAX: REPEAT +DESCRIPTION: Top of a REPEAT - UNTIL structure. +------------------------------------------------------------ + SYNTAX: RESTORE [line] +DESCRIPTION: Resets the line used for the next READ + statement. line may be either a number or a + label. +------------------------------------------------------------ + SYNTAX: RESUME +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to ERL. +------------------------------------------------------------ + SYNTAX: RESUME line +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to the specified + line. +------------------------------------------------------------ + SYNTAX: RESUME NEXT +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to the line after + ERL. +------------------------------------------------------------ + SYNTAX: RESUME 0 +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to ERL. +------------------------------------------------------------ + SYNTAX: RETURN +DESCRIPTION: Concludes a subroutine called by GOSUB. +------------------------------------------------------------ + SYNTAX: RSET variable$ = value +DESCRIPTION: Right-aligns the value into 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. +------------------------------------------------------------ + SYNTAX: RUN filename$ +DESCRIPTION: Loads a new BAASIC program and executes the + program from the start. +------------------------------------------------------------ + SYNTAX: RUN line +DESCRIPTION: Executes the program in memory beginning at + line. +------------------------------------------------------------ + SYNTAX: RUN +DESCRIPTION: Executes the program in memory from the start. +------------------------------------------------------------ + SYNTAX: RUNNH line +DESCRIPTION: Executes the program in memory beginning at + line. +------------------------------------------------------------ + SYNTAX: RUNNH filename$ +DESCRIPTION: Loads a new BAASIC program and executes the + program from the start. +------------------------------------------------------------ + SYNTAX: RUNNH +DESCRIPTION: Executes the program in memory from the start. +------------------------------------------------------------ + SYNTAX: SAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: SELECT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: SELECT CASE value +DESCRIPTION: Introduces a multi-line conditional selection + statement. +------------------------------------------------------------ + SYNTAX: STEP +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: STORE ArrayName +DESCRIPTION: Saves a numeric array into a file for later + loading by RECALL. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: SUBEND +DESCRIPTION: Specifies the last line of a multi-line SUB + definition. Same as END SUB. +------------------------------------------------------------ + SYNTAX: SWAP variable, variable +DESCRIPTION: Swaps the values of two variables. Both + variables must be of the same type. +------------------------------------------------------------ + SYNTAX: SYSTEM +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + SYNTAX: THEN +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: TIMER +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: TIMER OFF +DESCRIPTION: TIMER OFF terminates the timer interrupt. +------------------------------------------------------------ + SYNTAX: TIMER ON +DESCRIPTION: TIMER ON enables the timer 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. +------------------------------------------------------------ + SYNTAX: TIMER STOP +DESCRIPTION: TIMER STOP disables the interrupt, but the + count continues. +------------------------------------------------------------ + SYNTAX: TLOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: TO +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: TSAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: UNTIL value +DESCRIPTION: Bottom of a REPEAT - UNTIL. If the value is + non-zero, then the loop is terminated. +------------------------------------------------------------ + SYNTAX: VARS +DESCRIPTION: Prints a list of all global variables. +------------------------------------------------------------ + SYNTAX: WEND +DESCRIPTION: Bottom of a WHILE - WEND structure. +------------------------------------------------------------ + SYNTAX: WHILE value +DESCRIPTION: Top of a WHILE - WEND structure. If the value + is non-zero, then the loop is terminated. +------------------------------------------------------------ + SYNTAX: WRITE # filenum, value [, .... ] +DESCRIPTION: Outputs value to a file. Strings are quoted + and each value is seperated by a omma. +------------------------------------------------------------ + SYNTAX: WRITE value [, .... ] +DESCRIPTION: Outputs value to the screen. Strings are + quoted and each value is seperated by a + comma. +------------------------------------------------------------ + + +============================================================ + FUNCTIONS +============================================================ + + +------------------------------------------------------------ + SYNTAX: N = ABS( X ) + PARAMETER: X is a number +DESCRIPTION: The absolute value of X. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = ACS( X ) + PARAMETER: X is a number +DESCRIPTION: The arccosine of X in radians, where 0 <= + ACS(X) <= PI. X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ACSD( X ) + PARAMETER: X is a number +DESCRIPTION: The arccosine of X in degrees, where 0 <= + ACSD(X) <= 180. X shall be in the range -1 + <= X <= 1. +------------------------------------------------------------ + SYNTAX: N = ACSG( X ) + PARAMETER: X is a number +DESCRIPTION: The arccosine of X in gradians, where 0 <= + ACS(X) <= 200. X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = ARCSIN( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in radians, where -PI/2 <= + ARCSIN(X) <= PI/2; X shall be in the range -1 + <= X <= 1. +------------------------------------------------------------ + SYNTAX: N = ARCTAN( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in radians, i.e. the angle + whose tangent is X, where -PI/2 < ARCTAN(X) < + PI/2. +------------------------------------------------------------ + SYNTAX: N = ARGC +DESCRIPTION: The number of parameters passed to a FUNCTION + or SUB. If not in a FUNCTION or SUB, returns + -1. +------------------------------------------------------------ + SYNTAX: S$ = ARGT$( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The type of the Xth parameter to a FUNCTION or + SUB. If the Xth parameter is a string, then + return value is "$". If the Xth parameter is + a number, then return value is not "$". X in + [1,ARGC]. +------------------------------------------------------------ + SYNTAX: N = ARGV( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The numeric value of the Xth parameter to a + FUNCTION or SUB. X in [1,ARGC] and ARGT$( X + ) <> "$". +------------------------------------------------------------ + SYNTAX: S$ = ARGV$( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The string value of the Xth parameter to a + FUNCTION or SUB. X in [1,ARGC] and ARGT$( X + ) = "$". +------------------------------------------------------------ + SYNTAX: N = ASC( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The numeric code for the first letter in A$. + For example, ASC("ABC") returns 65 on ASCII + systems. +------------------------------------------------------------ + SYNTAX: N = ASC( A$, X ) + PARAMETER: A$ is a string, LEN >= 1 + PARAMETER: X is a number, [1,MAXLEN] +DESCRIPTION: The numeric code of the Xth character in A$. + Same as ASC(MID$(A$,X)). +------------------------------------------------------------ + SYNTAX: N = ASCII( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The numeric code for the first letter in A$. + For example, ASCII("ABC") returns 65 on ASCII + systems. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = ASN( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in radians, where -PI/2 <= + ASN(X) <= PI/2; X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ASND( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in degrees, where -90 <= + ASN(X) <= 90; X shall be in the range -1 <= X + <= 1. +------------------------------------------------------------ + SYNTAX: N = ASNG( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in gradians, where -100 <= + ASNG(X) <= 100; X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ATAN( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in radians, i.e. the angle + whose tangent is X, where -PI/2 < ATAN(X) < + PI/2. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = ATND( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in degrees, i.e. the angle + whose tangent is X, where -90 < ATND(X) < 90. +------------------------------------------------------------ + SYNTAX: N = ATNG( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in gradians, i.e. the + angle whose tangent is X, where -100 < + ATND(X) < 100. +------------------------------------------------------------ + SYNTAX: N = BASE +DESCRIPTION: The current OPTION BASE setting. +------------------------------------------------------------ + SYNTAX: N = CCUR( X ) + PARAMETER: X is a number, [MINCUR,MAXCUR] +DESCRIPTION: The currency (64-bit) integer value of X. +------------------------------------------------------------ + SYNTAX: N = CDBL( X ) + PARAMETER: X is a number, [MINDBL,MAXDBL] +DESCRIPTION: The double-precision value of X. +------------------------------------------------------------ + SYNTAX: N = CEIL( X ) + PARAMETER: X is a number +DESCRIPTION: The smallest integer not less than X. +------------------------------------------------------------ + SYNTAX: S$ = CHAR( X, Y ) + PARAMETER: X is a number, [0,255] + PARAMETER: Y is a number, [0,MAXLEN] +DESCRIPTION: The string Y bytes long consisting of CHR$(X). + Same as STRING$(Y,X). +------------------------------------------------------------ + SYNTAX: S$ = CHAR$( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHAR$(65) returns "A". +------------------------------------------------------------ + SYNTAX: N = CHDIR( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: Changes to the directory named to A$. +------------------------------------------------------------ + SYNTAX: S$ = CHR( X ) + PARAMETER: X is a number +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHR(65) returns "A". +------------------------------------------------------------ + SYNTAX: S$ = CHR$( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHR$(65) returns "A". +------------------------------------------------------------ + SYNTAX: N = CINT( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The short (16-bit) integer value of X. +------------------------------------------------------------ + SYNTAX: N = CLG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: S$ = CLK( X ) + PARAMETER: X is a number +DESCRIPTION: The time of day in 24-hour notation according + to ISO 3307. For example, the value of CLK + at 11:15 AM is "11:15:00". If there is no + clock available, then the value of CLK shall + be "99:99:99". The value of TIME$ at + midnight is "00:00:00". The value of + parameter X is ignored. +------------------------------------------------------------ + SYNTAX: S$ = CLK$ +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". +------------------------------------------------------------ + SYNTAX: N = CLNG( X ) + PARAMETER: X is a number, [MINLNG,MAXLNG] +DESCRIPTION: The long (32-bit) integer value of X. +------------------------------------------------------------ + SYNTAX: N = CLOG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = CLOSE +DESCRIPTION: Close all open files. +------------------------------------------------------------ + SYNTAX: N = CLOSE( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: Close file number X. +------------------------------------------------------------ + SYNTAX: N = CLS +DESCRIPTION: Clears the screen. Cursor is positioned at row + 1, column 1. +------------------------------------------------------------ + SYNTAX: N = CODE( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The numeric code for the first letter in A$. + For example, CODE("ABC") returns 65 on ASCII + systems. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = COMMAND$( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The command line parameters. COMMAND$(0) is + the BASIC program name. COMMAND$(1) is the + first parameter after the BASIC program name, + and so on. Support for parameters varies by + operating system, compiler, and so on. X in + [0..9] +------------------------------------------------------------ + SYNTAX: N = COS( X ) + PARAMETER: X is a number +DESCRIPTION: The cosine of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = COSD( X ) + PARAMETER: X is a number +DESCRIPTION: The cosine of X, where X is in degrees. +------------------------------------------------------------ + SYNTAX: N = COSG( X ) + PARAMETER: X is a number +DESCRIPTION: The cosine of X, where X is in gradians. +------------------------------------------------------------ + SYNTAX: N = COSH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic cosine of X. +------------------------------------------------------------ + SYNTAX: N = COT( X ) + PARAMETER: X is a number +DESCRIPTION: The cotangent of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = COUNT +DESCRIPTION: The current cursor position in the line. +------------------------------------------------------------ + SYNTAX: N = CSC( X ) + PARAMETER: X is a number +DESCRIPTION: The cosecant of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = CSH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic cosine of X. +------------------------------------------------------------ + SYNTAX: N = CSNG( X ) + PARAMETER: X is a number, [MINFLT,MAXFLT] +DESCRIPTION: The single-precision value of X. +------------------------------------------------------------ + SYNTAX: S$ = CUR( 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. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: N = CVD( A$ ) + PARAMETER: A$ is a string, LEN >= sizeof(DBL) +DESCRIPTION: The double-precision value in A$, which was + created by MKD$. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: N = CVS( A$ ) + PARAMETER: A$ is a string, LEN >= sizeof(FLT) +DESCRIPTION: The single-precision value in A$, which was + created by MKS$. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = DATE$ +DESCRIPTION: The current date based on the internal clock + as a string in the format set by OPTION DATE. +------------------------------------------------------------ + SYNTAX: N = DEG +DESCRIPTION: Configures the math functions to accept and + return angles in degrees. +------------------------------------------------------------ + SYNTAX: N = DEG( X ) + PARAMETER: X is a number +DESCRIPTION: The number of degrees in X radians. +------------------------------------------------------------ + SYNTAX: N = DEGREE +DESCRIPTION: Configures the math functions to accept and + return angles in degrees. +------------------------------------------------------------ + SYNTAX: N = DEGREE( X ) + PARAMETER: X is a number +DESCRIPTION: The number of degrees in X radians. +------------------------------------------------------------ + SYNTAX: N = DET +DESCRIPTION: The determinant of the last MAT INV. Zero + means error. +------------------------------------------------------------ + SYNTAX: N = DIM( ... ) +DESCRIPTION: DIM( arrayname ). The total number of + dimensions of the array. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = ENVIRON$( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The value of the environment variable named + A$. +------------------------------------------------------------ + SYNTAX: N = EOF( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: If device number X is at the end-of-file, then + -1, otherwise 0. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + SYNTAX: N = ERL +DESCRIPTION: The line number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERR +DESCRIPTION: The error number of the most recent error. +------------------------------------------------------------ + SYNTAX: S$ = ERR$ +DESCRIPTION: The last error message. +------------------------------------------------------------ + SYNTAX: N = ERRL +DESCRIPTION: The line number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERRN +DESCRIPTION: The error number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERROR( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: Simulate the error number in X. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: S$ = ERROR$ +DESCRIPTION: The last error message. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = FILEATTR( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [MININT,MAXINT] +DESCRIPTION: For file X, if Y = 1 then returns open mode, + otherwise returns zero. +------------------------------------------------------------ + SYNTAX: N = FILES +DESCRIPTION: Displays all the file names. +------------------------------------------------------------ + SYNTAX: N = FILES( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: Displays all the file names matching A$. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = FLOW +DESCRIPTION: Turn tracing ON +------------------------------------------------------------ + SYNTAX: N = FP( X ) + PARAMETER: X is a number +DESCRIPTION: The fractional part of X, i.e. X - IP(X). +------------------------------------------------------------ + SYNTAX: N = FRAC( X ) + PARAMETER: X is a number +DESCRIPTION: The fractional part of X, i.e. X - IP(X). +------------------------------------------------------------ + SYNTAX: N = FRE +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. +------------------------------------------------------------ + 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 only and it always returns a + fixed value of 32000.The value of A$ is + ignored. +------------------------------------------------------------ + SYNTAX: N = FRE( X ) + PARAMETER: X is a number +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. The value of X is + ignored. +------------------------------------------------------------ + SYNTAX: N = FREEFILE +DESCRIPTION: The next available file number. +------------------------------------------------------------ + SYNTAX: N = GET( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: For file X, gets the next available record. +------------------------------------------------------------ + SYNTAX: N = GET( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [MININT,MAXINT] +DESCRIPTION: For file X, gets record number Y. The first + record number is 1. +------------------------------------------------------------ + SYNTAX: N = GRAD +DESCRIPTION: Configures the math functions to accept and + return angles in gradians. +------------------------------------------------------------ + SYNTAX: N = GRADIAN +DESCRIPTION: Configures the math functions to accept and + return angles in gradians. +------------------------------------------------------------ + SYNTAX: S$ = HEX$( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The the hexadecimal (base 16) representation + of X. +------------------------------------------------------------ + SYNTAX: N = HOME +DESCRIPTION: Clears the screen. Cursor is positioned at row + 1, column 1. +------------------------------------------------------------ + SYNTAX: N = INDEX( 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. +------------------------------------------------------------ + SYNTAX: S$ = INKEY$ +DESCRIPTION: The keypress, if available. If a keypress is + not available, then immediately returns an + empty string. If not supported by the + platform, then always returns an empty + string, so use INPUT$(1) instead. +------------------------------------------------------------ + SYNTAX: N = INP( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The value read from machine port X. Causes + ERROR 73. +------------------------------------------------------------ + SYNTAX: S$ = INPUT$( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X characters, read from the + terminal. +------------------------------------------------------------ + SYNTAX: S$ = INPUT$( X, Y ) + PARAMETER: X is a number, [0,MAXLEN] + PARAMETER: Y is a number, [MININT,MAXINT] +DESCRIPTION: The string of X characters, read from file Y. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = IP( X ) + PARAMETER: X is a number +DESCRIPTION: The integer part of X, i.e., + SGN(X)*INT(ABS(X)). +------------------------------------------------------------ + SYNTAX: S$ = KEY +DESCRIPTION: The keypress, if available. If a keypress is + not available, then immediately returns an + empty string. If not supported by the + platform, then always returns an empty + string, so use INPUT$(1) instead. +------------------------------------------------------------ + SYNTAX: S$ = KEY$ +DESCRIPTION: The keypress, if available. If a keypress is + not available, then immediately returns an + empty string. If not supported by the + platform, then always returns an empty + string, so use INPUT$(1) instead. +------------------------------------------------------------ + SYNTAX: N = KILL( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: Removes the file named in A$. +------------------------------------------------------------ + SYNTAX: N = LBOUND( ... ) +DESCRIPTION: LBOUND( arrayname [, dimension] ). The lower + bound of the array. The dimension defaults + to 1. dimension in [1,DIM(arrayname)] +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = LEN( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +DESCRIPTION: The length of A$. +------------------------------------------------------------ + SYNTAX: N = LOC( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The location of file X; the next record that + GET or PUT statements will use. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = LOF( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The length of file X. +------------------------------------------------------------ + SYNTAX: N = LOG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The natural logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LOG10( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LOG2( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The base 2 logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LPOS +DESCRIPTION: The current cursor position in the line for + the printer. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = MAX( A$, B$ ) + PARAMETER: A$ is a string, LEN >= 0 + PARAMETER: B$ is a string, LEN >= 0 +DESCRIPTION: The larger of the parameters. +------------------------------------------------------------ + SYNTAX: N = MAX( X, Y ) + PARAMETER: X is a number + PARAMETER: Y is a number +DESCRIPTION: The larger of the parameters. +------------------------------------------------------------ + SYNTAX: N = MAXBYT +DESCRIPTION: The largest finite positive number + representable as a BYTE; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXCUR +DESCRIPTION: The largest finite positive number + representable as a CURRENCY; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXDBL +DESCRIPTION: The largest finite positive number + representable as a DOUBLE; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXDEV +DESCRIPTION: The largest finite positive number useable as + a FILE NUMBER; implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXINT +DESCRIPTION: The largest finite positive number + representable as an INTEGER; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXLEN +DESCRIPTION: The maximum string length. +------------------------------------------------------------ + SYNTAX: N = MAXLEN( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +DESCRIPTION: The maximum length associated with the + simple-string-variable A$. +------------------------------------------------------------ + SYNTAX: N = MAXLNG +DESCRIPTION: The largest finite positive number + representable as a LONG; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MAXLVL +DESCRIPTION: The maximum stack level; + implementation-defined. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + SYNTAX: N = MAXSNG +DESCRIPTION: The largest finite positive number + representable as a SINGLE; + implementation-defined. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = MIN( X, Y ) + PARAMETER: X is a number + PARAMETER: Y is a number +DESCRIPTION: The smaller of the parameters. +------------------------------------------------------------ + SYNTAX: S$ = MIN( A$, B$ ) + PARAMETER: A$ is a string, LEN >= 0 + PARAMETER: B$ is a string, LEN >= 0 +DESCRIPTION: The smaller of the parameters. +------------------------------------------------------------ + SYNTAX: N = MINBYT +DESCRIPTION: The largest finite negative number + representable as a BYTE; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MINCUR +DESCRIPTION: The largest finite negative number + representable as a CURRENCY; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MINDBL +DESCRIPTION: The largest finite negative number + representable as a DOUBLE; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MINDEV +DESCRIPTION: The largest finite negative number useable as + a FILE NUMBER; implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MININT +DESCRIPTION: The largest finite negative number + representable as an INTEGER; + implementation-defined. +------------------------------------------------------------ + SYNTAX: N = MINLNG +DESCRIPTION: The largest finite negative number + representable as a LONG; + implementation-defined. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + SYNTAX: N = MINSNG +DESCRIPTION: The largest finite negative number + representable as a SINGLE; + implementation-defined. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = MKD$( X ) + PARAMETER: X is a number, [MINDBL,MAXDBL] +DESCRIPTION: The internal representation of X as a string. +------------------------------------------------------------ + SYNTAX: N = MKDIR( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: Makes the directory named in A$. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = MKS$( X ) + PARAMETER: X is a number, [MINFLT,MAXFLT] +DESCRIPTION: The internal representation of X as a string. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: N = NOFLOW +DESCRIPTION: Turn tracing OFF +------------------------------------------------------------ + SYNTAX: N = NULL( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: Appends X null characters after each line + printed by LPRINT or LLIST. +------------------------------------------------------------ + SYNTAX: N = NUM +DESCRIPTION: The number of values processed by the last MAT + INPUT. Zero means error. +------------------------------------------------------------ + SYNTAX: N = NUM( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +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, NUM( " 123.5 " ) = 123.5, NUM( + "2.E-99" ) could be zero, and NUM( "MCMXVII" + ) causes an exception. +------------------------------------------------------------ + SYNTAX: S$ = NUM$( X ) + PARAMETER: X is a number +DESCRIPTION: The string generated by the print-statement as + the numeric-representation of the value + associated with X. +------------------------------------------------------------ + SYNTAX: S$ = OCT$( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The the octal (base 8) representation of X. +------------------------------------------------------------ + SYNTAX: N = OPEN( A$, X, B$ ) + PARAMETER: A$ is a string, LEN >= 1 + PARAMETER: X is a number, [MININT,MAXINT] + 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. +------------------------------------------------------------ + SYNTAX: N = OPEN( A$, X, B$, Y ) + PARAMETER: A$ is a string, LEN >= 1 + PARAMETER: X is a number, [MININT,MAXINT] + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = PAUSE( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then PAUSE + does nothing. The resolution is + implementation defined. +------------------------------------------------------------ + SYNTAX: N = PEEK( X ) + PARAMETER: X is a number, [MINLNG,MAXLNG] +DESCRIPTION: The value read from hardware address X. + Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = PI +DESCRIPTION: The constant 3.14159 which is the ratio of the + circumference of a circle to its diameter. +------------------------------------------------------------ + SYNTAX: N = PI( X ) + PARAMETER: X is a number +DESCRIPTION: The constant 3.14159 which is the ratio of the + circumference of a circle to its diameter, + times X. +------------------------------------------------------------ + 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. Causes ERROR + 73. +------------------------------------------------------------ + SYNTAX: N = POS +DESCRIPTION: The current cursor position in the line. +------------------------------------------------------------ + SYNTAX: N = POS( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The current cursor position in the line for + file X. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = PUT( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: For file X, puts the next available record. +------------------------------------------------------------ + SYNTAX: N = PUT( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [MININT,MAXINT] +DESCRIPTION: For file X, puts record number Y. The first + record number is 1. +------------------------------------------------------------ + SYNTAX: N = RAD +DESCRIPTION: Configures the math functions to accept and + return angles in radians. +------------------------------------------------------------ + SYNTAX: N = RAD( X ) + PARAMETER: X is a number +DESCRIPTION: The number of radians in X degrees. +------------------------------------------------------------ + SYNTAX: N = RADIAN +DESCRIPTION: Configures the math functions to accept and + return angles in radians. +------------------------------------------------------------ + SYNTAX: N = RANDOMIZE +DESCRIPTION: Seeds the pseudo-random number generator with + TIME. +------------------------------------------------------------ + SYNTAX: N = RANDOMIZE( X ) + PARAMETER: X is a number +DESCRIPTION: Seeds the pseudo-random number generator with + X. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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 + LEFT$(A$,1); X > 0. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = RESET +DESCRIPTION: Close all open files. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: N = RMDIR( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: Removes the directory named in A$. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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]. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = SEC( X ) + PARAMETER: X is a number +DESCRIPTION: The secant of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = SEEK( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The location of file X; the next record that + GET or PUT statements will use. +------------------------------------------------------------ + SYNTAX: N = SEEK( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [MININT,MAXINT] +DESCRIPTION: For file X, move to record number Y; the first + record number is 1. +------------------------------------------------------------ + SYNTAX: S$ = SEG( 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. +------------------------------------------------------------ + SYNTAX: S$ = SEG$( 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = SHELL( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The exit code resulting from the execution of + an operating system command. +------------------------------------------------------------ + SYNTAX: N = SIN( X ) + PARAMETER: X is a number +DESCRIPTION: The sine of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = SIND( X ) + PARAMETER: X is a number +DESCRIPTION: The sine of X, where X is in degrees. +------------------------------------------------------------ + SYNTAX: N = SING( X ) + PARAMETER: X is a number +DESCRIPTION: The sine of X, where X is in gradians. +------------------------------------------------------------ + SYNTAX: N = SINH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic sine of X. +------------------------------------------------------------ + SYNTAX: N = SLEEP( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then SLEEP + does nothing. The resolution is + implementation defined. +------------------------------------------------------------ + SYNTAX: N = SNH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic sine of X. +------------------------------------------------------------ + SYNTAX: S$ = SPACE$( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X blank spaces. +------------------------------------------------------------ + SYNTAX: S$ = SPC( X ) + PARAMETER: X is a number +DESCRIPTION: The string of X spaces. Only for use within + the PRINT command. +------------------------------------------------------------ + SYNTAX: N = SQR( X ) + PARAMETER: X is a number, >= 0 +DESCRIPTION: The non-negative square root of X; X shall be + non-negative. +------------------------------------------------------------ + SYNTAX: S$ = STR( 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). +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = TAN( X ) + PARAMETER: X is a number +DESCRIPTION: The tangent of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = TAND( X ) + PARAMETER: X is a number +DESCRIPTION: The tangent of X, where X is in degrees. +------------------------------------------------------------ + SYNTAX: N = TANG( X ) + PARAMETER: X is a number +DESCRIPTION: The tangent of X, where X is in gradians. +------------------------------------------------------------ + SYNTAX: N = TANH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic tangent of X. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + 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". +------------------------------------------------------------ + SYNTAX: S$ = TIME$( X ) + PARAMETER: X is a number +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". The value of X is + ignored. +------------------------------------------------------------ + SYNTAX: N = TIMER +DESCRIPTION: The time in the system clock in seconds + elapsed since midnight. +------------------------------------------------------------ + SYNTAX: S$ = TRIM$( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +DESCRIPTION: The string resulting from removing both + leading and trailing spaces from A$. +------------------------------------------------------------ + SYNTAX: N = TROFF +DESCRIPTION: Turn tracing OFF +------------------------------------------------------------ + SYNTAX: N = TRON +DESCRIPTION: Turn tracing ON +------------------------------------------------------------ + 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]. +------------------------------------------------------------ + SYNTAX: N = UBOUND( ... ) +DESCRIPTION: UBOUND( arrayname [, dimension] ). The upper + bound of the array. The dimension defaults + to 1. dimension in [1,DIM(arrayname)] +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = WAIT( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then WAIT does + nothing. The resolution is implementation + defined. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = WIDTH( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [0,255] +DESCRIPTION: If X = 0, sets the console width to Y. + If X < 0, sets the printer width to Y. + If X is an open file number, sets the file + line width to Y. + Otherwise sets the console rows to X and the + line width to Y. + A value of zero for Y means no wrapping will + occur. +------------------------------------------------------------ + + +============================================================ + OPERATORS +============================================================ + + +------------------------------------------------------------ + SYNTAX: X ** Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: X [ Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: X ^ Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: # X +DESCRIPTION: Posation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: + X +DESCRIPTION: Posation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: - X +DESCRIPTION: Negation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: X * Y +DESCRIPTION: Multiplication + PRECEDENCE: 12 +------------------------------------------------------------ + SYNTAX: X / Y +DESCRIPTION: Division + PRECEDENCE: 12 +------------------------------------------------------------ + SYNTAX: X \ Y +DESCRIPTION: Integer Division + PRECEDENCE: 11 +------------------------------------------------------------ + SYNTAX: X MOD Y +DESCRIPTION: Integer Modulus + PRECEDENCE: 10 +------------------------------------------------------------ + SYNTAX: X + Y +DESCRIPTION: Addition + PRECEDENCE: 9 +------------------------------------------------------------ + SYNTAX: X - Y +DESCRIPTION: Subtraction + PRECEDENCE: 9 +------------------------------------------------------------ + SYNTAX: X & Y +DESCRIPTION: Concatenation + PRECEDENCE: 8 +------------------------------------------------------------ + SYNTAX: X < Y +DESCRIPTION: Less than + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X <= Y +DESCRIPTION: Less than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X <> Y +DESCRIPTION: Not Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X = Y +DESCRIPTION: Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X =< Y +DESCRIPTION: Less than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X => Y +DESCRIPTION: Greater than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X > Y +DESCRIPTION: Greater than + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X >< Y +DESCRIPTION: Not Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X >= Y +DESCRIPTION: Greater than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: A$ LIKE B$ +DESCRIPTION: Compare A$ to the pattern in B$ + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: NOT X +DESCRIPTION: Bitwise NOT + PRECEDENCE: 6 +------------------------------------------------------------ + SYNTAX: X AND Y +DESCRIPTION: Bitwise AND + PRECEDENCE: 5 +------------------------------------------------------------ + SYNTAX: X OR Y +DESCRIPTION: Bitwise OR + PRECEDENCE: 4 +------------------------------------------------------------ + SYNTAX: X XOR Y +DESCRIPTION: Bitwise Exclusive OR + PRECEDENCE: 3 +------------------------------------------------------------ + SYNTAX: X EQV Y +DESCRIPTION: Bitwise EQV + PRECEDENCE: 2 +------------------------------------------------------------ + SYNTAX: X IMP Y +DESCRIPTION: Bitwise IMP + PRECEDENCE: 1 +------------------------------------------------------------ + + diff --git a/Bwbasic-changelog.txt b/Bwbasic-changelog.txt new file mode 100644 index 0000000..669448c --- /dev/null +++ b/Bwbasic-changelog.txt @@ -0,0 +1,476 @@ + + + README file for + + + Bywater BASIC Interpreter, version 3.20b + --------------------------------------------------------- + + Copyright (c) 1993, Ted A. Campbell + for bwBASIC version 2.10, 11 October 1993 + + Version 2.20 modifications by Jon B. Volkoff, + 25 November 1995 + + Patch level 1 release by Jon B. Volkoff, + 15 March 1996 + + Patch level 2 release by Jon B. Volkoff, + 11 October 1997 + + Version 2.30 modifications by Paul Edwards, + 5 March 2008 + + Version 2.40 modifications by Paul Edwards, + 26 Jan 2009 + + Version 2.50 modifications by Paul Edwards, + 4 June 2009 + + Version 2.60 modifications by Paul Edwards, + 6 November 2012 + + Version 2.61 modifications by Paul Edwards, + 4 August 2014 + + Version 3.00 modifications by Howard Wulf, AF5NE + 12 May 2015 + + Version 3.10 modifications by Howard Wulf, AF5NE + 27 July 2016 + + Version 3.20 modifications by Howard Wulf, AF5NE + 4 June 2017 + + Version 3.20b modifications by Ken Unix + December 2019 + +DESCRIPTION: + + The Bywater BASIC Interpreter (bwBASIC) implements a large + superset of the ANSI Standard for Minimal BASIC (X3.60-1978), + a significant subset of the ANSI Standard for Full BASIC + (X3.113-1987), and many classic BASIC dialects in C. bwBASIC + seeks to be as portable as possible. + + This version of Bywater BASIC is released under the terms of the + GNU General Public License (GPL), which is distributed with this + software in the file "COPYING". The GPL specifies the terms + under which users may copy and use the software in this distribution. + + A separate license is available for commercial distribution, + for information on which you should contact the author. + + +A LIST OF BASIC COMMANDS AND FUNCTIONS IMPLEMENTED in bwBASIC: + + The complete list of over 500 commands, functions and operators is + in the file "ALL.txt" in the DOCS directory. Documentation for each + dialect is also in the DOCS directory. Be aware that the commands, + functions and operators available depend upon the particular BASIC + dialect selected using the OPTION VERSION command. + + +CHANGE HISTORY + +CHANGES FROM 3.20 to 3.20b + + Tightened source code for Debian on Beaglebone and Debian on C.H.I.P. + 'deb' files are available for AMD_64 and ARMF_32 bit processors. + Changed handling of EDIT copy under DOS/Widows and Linux. + +CHANGES FROM 3.10 to 3.20 + + * Implements most of the following BASIC dialects: + OPTION VERSION "BYWATER" ' Bywater BASIC 3 Default + OPTION VERSION "BYWATER-2" ' Bywater BASIC 2 + OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC + OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M + OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC + OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC + OPTION VERSION "ECMA-116" ' ANSI Full BASIC + OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC + OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt + OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition + OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition + OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC + OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC + OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC + OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix + OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC + OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC + OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX + OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS + OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC + OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC + OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC + OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1 + OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX + + * CONST variable [, ...] = value + Assigns the value to variable. + Any later assignment to the variable causus a VARIABLE NOT DECLARED error. + + * DIM now supports lower and upper bounds. + OPTION BASE 1 + DIM X( 9 ) ' lower bound is 1 + DIM Y( 5 TO 9 ) ' lower bound is 5 + + * DIM now supports virtual variables. + OPTION BASE 1 + OPEN "VIRTUAL.DAT" FOR VIRTUAL AS # 3 ' virtual data file + DIM # 3, A( 1000 ) ' array is virtual + LET A( 1000 ) = 0 ' value is written to the file + LET X = A( 1000 ) ' value is read from the file + CLOSE # 3 ' array is no longer valid + + * ERROR 27, "Bad DATA" + Occurs when the READ command detects garbage in a DATA command. + + * INPUT LINE + Same as LINE INPUT. + + * MAT now supports lower and upper bounds. + OPTION BASE 1 + MAT X( 9 ) = ZER ' lower bound is 1 + MAT Y( 5 TO 9 ) = ZER ' lower bound is 5 + MAT X = ZER( 9 ) ' lower bound is 1 + MAT Y - ZER( 5 TO 9 ) ' lower bound is 5 + + * MAXLEN() + Returns the maximum string length. + + * OPTION DIGITS integer + Sets the number of significant digits for PRINT. + Setting the value to zero restores the default. + + * OPTION EDIT string$ + Sets the program name used by the EDIT command. + Example OPTION EDIT "notepad" for DOS/Windows + Example OPTION EDIT "nano" for Linux + Setting this to "" disables EDIT command. + + * OPTION FILES string$ + Sets the program name used by the FILES command. + Setting this to "" disables FILES command. + + * OPTION PROMPT string$ + Sets the prompt. + + * OPTION PUNCT AT char$ + Sets the PRINT AT character, commonly "@". + Setting this to "" disables PRINT AT. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT BYTE char$ + Sets the BYTE type suffix, commonly "~". + Setting this to "" disables BYTE suffix. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT COMMENT char$ + Sets the trailing COMMENT character, commonly "'". + Setting this to "" disables trailing comments. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT CURRENCY char$ + Sets the CURRENCY type suffix, commonly "@". + Setting this to "" disables CURRENCY suffix. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT DOUBLE char$ + Sets the DOUBLE type suffix, commonly "#". + Setting this to "" disables DOUBLE suffix. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT FILENUM char$ + Sets the FILE NUMBER prefix, commonly "#". + Setting this to "" disables the FILE NUMBER prefix. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT IMAGE char$ + Sets the shortcut IMAGE character, commonly ":". + Setting this to "" disables the shortcut IMAGE character. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT INPUT char$ + Sets the shortcut INPUT character, commonly "!". + Setting this to "" disables the shortcut INPUT character. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT INTEGER char$ + Sets the INTEGER type suffix, commonly "%". + Setting this to "" disables INTEGER suffix. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT LONG char$ + Sets the LONG type suffix, commonly "&". + Setting this to "" disables LONG suffix. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT LPAREN char$ + Sets the LEFT PARENTHESIS character, commonly "(". + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT PRINT char$ + Sets the shortcut PRINT character, commonly "?". + Setting this to "" disables the shortcut PRINT character. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT QUOTE char$ + Sets the QUOTE character, commonly """". + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT RPAREN char$ + Sets the RIGHT PARENTHESIS character, commonly ")". + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT SINGLE char$ + Sets the SINGLE type suffix, commonly "!". + Setting this to "" disables SINGLE suffix. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT STATEMENT char$ + Sets the shortcut STATEMENT seperator character, commonly ":". + Setting this to "" disables the STATEMENT seperator. + Setting this to a non-punctuation character is not supported. + + * OPTION PUNCT STRING char$ + Sets the STRING type suffix, commonly "$". + Setting this to "" disables STRING suffix. + Setting this to a non-punctuation character is not supported. + + * OPTION RECLEN integer + Sets the default record length for RANDOM files, commonly 128. + Setting thisto zero means there is no default RANDOM record + length, so the record length must be specified in the OPEN + statement. + With OPTION RECLEN 128: + OPEN "FILE.DAT" FOR RANDOM AS #3 + is considered to be the same as + OPEN "FILE.DAT" FOR RANDOM AS #3 LEN 128 + With OPTION RECLEN 0: + OPEN "FILE.DAT" FOR RANDOM AS #3 + causes an error. + + * OPTION RENUM string$ + Sets the program name used by the RENUM command. + By default this is disabled. + Setting this to "" disables RENUM command. + + * OPTION SCALE integer + Sets the number of digits to round after the decimal point for PRINT. + Setting the value to zero disables rounding. + + * OPTION USING DIGIT + * OPTION USING COMMA + * OPTION USING PERIOD + * OPTION USING PLUS + * OPTION USING MINUS + * OPTION USING EXRAD + * OPTION USING DOLLAR + * OPTION USING FILLER + * OPTION USING LITERAL + * OPTION USING FIRST + * OPTION USING ALL + * OPTION USING LENGTH + Sets the characters recognized by PRINT USING. + Setting these to a non-punctuation character is not supported. + + * OPTION VERSION now requires a string instead of a literal. + Some version names have changed. + + * OPTION VERSION "PDP-8" + Added LPT, PTP, PTR, TTY, TTY IN and TTY OUT commands. + Added GET() and PUT() functions. + + * OPTION VERSION "CALL/360" + * OPTION VERSION "SYSTEM/360" + * OPTION VERSION "SYSTEM/370" + Added alphabet extenders. $ is a string variable. + + * OPTION ZONE integer + Sets the PRINT zone width. + Setting the value to zero restores the default. + + * REPEAT - UNTIL added + REPEAT + ... + EXIT REPEAT + ... + UNTIL expression ' exits when expression != 0 + + * SPC( X ) and TAB( X ) + No longer use control codes. + + * UNTIL - UEND removed (to add REPEAT - UNTIL) + Here is a work-around for existin code using UNTIL-UEND: + UNITL expression -->> WHILE NOT expression + ... ... + EXIT UNTIL -->> EXIT WHILE + ... ... + UEND -->> WEND + + * from Howard Wulf, AF5NE + + +CHANGES FROM 3.00 to 3.10 + + * Implements most of the following BASIC dialects: + OPTION VERSION DARTMOUTH ' Dartmouth DTSS BASIC + OPTION VERSION MARK-I ' GE 265 Mainframe BASIC + OPTION VERSION MARK-II ' GE 435 Mainframe BASIC + OPTION VERSION SYSTEM-360 ' IBM System/360 BASIC + OPTION VERSION SYSTEM-370 ' IBM System/370 BASIC + OPTION VERSION CBASIC-II ' CBASIC-II for CP/M + OPTION VERSION ECMA-55 ' ANSI Minimal BASIC + OPTION VERSION HANDBOOK1 ' The BASIC Handbook, 1st Edition + OPTION VERSION HANDBOOK2 ' The BASIC Handbook, 2nd Edition + OPTION VERSION TRS-80 ' TRS-80 Model I/III/4 LBASIC + OPTION VERSION BASIC-80 ' Microsoft BASIC-80 for Xenix + OPTION VERSION ECMA-116 ' ANSI Full BASIC + + * from Howard Wulf, AF5NE + + +CHANGES FROM 2.61 to 3.00 + + * Code redesign from Howard Wulf, AF5NE + + +CHANGES FROM 2.60 to 2.61 + + * Bug fix from Matthias Rustler + + +CHANGES FROM 2.50 to 2.60 + + * New maths functions and append mode support from Edmond Orignac + + * Bug fixes + + +CHANGES FROM 2.40 to 2.50 + + * Bug fixes + + * New compilation procedure for MVS and CMS + + +CHANGES FROM 2.30 to 2.40 + + * Bug fixes from Bill Chatfield + + * Updated documentation + + * Added support for compiling on CMS (another IBM mainframe OS) + + +CHANGES FROM 2.20pl2 to 2.30 + + * Minor bug fixes, cosmetic improvements and portability improvements + + * Added support for compiling on MVS (IBM mainframe) + + +CHANGES FROM 2.20pl1 to 2.20pl2 + +bwb_cmd.c + Fixed calling stack level logic in RETURN statement to prevent erroneous + "RETURN without GOSUB" messages. + +bwb_cnd.c +bwb_stc.c + + Changed continuation condition for WHILE, ELSEIF, and LOOP UNTIL + to be != FALSE, not == TRUE. More in line with common commercial + BASIC implementations. + +bwb_mth.c + Fixed initialization in VAL function so that old results are not later + returned as values. + +bwb_var.c + Added parenthesis level checking to dim_getparams. Using multi-level + expressions as array subscripts was causing the program to bomb. + +bwx_iqc.c +bwx_tty.c +bwb_mes.h + Added second copyright notice. + +bwb_dio.c +bwb_str.c + Added support for strings longer than 255 characters. + +bwb_prn.c + Disabled tab expansion and print width checks when not printing to a file. + +bwb_inp.c + Fixed LINE INPUT file reads to accommodate strings of length MAXSTRINGSIZE. + +bwx_ncu.h +bwx_ncu.c + New files. Code for UNIX ncurses interface, compliments of L.C. Benschop, + Eindhoven, The Netherlands. + +Makefile.ncu + New files. Sample makefile for ncurses implementation. + +bwbasic.h + Revised defines for MININTSIZE and MAXINTSIZE from 16-bit to 32-bit limits. + Revised define for MAXSTRINGSIZE from 255 to 5000 characters. + Changed string length from unsigned char to unsigned int to support strings + longer than 255 characters. + Added support for new ncurses package. + Revised VERSION define to reflect above changes. + + +CHANGES FROM 2.20 to 2.20pl1 + +bwb_cnd.c + + Moved init routine for bwb_while so that it would be initialized regardless + of expression value, not just if TRUE. This was causing some segmentation + faults in WHILE-WEND loops. + +bwb_elx.c + + Plugged gaping memory leak. Temp variable space for expression evaluation + was being allocated but not freed when done (oops!). + +bwb_fnc.c + + Added check for NULL return from getenv to prevent segmentation faults. + +bwbasic.h + Revised VERSION define to reflect above changes. + + + +CHANGES FROM 2.10 to 2.20: + + * Plugged numerous memory leaks, resolved memory overruns and allocation + difficulties. + + * General cleanup and bug fixes, too many to list in detail here. + The major problem areas addressed were: + + - RUN command with file name argument + - nested and cascaded FOR-NEXT loops + - PRINT USING + - EOF, LOF functions + - string concatenation + - operator hierarchy + - multi-level expression evaluation + - hex constant interpretation + - hex and octal constants in INPUT and DATA statements + + * Added a CLOSE all files feature (when no argument supplied). + + * Added a unary minus sign operator. + + * Added a MID$ command to complement the MID$ function. + + * Added a RENUM facility in a standalone program. + + * Added checking in configure for unistd.h (important on Sun systems). diff --git a/Bwbasic.doc b/Bwbasic.doc new file mode 100644 index 0000000..44707de --- /dev/null +++ b/Bwbasic.doc @@ -0,0 +1,1156 @@ + + Bywater BASIC Interpreter, version 3.20 + --------------------------------------------- + + Copyright (c) 1993, Ted A. Campbell + for bwBASIC version 2.10, 11 October 1993 + + Copyright (c) 2014-2015, Howatd Wulf, AF5NE + for bwBASIC version 3.00, 12 May 2015 + + Copyright (c) 2015-2016, Howatd Wulf, AF5NE + for bwBASIC version 3.10, 27 July 2016 + + Copyright (c) 2016-2017, Howatd Wulf, AF5NE + for bwBASIC version 3.20, 4 June 2017 + +CONTENTS: + + + 1. DESCRIPTION + 2. TERMS OF USE + 3. QUICK REFERENCE LIST OF COMMANDS, FUNCTIONS AND OPERATORS + 4. GENERAL NOTES ON USAGE + 5. PREDEFINED VARIABLES + 6. UNIMPLEMENTED COMMANDS AND FUNCTIONS + and AGENDA FOR DEVELOPMENT + 7. THE STORY OF Bywater BASIC + 8. COMMUNICATIONS + 9. EXPANDED REFERENCE FOR COMMANDS, FUNCTIONS AND OPERATORS + + The author wishes to express his thanks to Mr. David MacKenzie, + who assisted in the development Unix installation and configuration + for this version. + +1. DESCRIPTION + + + The Bywater BASIC Interpreter (bwBASIC) implements a large superset + of the ANSI Standard for Minimal BASIC (X3.60-1978) and a significant + subset of the ANSI Standard for Full BASIC (X3.113-1987), and many + classic BASIC dialects in C. + + bwBASIC can be configured to enable commands, functions, operators + and punctuation characters available in many classic dialects of BASIC; + these are controlled by various OPTION commands. bwBASIC does not attempt + bug-level compatibility with any particular BASIC dialect nor does it + currently support graphics. bwBASIC seeks to be as portable as possible. + + The interpreter is fairly slow. Whenever faced with a choice + between conceptual clarity and speed, I have consistently chosen the + former. The interpreter is the simplest design available, and + utilizes no system of intermediate code, which could speed up + considerably its operation. As it is, each line has only one + command. Multi-statement lines are internally broken into distinct + lines as they are loaded. + + +2. TERMS OF USE: + + + This version of Bywater BASIC is released under the terms of the + GNU General Public License (GPL), which is distributed with this + software in the file "COPYING". The GPL specifies the terms under + which users may copy and use the software in this distribution. + + A separate license is available for commercial distribution, + for information on which you should contact the author. + + +3. QUICK REFERENCE LIST OF COMMANDS, FUNCTIONS AND OPERATORS + + + The complete list of over 500 commands, functions and operators is + in the file "ALL.txt" in the DOCS directory. Documentation for each + BASIC dialect is in the other text files in the DOCS directory. + + A BASIC dialect is a selection of commands, functions, operators, + punctuation characters and other behaviors. The OPTION VERSION + command is used to choose a specific BASIC dialect. Additional + OPTION commands are available to fine-tune the behavior. + + In bwBASIC, any function can be executed as a command. For example, + the function "OUT(X, Y)" can be executed as the command "OUT X, Y". + You can overload functions by parameter signature (the number + and types of parameters), and user defined functions can replace + any instrinsic function, including INP, OUT, PEEK, POKE, and WAIT. + + +4. GENERAL NOTES ON USAGE: + + + 4.a. Interactive Environment + + + An interactive environment is provided if the flag INTERACTIVE + is defined as TRUE in bwBASIC.h, so that a line with a + line number can be entered at the bwBASIC prompt and it will be + added to the program in memory. + + Line numbers are not strictly required, but are useful if the + interactive enviroment is used for programming. For longer + program entry one might prefer to use an ASCII text editor, and + in this case lines can be entered without numbers. See also the + documentation below for the pseudo-command EDIT, in section 5. + + + 4.b. Naming Conventions + + + Command, function, label, and variable names are not case sensitive, + so that "Run" and "RUN" and "run" are equivalent. + + The characters allowed in variable names depends upon the specific + BASIC dialect selected with the OPTION VERSION command. Usually, + variable names can use any alphabetic characters, the period + and underscore characters and decimal digits (but not in the + first position) and they can be terminated with the various numeric + type characters (!,@,#,%,&,~) or the string type character ($). + + + 4.c. Numerical Constants + + + Numerical constants may begin with a digit 0-9 (decimal), with + the "&H" or "&h" (hexadecimal) or the "&o" or "&O" (octal). + Numerical constants may include 'E' or 'e' followed by an + exponent number to denote exponential notation. Numerical + constants may also be terminated by the various numeric type + characters (!,@,#,%,&,~). + + + 4.d. Command-Line Execution + + + A filename can be specified on the command line and will be + loaded and executed immediately, so that the command line + + bwBASIC prog.bas + + will load and execute "prog.bas". If a program is executed + from the command line, control is returned to the operating + system when the program terminates. + + + 4.e. Program Storage + + + All programs are stored as ASCII text files. + + + 4.f. TRUE and FALSE + + + TRUE is defined as -1 and FALSE is defined as 0 in the default + distribution of bwBASIC. Alhtough these definitions can be changed + by those compiling bwBASIC (see file bwBASIC.h), any other values + are not supported. + + + 4.g. Assignments + + + Assignment must be made to variables. This differs from some + implementations of BASIC where assignment can be made to a + function. Implication: "INSTR( 3, x$, y$ ) = z$" will not + work under bwBASIC. The command "MID$(X$,...) = ..." is + implemented and should be used instead. + + Some BASIC dialects allow the multiple variable assignments, + such as: + 100 LET A = B = C = 0 + In bwBASIC, only the first '=' is considered an assignment. + All other '=' are considered comparison operators. To resolve + this issue, use commas to seperate the variables, such as: + 100 LET A, B, C = 0 + If these statements are only used to initialize the variable + values, then they may not needed in bwBASIC, since all numeric + variables are initialized to zero (0) and all string variables + are initialized to the empty string (""). + + + 4.h. Operators and Precedence + + + The available operators are determined by the OPTION VERSION + setting. bwBASIC recognizes many operators, with their level of + precedence fixed. The precedence levels chosen for the various + operators in bwBASIC were selected to be compatible with many + dialects of BASIC. If your application requires a specific order + of evaluation, then use parentheses. + + The collating sequence (ASCII, EBCDIC, and so on) is determined + by the C compiler. As a consequenece, the results of string + comparisons may vary. A simple check for collating sequence is + shown in the following example: + + 100 REM Purpose: Verify collating sequence (sort order) + 110 REM Author: Howard Wulf, AF5NE + 120 REM Date: 2015-11-28 + 130 REM + 200 IF "1" < "A" THEN 300 + 210 PRINT "EBCDIC" + 220 GOTO 999 + 300 PRINT "ASCII" + 999 END + + + 4.i. Numerical Precision (NOT) + + + bwBASIC utilizes numbers with only one level of precision. + All numbers are internally represented using a C double. + + The various numeric type suffix characters (!,@,#,%,&,~), + just like the string type suffix character ($), are part + of the variable name. + + This version also supports type declarations, such as: + 100 DIM X AS INTEGER + 110 FUNCTION ABC( X AS INTEGER ) AS INTEGER + 120 LET ABC = X * 2 + 130 END FUNCTION + + For each type character there is an equivalent type declaration. + Type Equivalent + Char declaration + ==== =========== + $ STRING + # DOUBLE + ! SINGLE + @ CURRENCY + & LONG + % INTEGER + ~ BYTE + + However, combining both a type suffix character and a type + declaration in the same statement is not supported. + 100 DIM A$ AS INTEGER ' this is not supported + + The type of a variable is used to range-check the values. + This allows many programs to run correctly, but does not + handle all possible cases. The current implementation is not + complete for all possible uses of numeric type declarations. + + In the current version, the type of numeric values is used + to select the appropriate operation. As a consequence, + integer division is used when dividing two integer values. + The MOD and \ operators use the rounded integer values of + their parameters and return a rounded integer result. + + Within an expression, the result of an operation is promoted + to the greater of: + the type of the left parameter, + the type of the right parameter, and + the type required to hold the result. + + In bwBASIC, numeric constants are DOUBLE by default. If you + wish to coerce a numeric constant, then add the appropriate + numeric type character immediately after the numeric digits. + Many BASIC dialects that allow numeric constants to have a + numeric type character adopt this convention. + + + 4.j. OPTION VERSION and so on + + + OPTION commands change how a BASIC program is parsed. All OPTION commands + should be in "profile.bas" so they are effective when a BASIC program + is loaded. The first OPTION command should be OPTION VERSION to select a + specific BASIC dialect. Additional OPTION commands fine-tune the available + commands, functions, operators, punctuation characters and so on to support + programs written in many different BASIC dialects. All other OPTION commands + must follow the OPTION VERSION command. Conflicting and pathological OPTION + combinations are not supported. + + The OPTION VERSION command selects a specific BASIC dialect. + OPTION VERSION "BYWATER" ' Bywater BASIC 3 + OPTION VERSION "BYWATER-2" ' Bywater BASIC 2 + OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC + OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M + OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC + OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC + OPTION VERSION "ECMA-116" ' ANSI Full BASIC + OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC + OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt + OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition + OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition + OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC + OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC + OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC + OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix + OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC + OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC + OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX + OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS + OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC + OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC + OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC + OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1 + OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX + + For example, MOD is a function in OPTION VERSION "ECMA-116", + MOD is an operator in OPTION VERSION "MBASIC", and + MOD is a valid variable name in OPTION VERSION "CALL/360". + + The OPTION VERSION command also sets the following OPTION commands: + OPTION STRICT ON | OFF + OPTION ANGLE DEGREES | RADIANS | GRADIANS + OPTION BUGS ON | OFF + OPTION LABELS ON | OFF + OPTION COMPARE BINARY | DATABASE | TEXT + OPTION BASE integer + OPTION RECLEN integer + OPTION COVERAGE ON | OFF + OPTION TRACE ON | OFF + OPTION ERROR GOTO | GOSUB + OPTION DATE "format" + OPTION TIME "format" + OPTION PUNCT COMMENT "char" + OPTION PUNCT STATEMENT "char" + OPTION PUNCT PRINT "char" + OPTION PUNCT IMAGE "char" + OPTION PUNCT INPUT "char" + OPTION USING DIGIT "char" + OPTION USING COMMA "char" + OPTION USING PERIOD "char" + OPTION USING PLUS "char" + OPTION USING MINUS "char" + OPTION USING EXRAD "char" + OPTION USING DOLLAR "char" + OPTION USING FILLER "char" + OPTION USING LITERAL "char" + OPTION USING FIRST "char" + OPTION USING ALL "char" + OPTION USING LENGTH "char" + OPTION PUNCT QUOTE "char" + OPTION PUNCT STRING "char" + OPTION PUNCT DOUBLE "char" + OPTION PUNCT SINGLE "char" + OPTION PUNCT CURRENCY "char" + OPTION PUNCT LONG "char" + OPTION PUNCT INTEGER "char" + OPTION PUNCT BYTE "char" + OPTION PUNCT LPAREN "char" + OPTION PUNCT RPAREN "char" + OPTION PUNCT FILENUM "char" + OPTION PUNCT AT "char" + + The commands, functions, operators and settings for each BASIC dialect + is documented in the text files in the DOCS directory. + + OPTION DISABLE COMMAND + Disable a specific command. + + OPTION DISABLE FUNCTION + Disable a specific function. + + OPTION DISABLE OPERATOR + Disable a specific operator. + + OPTION ENABLE COMMAND + Enable a specific command. + + OPTION ENABLE FUNCTION + Enable a specific function. + + OPTION ENABLE OPERATOR + Enable a specific operator. + + OPTION ERROR GOSUB + The program will GOSUB to the error handler. + The error handler exits with the RETURN command. + + OPTION ERROR GOTO + The program will GOTO to the error handler. + The error handler exits with the RESUME command. + + OPTION LABELS OFF + Disables textual labels. + + OPTION LABELS ON + Enables textual labels. + + Regardless of the OPTION LABELS setting, statements of the form + IF x THEN label + are not allowed, instead use the form + IF x THEN GOTO label + The reason for this rule is because + IF x THEN y + is considered to be the same as + IF x THEN + y + END IF + where "y" is a command, function, or subroutine. Many BASIC dialects + that allow textual labels adopt this convention. + + OPTION ROUND controls how floating point values are converted to + whole number values. OPTION ROUNG MATH rounds toward the nearest + whole number, with halves rounding up to the next larger whole number, + as commonly expected by many scientific applications. OPTION ROUND + BANK rounds halves to the even whole numbers, as commonly expected + by many financial applications. OPTION ROUND TRUNCATE truncates to + the next smaller whole number, as commonly expected by many + applications written for an integer BASIC. The selected rounding + method is used whenever a whole number is required, including: + a) selection value for ON ... GOTO and ON ... GOSUB + b) any function parameter requiring a whole number + c) array subscripts and dimensions + d) string positions and lengths + e) CINT() and similar + The OPTION ROUND command does not change the results of INT() or FIX(). + The default rounding method is OPTION ROUND BANK. + + A comparison of the different OPTION ROUND settings upon the results of CINT() + + BANK MATH TRUNCATE + X int(X) fix(X) cint(X) cint(X) cint(X) + -2.0 -2 -2 -2 -2 -2 + -1.6 -2 -1 -2 -2 -1 + -1.5 -2 -1 -2 -2 -1 + -1.4 -2 -1 -1 -1 -1 + -1.0 -1 -1 -1 -1 -1 + -0.6 -1 0 -1 -1 0 + -0.5 -1 0 0 -1 0 + -0.4 -1 0 0 0 0 + 0.0 0 0 0 0 0 + 0.4 0 0 0 0 0 + 0.5 0 0 0 1 0 + 0.6 0 0 1 1 0 + 1.0 1 1 1 1 1 + 1.4 1 1 1 1 1 + 1.5 1 1 2 2 1 + 1.6 1 1 2 2 1 + 2.0 2 2 2 2 2 + + The OPTION BUGS command determines the behavior of a number of BASIC keywords. + BASIC programs which rely on these behaviors are non-portable and non-standard. + I have considered several different names for this command, but have not yet + thought of a better short name. + + OPTION BUGS ON disables the ANSI/ECMA/ISO standard behavior: + + FOR ... ' values are evaluated left-to-right + GOTO X OF ... ' an invalid value for X falls thru without ERROR + GOSUB X OF ... ' an invalid value for X falls thru without ERROR + ON X GOTO ... ' an invalid value for X falls thru without ERROR + ON X GOSUB ... ' an invalid value for X falls thru without ERROR + X = VAL("X") ' returns zero without ERROR + INPUT X ' empty string returns zero without ERROR + INPUT X$ ' empty string returns "" without ERROR + INPUT X$ ' allows unquoted character strings + variable names ' period and underscore are allowed + variable types ' the type characters #!@&% are allowed + PRINT "a" X ' string concatenation is implied + 1.2% is 1 ' the type characters #!@&% are allowed + 1D1 is ERROR ' 'D' is not allowed as exponent seperator + + OPTION BUGS OFF enables the ANSI/ECMA/ISO standard behavior: + + FOR ... ' values are evaluated according to standard + GOTO X OF ... ' an invalid value for X is an ERROR + GOSUB X OF ... ' an invalid value for X is an ERROR + ON X GOTO ... ' an invalid value for X is an ERROR + ON X GOSUB ... ' an invalid value for X is an ERROR + X = VAL("X") ' raises an illegal function call (ERROR 5) + INPUT X ' empty string retries input + INPUT X$ ' empty string retries input + INPUT X$ ' unquoted character strings retries input + variable names ' period and underscore are not allowed + variable types ' the type characters #!@&% are not allowed + PRINT "a";X ' string concatenation is not implied + 1.2% is ERROR ' the type characters #!@&% are not allowed + 1D1 is ERROR ' 'D' is not allowed as exponent seperator + + + 4.k. ERROR handling + + + bwBASIC implements a simplified error handling strategy. + Errors are seperated into two categories: + + a) Fatal errors. These errors include: + - Unknown command + - FOR without NEXT + - NEXT without FOR + - WHILE without WEND + - WEND without WHILE + - and so on. + The program is scanned prior to running and if any of these errors is + detected, then the program is not allowed to run. If these errors + occur as the result of a DELETE or MERGE in a running program, then the + program is terminated. + + b) Non-fatal errors. If an error handler exists, then it is executed, + otherwise the default behaivor is performed. The correct action to + take in an error handler depends upon the specific application. + - Overflow (ERROR 6) + - the default behavior is to display a warning message. + - Division by zero (ERROR 11) + - the default behavior is to display a warning message. + - String too long (ERROR 15) + - the default behavior is to display a warning message. + - All other non-fatal errors + - the default behavior is to terminate the program. + + bwBASIC 2.61 used ON ERROR GOSUB for error trapping. + This version defaults to ON ERROR GOTO instead. + + + 4.l. Implementation rules for functions and commands + + + In many BASIC dialects, keywords are seperated into three distinct groups: + Commands, Statements, and Functions. In bwBASIC, keywords are seperated + into only two groups: Commands and Functions. A keyword documented as a + Command or Statament in a specific BASIC dialect may have been implemented + in bwBASIC as a Function. This is merely an implementation decision, which + may change in the future. Each keyword should only be used as described in + the reference document. The following rules are considered when deciding + whether a BASIC keyword is implemented as a command or a function: + + a) If the keyword requires significant parsing, + then it is implemented as a command. An example is "PRINT". + + b) If the keyword requires access to variables BYREF, + then it is implemented as a command. An example is "SWAP". + + c) If the keyword changes the flow of control, + then it is implemented as a command. An example is "GOTO". + + d) A function may be used as though it were a command, + but a command cannot be used as though it were a function. + + e) The BASIC program can redefine a function, + but the BASIC program cannot redefine a command. + + f) The BASIC program can overload a function, + but the BASIC program cannot overload a command. + + g) Other than semantics, there is no practical difference + between a BASIC function and a BASIC subroutine. The + return value of a BASIC subroutine, when called as a + function, is zero. Calling a BASIC function as if it + were a subroutine simply discards the return value. + + These rules were chosen to maintain compatibility with + many BASIC dialects. + + An example of the results of the above rules is "OUT". + Since "OUT" is implemented as a function, you may: + a) call it as a subroutine like this: + 100 OUT X, Y + b) call it as a function like this: + 100 LET N = OUT( X, Y ) ' N = 0 + c) redefine it as a subroutine like this: + SUB OUT( X, Y ) + REM ... + END SUB + d) redefine it as a function like this: + FUNCTION OUT( X, Y ) + REM ... + END FUNCTION + e) overload it using subroutines like these: + SUB OUT( X, Y ) + REM ... + END SUB + SUB OUT( X, A$ ) + REM ... + END SUB + SUB OUT( A$, X ) + REM ... + END SUB + SUB OUT( A$, B$ ) + REM ... + END SUB + f) overload it using functions like these: + FUNCTION OUT( X, Y ) + REM ... + END FUNCTION + FUNCTION OUT( X, A$ ) + REM ... + END FUNCTION + FUNCTION OUT( A$, X ) + REM ... + END FUNCTION + FUNCTION OUT( A$, B$ ) + REM ... + END FUNCTION + + + 4.m. Reference documentation + + + bwBASIC is preconfigured to support a number of specific BASIC dialects which were + implemented using the following references, however bwBASIC does not attempt to be + bug-level compatible and does not implement non-portable design choices. A manual + for each dialect is in the DOCS directory to make you aware that a specific keyword + is implemented, however you should refer to the reference document for a proper + understanding of how to use each keyword. There are many other good books which + describe these BASIC dialects in detail. + + OPTION VERSION "BYWATER" ' Bywater BASIC 3 + MANUAL: + BYWATER.TXT + + OPTION VERSION "BYWATER-2" ' Bywater BASIC 2 + MANUAL: + BYWATER-2.TXT + NOT IMPLEMENTED: + DO NUM, DO UNNUM + NOTES: + SUB MAIN is not automatically called. + CALL requires parentheses around the function/subroutine parameters, + so instead of + CALL abc 1, 2, 3 + use + CALL abc( 1, 2, 3 ) + + OPTION VERSION "CALL/360" ' SBC CALL/360 Mainframe BASIC + MANUAL: + CALL-360.TXT + NOT IMPLEMENTED: + MAT PRINT USING. + NOTES: + The APPENDIXES are implementation specific and are not supported. + + OPTION VERSION "CBASIC-II" ' CBASIC-II for CP/M + MANUAL: + CBASIC-II.TXT + ADDITIONAL INFORMATION: + "CBASIC Language Reference Manual, 2nd Edition" + by Diigital Research + (c) 1982, Diigital Research + http://bitsavers.trailing-edge.com/pdf/digitalResearch/cb80/ + CBASIC_Language_Reference_Manual_Oct82.pdf + NOT IMPLEMENTED: + CONSTAT%, CONCHAR% and compiler directives. + NOTES: + The APPENDIXES are implementation specific and are not supported. + The %INCLUDE directive is implemented, but only supports literal + unquoted filesnames without drive or directory, such as: + %INCLUDE LIBRARY.BAS + Note that the %INCLUDE directive is executed as a file is being loaded, + and as a result the %INCLUDE does not appear in the resulting listing. + Machine language functions and commands are not supported. + The parsing of command line parameters is implementation defined. + The specification of an array in a COMMON statement is the same as + the specification in a DIM statement. + The SIZE() function assumes 1024 bytes and does not support wild-cards; + if the file does not exist then SIZE() returns zero, otherwise SIZE() + returns the number of 1024 bytes blocks required to contain the file; + an existing file of zero bytes returns a value of 1. + + OPTION VERSION "DARTMOUTH" ' Dartmouth DTSS BASIC + MANUAL: + DARTMOUTH.TXT + NOTES: + The APPENDICES are implementation specific and are not supported. + Sections 4.2 and 4.3 are implementation specific and are not supported. + Lines containing data to be READ must have a line number and a DATA command. + NOT IMPLEMENTED: + Card punch codes are not supported, use a comma or semicolon instead. + + OPTION VERSION "ECMA-55" ' ANSI Minimal BASIC + MANUAL: + ECMA-55.TXT + NOTES: + The APPENDICES are implementation specific and are not supported. + DIM is an executed statement in bwBASIC. + This is a design decision to support the following example. + 100 INPUT "How many?"; N + 110 DIM A$(N) + + OPTION VERSION "ECMA-116" ' ANSI Full BASIC + MANUAL: + ECMA-116.TXT + NOT IMPLEMENTED: + Graphic commands, chapters 11 thru 15. + NOTES: + The APPENDICES are implementation specific and are not supported. + WORK-IN-PROGRESS. + + OPTION VERSION "GCOS" ' GE 600 Mainframe BASIC + MANUAL: + GCOS.TXT + NOT IMPLEMENTED: + HPS, LIN, RESTORE*, RESTORE$, VPS and binary files. + NOTES: + The APPENDIXES are implementation specific and are not supported. + Local variables in a multiline DEF are declared using DIM. + Line numbers are not written to, nor read from, data files. + FILES does not support passwords. + Literal values for file names are not supported, use string values instead. + This is a design decision to support the following: + 100 INPUT "Which files?"; A$, B$, C$ + 110 FILES A$, B$, C$ + + OPTION VERSION "HAARDT" ' bas 2.4 by Michael Haardt + MANUAL: + HAARDT.TXT + NOT IMPLEMENTED: + BBC syntax, use ANSI syntax instead. + ON ERROR statement(s) is not supported, use ON ERROR GOTO instead. + ON ERROR OFF, use ON ERROR GOTO 0 instead. + MAT REDIM, OPTION RUN, OPTION STOP, TRUNCATE, UNNUM and XREF. + DEC$(X,A$), ENVIRON$(X), FIND$(A$[,X]) and INSTR(A$,B$,X,Y). + NOTES: + POS and TAB are 1-based instead of 0-based. + ON ERROR GOTO 0 does not cause any error to occur, instead + ON ERROR GOTO 0 removes the current error handler and clears + ERL, ERR and ERROR$. + + OPTION VERSION "HANDBOOK1" ' The BASIC Handbook, 1st Edition + MANUAL: + HANDBOOK1.TXT + NOT IMPLEMENTED: + Abbreviated commands (such as A.) and graphic commands. + NOTES: + The APPENDICES are implementation specific and are not supported. + The ERR function returns different values. + + OPTION VERSION "HANDBOOK2" ' The BASIC Handbook, 2nd Edition + MANUAL: + HANDBOOK2.TXT + NOT IMPLEMENTED: + Abbreviated commands (such as A.) and graphic commands. + NOTES: + The APPENDICES are implementation specific and are not supported. + The ERR function returns different values. + + OPTION VERSION "HEATH" ' Heath Benton Harbor BASIC + NOT IMPLEMENTED: + FREEZE, UNFREEZE, LOCK, UNLOCK, STEP + NOTES: + The APPENDICES are implementation specific and are not supported. + PRINT #-1 is sent to the printer. + INPUT #-1 is an ERROR. + + OPTION VERSION "MARK-I" ' GE 265 Mainframe BASIC + MANUAL: + MARK-I.TXT + ADDITIONAL REFERENCE: + "Time-Sharing Service BASIC LANGUAGE EXTENSIONS Reference Manual" + by Time-Sharing Service, Information Service Department, General Electric + (c) 1968, General Electric Company and Trustees of Dartmouth College + http://www.bitsavers.org/pdf/ge/MarkI_Timesharing/ + 802207A_Time-SharingServiceBASICLanguageExtensionsReferenceManual_Feb1968.pdf + NOTES: + The APPENDIXES are implementation specific and are not supported. + NOT IMPLEMENTED: + A series of variables seperated by equal signs is not supported, + use a series of variables seperated by commas instead. + Literal values for file names are not supported, use string values instead. + This is a design decision to support the following: + 100 INPUT "Which files?"; A$, B$, C$ + 110 FILES A$, B$, C$ + CALL, to execute another compiled program, is not supported, use SHELL instead. + + OPTION VERSION "MARK-II" ' GE 435 Mainframe BASIC + MANUAL: + MARK-II.TXT + ADDITIONAL INFORMATION: + "Basic Software Library" (Volumes 1 to 8) + by R. W. Brown + (c) 1977, Scientific Research Inst. + NOT IMPLEMENTED: + HPS, LIN, RESTORE*, RESTORE$, VPS and binary files. + NOTES: + The APPENDIXES are implementation specific and are not supported. + Local variables in a multiline DEF are declared using DIM. + Line numbers are not written to, nor read from, data files. + Literal values for file names are not supported, use string values instead. + This is a design decision to support the following: + 100 INPUT "Which files?"; A$, B$, C$ + 110 FILES A$, B$, C$ + FILES does not support passwords. + + OPTION VERSION "MBASIC" ' Microsoft BASIC-80 for Xenix + MANUAL: + MBASIC.TXT + NOTES: + The APPENDICES are implementation specific and are not supported. + The ERR function returns different values. + Specifying "D" in the exponent is not supported, instead use "E". + + OPTION VERSION "PDP-8" ' DEC PDP-8 BASIC + MANUAL: + PDP-8.TXT + NOT IMPLEMENTED: + NO RUBOUTS, RUBOUTS + NOTES: + The APPENDICES are implementation specific and are not supported. + + OPTION VERSION "PDP-11" ' DEC PDP-11 BASIC + MANUAL: + PDP-11.TXT + NOTES: + The APPENDICES are implementation specific and are not supported. + + OPTION VERSION "RBASIC" ' Micronics RBASIC for 6809 FLEX + MANUAL: + RBASIC.TXT + NOT IMPLEMENTED: + "+" command, COMPILE, CVT$, CVTF$, CVT$%, CVT$F + NOTES: + The APPENDICES are implementation specific and are not supported. + The ERR function returns different values. + + OPTION VERSION "RSTS-11" ' DEC RSTS-11 BASIC-PLUS + MANUAL: + RSTS-11.TXT + ADDITIONAL INFORMATION: + "BASIC-PLUS Language Manual : for use with RSTS-11 (PDP-11 Resource Time-Sharing System)" + by Digital Equipment Corporation + (c) 1972, Digital Equipment Corporation + http://bitsavers.trailing-edge.com/pdf/dec/pdp11/rsts/V04/ + DEC-11-ORBPA-A-D_BASIC-PLUS_LangMan_Oct72.pdf + ADDITIONAL INFORMATION: + "PDP-11 : BASIC-PLUS Language Manual" + by Digital Equipment Corporation + (c) 1975, Digital Equipment Corporation + http://bitsavers.trailing-edge.com/pdf/dec/pdp11/rsts/V06/ + DEC-11-ORBPB-A-D_BASIC-PLUS_LangMan_Jul75.pdf + NOT IMPLEMENTED: + HELLO, RENAME, REPLACE, COMPILE, LENGTH, TAPE, KEY, ASSIGN, DEASSIGN. + FOR ... WHILE, FOR ... UNTIL, statement modifiers. + NOTES: + The APPENDIXES are implementation specific and are not supported. + The ERR function returns different values. + The statemnet NAME ... AS does not support the specifier. + + OPTION VERSION "SYSTEM/360" ' IBM System/360 Mainframe BASIC + MANUAL: + SYSTEM-360.TXT + ADDITIONAL INFORMATION: + "IBM System/360 0S(TS0) ITF:BASIC Terminal User's Guide" + by International Business Machines Corporation + (c) 1971, International Business Machines Corporation + http://bitsavers.org/pdf/ibm/360/os/tso/ + SC28-6840-0_TSO_ITF_BASIC_Terminal_UG_Apr71.pdf + NOT IMPLEMENTED: + MAT PRINT USING. + NOTES: + The APPENDIXES are implementation specific and are not supported. + + OPTION VERSION "SYSTEM/370" ' IBM System/370 Mainframe BASIC + MANUAL: + SYSTEM-370.TXT + NOT IMPLEMENTED: + MAT PRINT USING. + NOTES: + The APPENDIXES are implementation specific and are not supported. + + OPTION VERSION "TRS-80" ' TRS-80 Model I/III/4 LBASIC + MANUAL: + TRS-80.TXT + NOT IMPLEMENTED: + CMD, SET EOF, cassette I/O. + NOTES: + The APPENDICES are implementation specific and are not supported. + The ERR function returns different values. + For the TRS-80 Model I use "WIDTH 16,64" in "profile.bas". + For the TRS-80 Model III use "WIDTH 16,64" in "profile.bas". + For the TRS-80 Model 4 use "WIDTH 24,80" in "profile.bas". + bwBASIC requires a space around all keywords, so the LINEINPUT + command must be written as LINE INPUT, and so on. + PRINT #-1 is sent to the printer. + INPUT #-1 is an ERROR. + + OPTION VERSION "VINTAGE" ' Vintage BASIC 1.0.1 + MANUAL: + VINTAGE.TXT + NOTES: + The APPENDICES are implementation specific and are not supported. + + OPTION VERSION "XBASIC" ' TSC XBASIC for 6800 FLEX + MANUAL: + XBASIC.TXT + NOT IMPLEMENTED: + "+" command, COMPILE, CVT$, CVTF$, CVT$%, CVT$F + NOTES: + The APPENDICES are implementation specific and are not supported. + The ERR function returns different values. + + +5. PREDEFINED VARIABLES - no longer exist + + + BWB.EDITOR$ + BWB.FILES$ + BWB.PROMPT$ + BWB.IMPLEMENTATION$ + + These preset variables no longer exist in bwBASIC. They have + been replaced with OPTION EDIT, OPTION FILES and OPTION PROMPT + commands. + + The commands EDIT and FILES are pseudo-commands that launch + shell programs set by OPTION EDIT and OPTION FILES commands, + respectively. The default values for these commands can + be changed in bwBASIC.h (DEF_EDITOR and DEF_FILES), and they + can be changed on the fly by the user. It is expected that + the user will add the appropriate commands to "profile.bas" + for their specific implementation; OPTION FILES "ls -l" on Unix + systems and OPTION FILES "dir" on DOS systems. + + The command OPTION PROMPT can be used to set the prompt + string for bwBASIC. Again, it is suggested that a user- + selected prompt can be set up in a "profile.bas" to be + initialized each time bwBASIC starts. Note that special + characters can be added to the prompt string, e.g., + + OPTION PROMPT "Ok"+CHR$(10) + + will give an "Ok" prompt followed by a linefeed. + + In previous versions, the preset variable BWB.IMPLEMENTATION$ + would return "TTY" (IMP_IDSTRING) for the bwx_tty implementation. + In previous versions of bwBASIC, the existance of the keywords CLS, + COLOR and LOCATE were determined at compile and BWB.IMPLEMENTATION$ + was used at runtime to determine whether these keywords existed. + In the current version, these keywords always exist and are now + controlled at runtime using the OPTION TERMINAL commands. With + OPTION TERMINAL NONE these keywords output nothing. + + +6. UNIMPLEMENTED COMMANDS AND FUNCTIONS, and AGENDA FOR DEVELOPMENT + + + There are some items not implemented that have been so long + a part of some BASIC dialects that their absence may seem surprising. + In each case, though, their implementation would require + operating-system-specific functions or terminal-specific functions + that cannot be universally provided. Some specific examples are + detailed below. + + + INP reads a value from a hardware port. In the current version, + using INP() will generate ERROR 73. It is expected that you will + provide a suitable implementation for your specific application. + For example: + FUNCTION INP( X ) + REM Return whatever value your application requires + INP = 0 + END FUNCTION + + + OUT writes a value to a hardware port. In the current version, + using OUT() will generate ERROR 73. It is expected that you will + provide a suitable implementation for your specific application. + For example: + SUB OUT( X, Y ) + REM do whatever your application requires + END SUB + + + PEEK reads a value from a memory location. In the current version, + using PEEK() will generate ERROR 73. It is expected that you will + provide a suitable implementation for your specific application. + For example: + FUNCTION PEEK( X ) + REM Return whatever value your application requires + PEEK = 0 + END FUNCTION + + + POKE writes a value to a memory location. In the current version, + using POKE() will generate ERROR 73. It is expected that you will + provide a suitable implementation for your specific application. + For example: + SUB POKE( X, Y ) + REM do whatever your application requires + END SUB + + + WAIT reads a value from a hardware port. In the current version, + using WAIT() will generate ERROR 73. It is expected that you will + provide a suitable implementation for your specific application. + For example: + SUB WAIT( X, Y ) + REM do whatever your application requires + END SUB + SUB WAIT( X, Y, Z ) + REM do whatever your application requires + END SUB + + + USR executes a machine code routine. In the current version, + using USR() will generate ERROR 73. It is expected that you will + provide a suitable implementation for your specific application. + For example: + FUNCTION USR( ... ) + REM Return whatever value your application requires + USR = 0 + END FUNCTION + + + VARPTR reads a value from a memory location. In the current version, + using VARPTR() will generate ERROR 73. It is expected that you will + provide a suitable implementation for your specific application. + For example: + FUNCTION VARPTR( ... ) + REM Return whatever value your application requires + VARPTR = 0 + END FUNCTION + + + There are other commands, functions, and implementation details + that I am working on, and which are on the agenda list for future + versions of bwBASIC. These agenda include: + + + PARACT i.e., the ability to execute PARallel ACTions. This + is described in ANSI BASIC, although I have not seen it + implemented before. It will offer a rough, non-preemptive + form of multitasking within the scope of a BASIC program. + Programmers will note that the global My pointer provides + one possible hook mechanism for PARACT in bwBASIC. In the + interim, you might use the "ON TIMER" command to implement + a simple multitasking BASIC program. + + + XMEM PC-type computers usually are able to use extended + memory. If we could use extended memory for program + lines, variables, and function defitions, we could + write much longer programs. This would entail, + however, a fairly serious rewriting of the program + to utilize memory handles for these storage features + instead of direct memory pointers. In the interim, + you might use a "DOS Extender" which hooks calloc() + and free() to enable transparent access to EMS or XMS + memory. + + + Windows The addition of memory handles in addition to the + non-preemptive execution of program lines (in a + crude form, already present) will make it possible + to develop implementations for Windows and perhaps + for other graphical user interfaces. But what form + should this take? I have in mind presently a BASIC + that would run in the background, appearing only + as an icon in the GUI space, with pop-up editors + and output windows. Thus, the interpreted language + would serve a purpose something like 'cron' (a task + scheduler) under Unix systems. You may have some + reflections that would help me in this. + + + Graphics Here we face fairly critical differences in different + styles and implementations of graphics, e.g., between + GWBASIC, ANSI BASIC, VisualBASIC, etc. But it's + possible that Graphics commands and functions could + be added. These would all be OPTION VERSION specific. + In the interim, you might consider using ReGIS or Tektronix + graphics (ESC codes) with xterm. + + + The ANSI Standard for full BASIC does not specify which particular + commands or functions must be implemented, and in fact the standard + is very robust. Perhaps no implementation of BASIC would ever + include all of the items, but some ANSI commands and functions which + remain unimplemented are: + + ACCESS + AREA + ARRAY + ASK + BSTR + BVAL + CELLS + CLIP + COLLATE + CONNECT + DATUM + DEBUG + DECLARE + DEVICE + DISCONNECT + DISPLAY + DOT + DRAW + ERASE + EVENT + EXCEPTION + GRAPH + HANDLER + IMAGE + KEY + LINES + MIX + MULTIPOINT + OUTIN + OUTPUT + PARACT + PICTURE + PIXEL + PLOT + POINTS + RECEIVE + RENUMBER + REWRITE + ROTATE + SEIZE + SEND + SHIFT + TIMEOUT + TRACE + TRANSFORM + VIEWPORT + WAIT + VIEWPORT + ZONEWIDTH + + +7. THE STORY OF Bywater BASIC + + + This program was originally begun in 1982 by my grandmother, Mrs. + Verda Spell of Beaumont, TX. She was writing the program using + an ANSI C compiler on an Osborne I CP/M computer and although my + grandfather (Lockwood Spell) had bought an IBM PC with 256k of + RAM my grandmother would not use it, paraphrasing George Herbert + to the effect that "He who cannot in 64k program, cannot in 512k." + She had used Microsoft BASIC and although she had nothing against + it she said repeatedly that she didn't understand why Digital + Research didn't "sue the socks off of Microsoft" for version 1.0 + of MSDOS and so I reckon that she hoped to undercut Microsoft's + entire market and eventually build a new software empire on + the North End of Beaumont. Her programming efforts were cut + tragically short when she was thrown from a Beaumont to Port + Arthur commuter train in the summer of 1986. I found the source + code to bwBASIC on a single-density Osborne diskette in her knitting + bag and eventually managed to have it all copied over to a PC + diskette. I have revised it slightly prior to this release. You + should know, though, that I myself am an historian, not a programmer. + + +8. COMMUNICATIONS: + + + email: tcamp@delphi.com + + +9. EXPANDED REFERENCE FOR COMMANDS, FUNCTIONS AND OPERATORS + + + bwBASIC provides a simple "HELP" command to refresh your memory + regarding the appropriate syntax for a specific command or function. + In the DOCS directory are text files which provide brief descriptions + of every intrinsic command, function and operator available in BASIC + dialect available in bwBASIC; these files are not intented to be an + authoritative or exhaustive reference. Refer to the reference document + for each dialect for details regarding each keyword. + + +THE END diff --git a/Bwbasic_3.20_manual.docx b/Bwbasic_3.20_manual.docx new file mode 100644 index 0000000..dc00635 Binary files /dev/null and b/Bwbasic_3.20_manual.docx differ diff --git a/HANDBOOK1.txt b/HANDBOOK1.txt new file mode 100644 index 0000000..6bdf0ed --- /dev/null +++ b/HANDBOOK1.txt @@ -0,0 +1,1562 @@ +============================================================ + GENERAL +============================================================ + + +OPTION VERSION "HANDBOOK1" +REM INTERNAL ID: HB1 +REM DESCRIPTION: The BASIC Handbook, 1st Edition +REM REFERENCE: The BASIC Handbook: Encyclopedia of the BASIC Computer Language +REM by David A. Lien +REM (c) 1978, Compusoft Publishing +REM ISBN 0-932760-00-7 +REM (1st Edition) 364 pages +REM +OPTION STRICT OFF +OPTION ANGLE RADIANS +OPTION BUGS ON +OPTION LABELS OFF +OPTION COMPARE BINARY +OPTION COVERAGE OFF +OPTION TRACE OFF +OPTION ERROR GOTO +OPTION IMPLICIT +OPTION BASE 0 +OPTION RECLEN 128 +OPTION DATE "%m/%d/%Y" +OPTION TIME "%H:%M:%S" +OPTION PUNCT STRING "$" +OPTION PUNCT DOUBLE "#" +OPTION PUNCT SINGLE "!" +OPTION PUNCT CURRENCY " " +OPTION PUNCT LONG "&" +OPTION PUNCT INTEGER "%" +OPTION PUNCT BYTE " " +OPTION PUNCT QUOTE """ +OPTION PUNCT COMMENT "'" +OPTION PUNCT STATEMENT ":" +OPTION PUNCT PRINT "?" +OPTION PUNCT INPUT " " +OPTION PUNCT IMAGE " " +OPTION PUNCT LPAREN "(" +OPTION PUNCT RPAREN ")" +OPTION PUNCT FILENUM "#" +OPTION PUNCT AT "@" +OPTION USING DIGIT "#" +OPTION USING COMMA "," +OPTION USING PERIOD "." +OPTION USING PLUS "+" +OPTION USING MINUS "-" +OPTION USING EXRAD "^" +OPTION USING DOLLAR "$" +OPTION USING FILLER "*" +OPTION USING LITERAL "_" +OPTION USING FIRST "!" +OPTION USING ALL "&" +OPTION USING LENGTH "%" + + +============================================================ + COMMANDS +============================================================ + + +------------------------------------------------------------ + SYNTAX: AUTO [start [, increment]] +DESCRIPTION: Automatic line numbering for manual program + entry. If the line already exists, then an + asterisk is displayed and pressing ENTER + leaves the line as-is. If the line does not + exist, then an asterisk is not displayed and + pressing ENTER terminates AUTO mode. + Regardless whether the line exists, entering + the command MAN will terminate AUTO mode. + AUTO mode is also terminated by any ERROR or + by pressing control-C. +------------------------------------------------------------ + SYNTAX: BREAK line [, ...]] +DESCRIPTION: Diagnostic command to stop execution at the + specified line(s). BREAK only applies to + user-numbered lines. For multi-statement + lines, BREAK only applies to the first + statement. BREAK effectively inserts a + hidden STOP command immediately after the + line number. Once a BREAK occurrs on a + specified line, it is automatically removed. + To remove all existing BREAKs, execute BREAK + without any line numbers. +------------------------------------------------------------ + SYNTAX: CHAIN filename$ [, linenumber] +DESCRIPTION: Load and execute another BASIC program, + without clearing common variables. For + System/370, the syntax is CHAIN + filename$,parameter$. +------------------------------------------------------------ + SYNTAX: CLEAR +DESCRIPTION: Sets all numeric variables to 0, and all + string variables to empty strings. +------------------------------------------------------------ + SYNTAX: CLOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: CLOAD* arrayname +DESCRIPTION: Loads a numeric array from a file saved using + CSAVE*. +------------------------------------------------------------ + SYNTAX: CLR +DESCRIPTION: Sets all numeric variables to 0, and all + string variables to empty strings. +------------------------------------------------------------ + SYNTAX: CONT +DESCRIPTION: Continue a BASIC program after a STOP has been + executed. Program resumes at the line after + the STOP. +------------------------------------------------------------ + SYNTAX: CSAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: CSAVE* ArrayName +DESCRIPTION: Saves a numeric array into a file for later + loading by CLOAD*. +------------------------------------------------------------ + SYNTAX: DATA constant [, ...] +DESCRIPTION: Stores numeric and string constants to be + accessed by READ. +------------------------------------------------------------ + SYNTAX: DEF FNname[( arg [,...] )] = value +DESCRIPTION: Defines a single-line function. Single-line + functions require an equal sign. +------------------------------------------------------------ + SYNTAX: DEF FNname[( arg [,...] )] +DESCRIPTION: Defines a multiline function. Multi-line DEF + functions do not have an equal sign and must + end with FNEND. +------------------------------------------------------------ + SYNTAX: DEFDBL letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFINT letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFSNG letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFSTR letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + string variables. +------------------------------------------------------------ + 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. Deleting + a non-existing line does not cause an error. +------------------------------------------------------------ + SYNTAX: DIM [# filenum,] variable([ lower TO ] upper) +DESCRIPTION: Declares variables and specifies the + dimensions of array variables. For array + variables, if the lower bound is not + provided, then the OPTION BASE value is used. + If filenum is provided, then the variable is + virtual. +------------------------------------------------------------ + SYNTAX: DSP variable [, ...]] +DESCRIPTION: Diagnostic command to display the value every + time the variable is assigned. To remove all + existing DSPs, execute DSP without any + variables. +------------------------------------------------------------ + SYNTAX: EDIT +DESCRIPTION: implementation defined. +------------------------------------------------------------ + SYNTAX: ELSE +DESCRIPTION: Introduces a default condition in a multi-line + IF statement. +------------------------------------------------------------ + SYNTAX: ELSEIF +DESCRIPTION: Introduces a secondary condition in a + multi-line IF statement. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: END IF +DESCRIPTION: Specifies the last line of a multi-line IF + definition. +------------------------------------------------------------ + SYNTAX: ERASE variable [, ...] +DESCRIPTION: Eliminates arrayed variables from a program. +------------------------------------------------------------ + SYNTAX: FNEND +DESCRIPTION: Specifies the last line of a multi-line DEF + function. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: GO +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: GO SUB 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. +------------------------------------------------------------ + SYNTAX: GO TO line +DESCRIPTION: Branches program execution to the specified + line. The line may be a number or a label. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: GOTO line +DESCRIPTION: Branches program execution to the specified + line. The line may be a number or a label. +------------------------------------------------------------ + SYNTAX: IF value THEN line1 [ELSE line2] +DESCRIPTION: Single line standard IF command. If the value + is non-zero, then branh to line1. If the + value is zero and ELSE is provided, then + branch to line2. Otherwise continue to the + next line. LABELS are not allowed. +------------------------------------------------------------ + SYNTAX: IF value THEN +DESCRIPTION: Top of a multi-line IF - END IF structure. If + the value 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. +------------------------------------------------------------ + SYNTAX: IMAGE "format string" +DESCRIPTION: Provides format string for PRINT USING + linenum. +------------------------------------------------------------ + SYNTAX: INPUT "prompt string" , variable [, ...] +DESCRIPTION: Reads input from the terminal after displaying + a prompt. +------------------------------------------------------------ + SYNTAX: INPUT # filenum , variable [, ...]s +DESCRIPTION: Reads input from the file specified by + filenum. +------------------------------------------------------------ + SYNTAX: INPUT variable [, ...] +DESCRIPTION: Reads input from the terminal. +------------------------------------------------------------ + SYNTAX: [LET] variable [, ...] = value +DESCRIPTION: Assigns the value to the variable. The LET + keyword is optional. +------------------------------------------------------------ + SYNTAX: LIST line1 [- line2] +DESCRIPTION: Lists BASIC program lines from line1 to line2 + to the console on stdout. +------------------------------------------------------------ + SYNTAX: LOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: MAINTAINER +DESCRIPTION: This command is reserved for use by the + Bywater BASIC maintainer. It is not for the + BASIC programmer. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS HTML +DESCRIPTION: Dump COMMAND vs VERSION as HTML table +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS ID +DESCRIPTION: Dump COMMAND #define. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS MANUAL +DESCRIPTION: Dump COMMAND manual. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS_SWITCH +DESCRIPTION: Dump COMMAND switch. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS TABLE +DESCRIPTION: Dump COMMAND table. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG OFF +DESCRIPTION: Disable degug tracing. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG ON +DESCRIPTION: Enable degug tracing. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS HTML +DESCRIPTION: Dump FUNCTION vs VERSION as HTML table. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS ID +DESCRIPTION: Dump FUNCTION #define. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS MANUAL +DESCRIPTION: Dump FUNCTION manual. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS SWITCH +DESCRIPTION: Dump FUNCTION switch. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS TABLE +DESCRIPTION: Dump FUNCTION table. +------------------------------------------------------------ + SYNTAX: MAINTAINER MANUAL +DESCRIPTION: Dump manual for the currently selected OPTION + VERSION. +------------------------------------------------------------ + SYNTAX: MAINTAINER STACK +DESCRIPTION: Dump the BASIC stack. +------------------------------------------------------------ + SYNTAX: MAT arrayname = value +DESCRIPTION: Matrix operations: + MAT A = CON + MAT A = IDN + MAT A = ZER + MAT A = INV B + MAT A = TRN B + MAT A = (k) * B + MAT A = B + MAT A = B + C + MAT A = B - C + MAT A = B * C +------------------------------------------------------------ + SYNTAX: MAT INPUT arrayname +DESCRIPTION: Matrix input. +------------------------------------------------------------ + SYNTAX: MAT PRINT arrayname +DESCRIPTION: Matrix print. +------------------------------------------------------------ + SYNTAX: MAT READ arrayname +DESCRIPTION: Matrix read. +------------------------------------------------------------ + SYNTAX: MAT WRITE arrayname +DESCRIPTION: Matrix write. +------------------------------------------------------------ + SYNTAX: NEW +DESCRIPTION: Deletes the program in memory and clears all + variables. +------------------------------------------------------------ + SYNTAX: NEXT [variable] +DESCRIPTION: The bottom line of a FOR - NEXT structure. +------------------------------------------------------------ + SYNTAX: OF +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON value GOSUB line [, ...] +DESCRIPTION: Calls based on the rounded value. +------------------------------------------------------------ + SYNTAX: ON value GOTO line [, ...] +DESCRIPTION: Branches based on the rounded value. +------------------------------------------------------------ + SYNTAX: ON ERROR +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON ERROR GOTO errline +DESCRIPTION: When a trappable error occurs, execute GOTO + errline. The error handler must terminate + with a RESUME command. If the line number is + 0 (zerp), then use the default error handler. + Valid when OPTION ERROR GOTO. +------------------------------------------------------------ + SYNTAX: OPTION +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE DEGREES +DESCRIPTION: Configures these math functions to accept and + return angles in degrees: ACOS, ACS, ANGLE, + ARCSIN, ASIN, ASN, ARCTAN, ATN, ATAN, COS, + COT, CSC, SEC, SIN and TAN. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE GRADIANS +DESCRIPTION: Configures these math functions to accept and + return angles in gradians: ACOS, ANGLE, + ASIN, ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN + and TAN. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE RADIANS +DESCRIPTION: Configures these math functions to accept and + return angles in radians: ACOS, ANGLE, ASIN, + ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN and + TAN. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC DECIMAL +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC FIXED +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC NATIVE +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION BASE integer +DESCRIPTION: Sets the default lowest array subscript. +------------------------------------------------------------ + SYNTAX: OPTION BUGS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION BUGS BOOLEAN +DESCRIPTION: Boolean results are 1 or 0 instead of bitwise. +------------------------------------------------------------ + SYNTAX: OPTION BUGS OFF +DESCRIPTION: Disables bugs commonly found in many BASIC + dialects. +------------------------------------------------------------ + SYNTAX: OPTION BUGS ON +DESCRIPTION: Enables bugs commonly found in many BASIC + dialects. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE BINARY +DESCRIPTION: Causes string comparisons to be + case-sensitive. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE DATABASE +DESCRIPTION: Causes string comparisons to be + case-insensitive. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE TEXT +DESCRIPTION: Causes string comparisons to be + case-insensitive. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE OFF +DESCRIPTION: Disables BASIC code coverage recording, + displayed using the LIST command. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE ON +DESCRIPTION: Enables BASIC code coverage recording, + displayed using the LIST command. +------------------------------------------------------------ + SYNTAX: OPTION DATE format$ +DESCRIPTION: Sets the date format string used by C + strftime() for DATE$. +------------------------------------------------------------ + SYNTAX: OPTION DIGITS integer +DESCRIPTION: Sets the number of significant digits for + PRINT. Setting the value to zero restores + the default. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE COMMAND name$ +DESCRIPTION: Disables the specified BASIC command. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE FUNCTION name$ +DESCRIPTION: Disables the specified BASIC function. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE OPERATOR name$ +DESCRIPTION: Disables the specified BASIC operator. +------------------------------------------------------------ + SYNTAX: OPTION EDIT string$ +DESCRIPTION: Sets the program name used by the EDIT + command. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE COMMAND name$ +DESCRIPTION: Enables the specified BASIC command. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE FUNCTION name$ +DESCRIPTION: Enables the specified BASIC function. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE OPERATOR name$ +DESCRIPTION: Enables the specified BASIC operator. +------------------------------------------------------------ + SYNTAX: OPTION ERROR +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ERROR GOSUB +DESCRIPTION: When an error occurs, GOSUB to the error + handler. The error handler exits with + RETURN. +------------------------------------------------------------ + SYNTAX: OPTION ERROR GOTO +DESCRIPTION: When an error occurs, GOTO to the error + handler. The error handler exits with + RESUME. +------------------------------------------------------------ + SYNTAX: OPTION EXPLICIT +DESCRIPTION: All variables must be declared using DIM. +------------------------------------------------------------ + SYNTAX: OPTION EXTENSION string$ +DESCRIPTION: Sets the BASIC filename extension, commonly + ".bas". +------------------------------------------------------------ + SYNTAX: OPTION FILES string$ +DESCRIPTION: Sets the program name used by the FILES + command. +------------------------------------------------------------ + SYNTAX: OPTION IMPLICIT +DESCRIPTION: Variables need not be declared using DIM, + provided arrays have no more that 10 + elements. This is the opposite of OPTION + EXPLICIT, and is the default for all versions + of BASIC. +------------------------------------------------------------ + SYNTAX: OPTION INDENT integer +DESCRIPTION: Sets indention level for LIST. Zero means no + indention. Default is 2. +------------------------------------------------------------ + SYNTAX: OPTION LABELS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION LABELS OFF +DESCRIPTION: Disables text labels. +------------------------------------------------------------ + SYNTAX: OPTION LABELS ON +DESCRIPTION: Enables text labels. +------------------------------------------------------------ + SYNTAX: OPTION PROMPT string$ +DESCRIPTION: Sets the BASIC prompt. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT AT char$ +DESCRIPTION: Sets the PRINT AT character, commonly "@". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT BYTE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type BYTE, commonly "~". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT COMMENT char$ +DESCRIPTION: Sets the shortcut COMMENT character. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT CURRENCY char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type CURRENCY, commonly "@". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT DOUBLE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type DOUBLE, commonly "#". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT FILENUM char$ +DESCRIPTION: Sets the FILE NUMBER prefix character, + commonly "#". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT IMAGE char$ +DESCRIPTION: Sets the shortcut IMAGE character, commonly + ":". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT INPUT char$ +DESCRIPTION: Sets the shortcut INPUT character, commonly + "!". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT INTEGER char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type INTEGER, commonly "%". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT LONG char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type LONG, commonly "&". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT LPAREN char$ +DESCRIPTION: Sets the LEFT PARENTHESIS character, commonly + "(". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT_PRINT char$ +DESCRIPTION: Sets the shortcut PRINT character, commonly + "?". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT QUOTE char$ +DESCRIPTION: Sets the QUOTE character, commonly """ +------------------------------------------------------------ + SYNTAX: OPTION PUNCT RPAREN char$ +DESCRIPTION: Sets the RIGHT PARENTHESIS character, commonly + ")". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT SINGLE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type SINGLE, commonly "!". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT STATEMENT char$ +DESCRIPTION: Sets the statement seperator character, + commonly ":". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT STRING char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type STRING, commonly "$". +------------------------------------------------------------ + SYNTAX: OPTION RECLEN integer +DESCRIPTION: Sets the default RANDOM record length. +------------------------------------------------------------ + SYNTAX: OPTION RENUM string$ +DESCRIPTION: Sets the program name used by the RENUM + command. +------------------------------------------------------------ + SYNTAX: OPTION ROUND +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ROUND BANK +DESCRIPTION: Round using the Banker rule. +------------------------------------------------------------ + SYNTAX: OPTION ROUND MATH +DESCRIPTION: Round using mathematical rules. +------------------------------------------------------------ + SYNTAX: OPTION ROUND TRUNCATE +DESCRIPTION: Round using truncation. +------------------------------------------------------------ + SYNTAX: OPTION SCALE integer +DESCRIPTION: Sets the number of digits to round after the + decimal point for PRINT. Setting the value + to zero disables rounding. +------------------------------------------------------------ + SYNTAX: OPTION SLEEP double +DESCRIPTION: Sets multiplier for SLEEP and WAIT. Zero + means no waiting. Default is 1. +------------------------------------------------------------ + SYNTAX: OPTION STDERR filename$ +DESCRIPTION: Sets the file used for STDERR, which is used + by LPRINT commands. +------------------------------------------------------------ + SYNTAX: OPTION STDIN filename$ +DESCRIPTION: Sets the file used for STDIN, which is used by + INPUT commands. +------------------------------------------------------------ + SYNTAX: OPTION STDOUT filename$ +DESCRIPTION: Sets the file used for STDOUT, which is used + by PRINT commands. +------------------------------------------------------------ + SYNTAX: OPTION STRICT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION STRICT OFF +DESCRIPTION: Disables checking for implicit array creation + without using the DIM command. +------------------------------------------------------------ + SYNTAX: OPTION STRICT ON +DESCRIPTION: Enables checking for implicit array creation + without using the DIM command. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL ADM +DESCRIPTION: Enables ADM-3A terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL ANSI +DESCRIPTION: Enables ANSI terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL NONE +DESCRIPTION: Disables terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TIME format$ +DESCRIPTION: Sets the time format string used by C + strftime() for TIME$. +------------------------------------------------------------ + SYNTAX: OPTION TRACE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION TRACE OFF +DESCRIPTION: Disables displaying a stack trace when an + ERROR occurs. +------------------------------------------------------------ + SYNTAX: OPTION TRACE ON +DESCRIPTION: Enables displaying a stack trace when an ERROR + occurs. +------------------------------------------------------------ + SYNTAX: OPTION USING +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION USING ALL char$ +DESCRIPTION: Specifies the magic ALL character for the + PRINT USING command. A common value is "&". +------------------------------------------------------------ + SYNTAX: OPTION USING COMMA char$ +DESCRIPTION: Specifies the magic COMMA character for the + PRINT USING command. A common value is ",". +------------------------------------------------------------ + SYNTAX: OPTION USING DIGIT char$ +DESCRIPTION: Specifies the magic DIGIT character for the + PRINT USING command. A common value is "#". +------------------------------------------------------------ + SYNTAX: OPTION USING DOLLAR char$ +DESCRIPTION: Specifies the magic DOLLAR character for the + PRINT USING command. A common value is "$". +------------------------------------------------------------ + SYNTAX: OPTION USING EXRAD char$ +DESCRIPTION: Specifies the magic EXRAD character for the + PRINT USING command. A common value is "^". +------------------------------------------------------------ + SYNTAX: OPTION USING FILLER char$ +DESCRIPTION: Specifies the magic FILLER character for the + PRINT USING command. A common value is "*". +------------------------------------------------------------ + SYNTAX: OPTION USING FIRST char$ +DESCRIPTION: Specifies the magic FIRST character for the + PRINT USING command. A common value is "!". +------------------------------------------------------------ + SYNTAX: OPTION USING LENGTH char$ +DESCRIPTION: Specifies the magic LENGTH character for the + PRINT USING command. A common value is "\". +------------------------------------------------------------ + SYNTAX: OPTION USING LITERAL char$ +DESCRIPTION: Specifies the magic LITERAL character for the + PRINT USING command. A common value is "_". +------------------------------------------------------------ + SYNTAX: OPTION USING MINUS char$ +DESCRIPTION: Specifies the magic MINUS character for the + PRINT USING command. A common value is "-". +------------------------------------------------------------ + SYNTAX: OPTION USING PERIOD char$ +DESCRIPTION: Specifies the magic PERIOD character for the + PRINT USING command. A common value is ".". +------------------------------------------------------------ + SYNTAX: OPTION USING PLUS char$ +DESCRIPTION: Specifies the magic PLUS character for the + PRINT USING command. A common value is "+". +------------------------------------------------------------ + SYNTAX: OPTION VERSION version$ +DESCRIPTION: Selects a specific BASIC version, which is a + combination of OPTION settings, commands, + functions and operators. If no version is + specified, displays a list of the available + versions. +------------------------------------------------------------ + SYNTAX: OPTION ZONE integer +DESCRIPTION: Sets the PRINT zone width. Setting the value + to zero restores the default. +------------------------------------------------------------ + SYNTAX: PRINT # filenum , [USING format$;] value ... +DESCRIPTION: Sends output to a file. +------------------------------------------------------------ + SYNTAX: PRINT [USING format$;] value ... +DESCRIPTION: Sends output to the screen. +------------------------------------------------------------ + SYNTAX: READ variable [, ...] +DESCRIPTION: Reads values from DATA statements. +------------------------------------------------------------ + SYNTAX: REM ... +DESCRIPTION: Remark. +------------------------------------------------------------ + SYNTAX: RENUM +DESCRIPTION: Implementation defined. +------------------------------------------------------------ + SYNTAX: RENUMBER +DESCRIPTION: Implementation defined. +------------------------------------------------------------ + SYNTAX: RESTORE [line] +DESCRIPTION: Resets the line used for the next READ + statement. line may be either a number or a + label. +------------------------------------------------------------ + SYNTAX: RESUME +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to ERL. +------------------------------------------------------------ + SYNTAX: RESUME line +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to the specified + line. +------------------------------------------------------------ + SYNTAX: RESUME NEXT +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to the line after + ERL. +------------------------------------------------------------ + SYNTAX: RESUME 0 +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to ERL. +------------------------------------------------------------ + SYNTAX: RETURN +DESCRIPTION: Concludes a subroutine called by GOSUB. +------------------------------------------------------------ + SYNTAX: RUN filename$ +DESCRIPTION: Loads a new BAASIC program and executes the + program from the start. +------------------------------------------------------------ + SYNTAX: RUN line +DESCRIPTION: Executes the program in memory beginning at + line. +------------------------------------------------------------ + SYNTAX: RUN +DESCRIPTION: Executes the program in memory from the start. +------------------------------------------------------------ + SYNTAX: SAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: STEP +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: SYSTEM +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + SYNTAX: TEXT letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + string variables. +------------------------------------------------------------ + SYNTAX: THEN +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: TO +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: TRACE +DESCRIPTION: Enables tracing. +------------------------------------------------------------ + SYNTAX: TRACE OFF +DESCRIPTION: Disables tracing. +------------------------------------------------------------ + SYNTAX: TRACE ON +DESCRIPTION: Enables tracing. +------------------------------------------------------------ + SYNTAX: WEND +DESCRIPTION: Bottom of a WHILE - WEND structure. +------------------------------------------------------------ + SYNTAX: WHILE value +DESCRIPTION: Top of a WHILE - WEND structure. If the value + is non-zero, then the loop is terminated. +------------------------------------------------------------ + + +============================================================ + FUNCTIONS +============================================================ + + +------------------------------------------------------------ + SYNTAX: N = ABS( X ) + PARAMETER: X is a number +DESCRIPTION: The absolute value of X. +------------------------------------------------------------ + SYNTAX: N = ARCTAN( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in radians, i.e. the angle + whose tangent is X, where -PI/2 < ARCTAN(X) < + PI/2. +------------------------------------------------------------ + SYNTAX: N = ASC( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The numeric code for the first letter in A$. + For example, ASC("ABC") returns 65 on ASCII + systems. +------------------------------------------------------------ + SYNTAX: N = ASC( A$, X ) + PARAMETER: A$ is a string, LEN >= 1 + PARAMETER: X is a number, [1,MAXLEN] +DESCRIPTION: The numeric code of the Xth character in A$. + Same as ASC(MID$(A$,X)). +------------------------------------------------------------ + SYNTAX: N = ASN( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in radians, where -PI/2 <= + ASN(X) <= PI/2; X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ATAN( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in radians, i.e. the angle + whose tangent is X, where -PI/2 < ATAN(X) < + PI/2. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = CDBL( X ) + PARAMETER: X is a number, [MINDBL,MAXDBL] +DESCRIPTION: The double-precision value of X. +------------------------------------------------------------ + SYNTAX: S$ = CHAR( X, Y ) + PARAMETER: X is a number, [0,255] + PARAMETER: Y is a number, [0,MAXLEN] +DESCRIPTION: The string Y bytes long consisting of CHR$(X). + Same as STRING$(Y,X). +------------------------------------------------------------ + SYNTAX: S$ = CHAR$( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHAR$(65) returns "A". +------------------------------------------------------------ + SYNTAX: S$ = CHR( X ) + PARAMETER: X is a number +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHR(65) returns "A". +------------------------------------------------------------ + SYNTAX: S$ = CHR$( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHR$(65) returns "A". +------------------------------------------------------------ + SYNTAX: N = CINT( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The short (16-bit) integer value of X. +------------------------------------------------------------ + SYNTAX: N = CLG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: S$ = CLK( X ) + PARAMETER: X is a number +DESCRIPTION: The time of day in 24-hour notation according + to ISO 3307. For example, the value of CLK + at 11:15 AM is "11:15:00". If there is no + clock available, then the value of CLK shall + be "99:99:99". The value of TIME$ at + midnight is "00:00:00". The value of + parameter X is ignored. +------------------------------------------------------------ + SYNTAX: S$ = CLK$ +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". +------------------------------------------------------------ + SYNTAX: N = CLOG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = CLS +DESCRIPTION: Clears the screen. Cursor is positioned at row + 1, column 1. +------------------------------------------------------------ + SYNTAX: N = COS( X ) + PARAMETER: X is a number +DESCRIPTION: The cosine of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = CSNG( X ) + PARAMETER: X is a number, [MINFLT,MAXFLT] +DESCRIPTION: The single-precision value of X. +------------------------------------------------------------ + SYNTAX: N = DEG +DESCRIPTION: Configures the math functions to accept and + return angles in degrees. +------------------------------------------------------------ + SYNTAX: N = DEG( X ) + PARAMETER: X is a number +DESCRIPTION: The number of degrees in X radians. +------------------------------------------------------------ + SYNTAX: N = ERL +DESCRIPTION: The line number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERR +DESCRIPTION: The error number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERROR( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: Simulate the error number in X. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: N = EXAM( X ) + PARAMETER: X is a number, [MINLNG,MAXLNG] +DESCRIPTION: The value read from hardware address X. + Causes ERROR 73. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = FETCH( X ) + PARAMETER: X is a number, [MINLNG,MAXLNG] +DESCRIPTION: The value read from hardware address X. + Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = FILL( X, Y ) + PARAMETER: X is a number, [MINLNG,MAXLNG] + PARAMETER: Y is a number, [0,255] +DESCRIPTION: Sends Y to hardware address X. Causes ERROR + 73. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = FRE +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. +------------------------------------------------------------ + 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 only and it always returns a + fixed value of 32000.The value of A$ is + ignored. +------------------------------------------------------------ + SYNTAX: N = FRE( X ) + PARAMETER: X is a number +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. The value of X is + ignored. +------------------------------------------------------------ + SYNTAX: N = FREE +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. +------------------------------------------------------------ + SYNTAX: N = FREE( X ) + PARAMETER: X is a number +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. The value of X is + ignored. +------------------------------------------------------------ + SYNTAX: N = FREE( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000.The value of A$ is + ignored. +------------------------------------------------------------ + SYNTAX: N = HOME +DESCRIPTION: Clears the screen. Cursor is positioned at row + 1, column 1. +------------------------------------------------------------ + SYNTAX: S$ = INKEY$ +DESCRIPTION: The keypress, if available. If a keypress is + not available, then immediately returns an + empty string. If not supported by the + platform, then always returns an empty + string, so use INPUT$(1) instead. +------------------------------------------------------------ + SYNTAX: N = INP( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The value read from machine port X. Causes + ERROR 73. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = LEN( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +DESCRIPTION: The length of A$. +------------------------------------------------------------ + SYNTAX: N = LGT( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: S$ = LIN( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string X bytes long of newline characters. +------------------------------------------------------------ + SYNTAX: N = LN( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The natural logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LOG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The natural logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LOG10( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LOGE( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The natural logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = MEM +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = NOTRACE +DESCRIPTION: Turn tracing OFF +------------------------------------------------------------ + SYNTAX: S$ = NUM$( X ) + PARAMETER: X is a number +DESCRIPTION: The string generated by the print-statement as + the numeric-representation of the value + associated with X. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = PDL( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The value read from machine port X. Causes + ERROR 73. +------------------------------------------------------------ + SYNTAX: N = PEEK( X ) + PARAMETER: X is a number, [MINLNG,MAXLNG] +DESCRIPTION: The value read from hardware address X. + Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = PI +DESCRIPTION: The constant 3.14159 which is the ratio of the + circumference of a circle to its diameter. +------------------------------------------------------------ + SYNTAX: N = PIN( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The value read from machine port X. Causes + ERROR 73. +------------------------------------------------------------ + 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. Causes ERROR + 73. +------------------------------------------------------------ + SYNTAX: N = RAD +DESCRIPTION: Configures the math functions to accept and + return angles in radians. +------------------------------------------------------------ + SYNTAX: N = RADIAN +DESCRIPTION: Configures the math functions to accept and + return angles in radians. +------------------------------------------------------------ + SYNTAX: N = RAN +DESCRIPTION: Seeds the pseudo-random number generator with + TIME. +------------------------------------------------------------ + SYNTAX: N = RAN( X ) + PARAMETER: X is a number +DESCRIPTION: Seeds the pseudo-random number generator with + X. +------------------------------------------------------------ + SYNTAX: N = RANDOM +DESCRIPTION: Seeds the pseudo-random number generator with + TIME. +------------------------------------------------------------ + SYNTAX: N = RANDOM( X ) + PARAMETER: X is a number +DESCRIPTION: Seeds the pseudo-random number generator with + X. +------------------------------------------------------------ + SYNTAX: N = RANDOMIZE +DESCRIPTION: Seeds the pseudo-random number generator with + TIME. +------------------------------------------------------------ + SYNTAX: N = RANDOMIZE( X ) + PARAMETER: X is a number +DESCRIPTION: Seeds the pseudo-random number generator with + X. +------------------------------------------------------------ + SYNTAX: N = RESET +DESCRIPTION: Close all open files. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = SIN( X ) + PARAMETER: X is a number +DESCRIPTION: The sine of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = SLEEP( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then SLEEP + does nothing. The resolution is + implementation defined. +------------------------------------------------------------ + SYNTAX: S$ = SPA( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X blank spaces. +------------------------------------------------------------ + SYNTAX: S$ = SPACE( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X blank spaces. +------------------------------------------------------------ + SYNTAX: S$ = SPACE$( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X blank spaces. +------------------------------------------------------------ + SYNTAX: S$ = SPC( X ) + PARAMETER: X is a number +DESCRIPTION: The string of X spaces. Only for use within + the PRINT command. +------------------------------------------------------------ + SYNTAX: N = SQR( X ) + PARAMETER: X is a number, >= 0 +DESCRIPTION: The non-negative square root of X; X shall be + non-negative. +------------------------------------------------------------ + SYNTAX: N = SQRT( X ) + PARAMETER: X is a number, >= 0 +DESCRIPTION: The non-negative square root of X; X shall be + non-negative. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + SYNTAX: N = STUFF( X, Y ) + PARAMETER: X is a number, [MINLNG,MAXLNG] + PARAMETER: Y is a number, [0,255] +DESCRIPTION: Sends Y to hardware address X. Causes ERROR + 73. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = TAN( X ) + PARAMETER: X is a number +DESCRIPTION: The tangent of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = TI +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). +------------------------------------------------------------ + SYNTAX: S$ = TI$ +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". +------------------------------------------------------------ + SYNTAX: N = TIM +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). +------------------------------------------------------------ + SYNTAX: N = TIM( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: If X is 0, returns minutes in current hour. + If X is 1, returns hours in current day. If + X is 2, returns days in current year. If X + is 3, returns years since 1900. Any other + value for X is an ERROR. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + SYNTAX: N = TIME( X ) + PARAMETER: X is a number +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). The value of the parameter + X is ignored. +------------------------------------------------------------ + 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". +------------------------------------------------------------ + SYNTAX: N = TRACE +DESCRIPTION: Turn tracing ON +------------------------------------------------------------ + SYNTAX: N = TROFF +DESCRIPTION: Turn tracing OFF +------------------------------------------------------------ + SYNTAX: N = TRON +DESCRIPTION: Turn tracing ON +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = VTAB( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: Savme as LOCATE X, 1. +------------------------------------------------------------ + SYNTAX: N = WAIT( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then WAIT does + nothing. The resolution is implementation + defined. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = WIDTH( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [0,255] +DESCRIPTION: If X = 0, sets the console width to Y. + If X < 0, sets the printer width to Y. + If X is an open file number, sets the file + line width to Y. + Otherwise sets the console rows to X and the + line width to Y. + A value of zero for Y means no wrapping will + occur. +------------------------------------------------------------ + + +============================================================ + OPERATORS +============================================================ + + +------------------------------------------------------------ + SYNTAX: X ** Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: X [ Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: X ^ Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: # X +DESCRIPTION: Posation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: + X +DESCRIPTION: Posation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: - X +DESCRIPTION: Negation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: X * Y +DESCRIPTION: Multiplication + PRECEDENCE: 12 +------------------------------------------------------------ + SYNTAX: X / Y +DESCRIPTION: Division + PRECEDENCE: 12 +------------------------------------------------------------ + SYNTAX: X \ Y +DESCRIPTION: Integer Division + PRECEDENCE: 11 +------------------------------------------------------------ + SYNTAX: X MOD Y +DESCRIPTION: Integer Modulus + PRECEDENCE: 10 +------------------------------------------------------------ + SYNTAX: X + Y +DESCRIPTION: Addition + PRECEDENCE: 9 +------------------------------------------------------------ + SYNTAX: X - Y +DESCRIPTION: Subtraction + PRECEDENCE: 9 +------------------------------------------------------------ + SYNTAX: X < Y +DESCRIPTION: Less than + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X <= Y +DESCRIPTION: Less than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X <> Y +DESCRIPTION: Not Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X = Y +DESCRIPTION: Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X =< Y +DESCRIPTION: Less than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X => Y +DESCRIPTION: Greater than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X > Y +DESCRIPTION: Greater than + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X >< Y +DESCRIPTION: Not Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X >= Y +DESCRIPTION: Greater than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: NOT X +DESCRIPTION: Bitwise NOT + PRECEDENCE: 6 +------------------------------------------------------------ + SYNTAX: X AND Y +DESCRIPTION: Bitwise AND + PRECEDENCE: 5 +------------------------------------------------------------ + SYNTAX: X OR Y +DESCRIPTION: Bitwise OR + PRECEDENCE: 4 +------------------------------------------------------------ + SYNTAX: X XOR Y +DESCRIPTION: Bitwise Exclusive OR + PRECEDENCE: 3 +------------------------------------------------------------ + + diff --git a/HANDBOOK2.txt b/HANDBOOK2.txt new file mode 100644 index 0000000..dfaf5fc --- /dev/null +++ b/HANDBOOK2.txt @@ -0,0 +1,2004 @@ +============================================================ + GENERAL +============================================================ + + +OPTION VERSION "HANDBOOK2" +REM INTERNAL ID: HB2 +REM DESCRIPTION: The BASIC Handbook, 2nd Edition +REM REFERENCE: The BASIC Handbook: Encyclopedia of the BASIC Computer Language +REM by David A. Lien +REM (c) 1981, CompuSoft Publishing +REM ISBN 0-932760-05-8 +REM (2nd Edition) 480 pages +REM +OPTION STRICT OFF +OPTION ANGLE RADIANS +OPTION BUGS ON +OPTION LABELS OFF +OPTION COMPARE BINARY +OPTION COVERAGE OFF +OPTION TRACE OFF +OPTION ERROR GOTO +OPTION IMPLICIT +OPTION BASE 0 +OPTION RECLEN 128 +OPTION DATE "%m/%d/%Y" +OPTION TIME "%H:%M:%S" +OPTION PUNCT STRING "$" +OPTION PUNCT DOUBLE "#" +OPTION PUNCT SINGLE "!" +OPTION PUNCT CURRENCY " " +OPTION PUNCT LONG "&" +OPTION PUNCT INTEGER "%" +OPTION PUNCT BYTE " " +OPTION PUNCT QUOTE """ +OPTION PUNCT COMMENT "'" +OPTION PUNCT STATEMENT ":" +OPTION PUNCT PRINT "?" +OPTION PUNCT INPUT " " +OPTION PUNCT IMAGE " " +OPTION PUNCT LPAREN "(" +OPTION PUNCT RPAREN ")" +OPTION PUNCT FILENUM "#" +OPTION PUNCT AT "@" +OPTION USING DIGIT "#" +OPTION USING COMMA "," +OPTION USING PERIOD "." +OPTION USING PLUS "+" +OPTION USING MINUS "-" +OPTION USING EXRAD "^" +OPTION USING DOLLAR "$" +OPTION USING FILLER "*" +OPTION USING LITERAL "_" +OPTION USING FIRST "!" +OPTION USING ALL "&" +OPTION USING LENGTH "%" + + +============================================================ + COMMANDS +============================================================ + + +------------------------------------------------------------ + SYNTAX: APPEND filename$ +DESCRIPTION: Merges the BASIC program in filename$ into the + current BASIC program; lines in filename$ + replace any matching lines in the current + program. +------------------------------------------------------------ + SYNTAX: AUTO [start [, increment]] +DESCRIPTION: Automatic line numbering for manual program + entry. If the line already exists, then an + asterisk is displayed and pressing ENTER + leaves the line as-is. If the line does not + exist, then an asterisk is not displayed and + pressing ENTER terminates AUTO mode. + Regardless whether the line exists, entering + the command MAN will terminate AUTO mode. + AUTO mode is also terminated by any ERROR or + by pressing control-C. +------------------------------------------------------------ + SYNTAX: BREAK line [, ...]] +DESCRIPTION: Diagnostic command to stop execution at the + specified line(s). BREAK only applies to + user-numbered lines. For multi-statement + lines, BREAK only applies to the first + statement. BREAK effectively inserts a + hidden STOP command immediately after the + line number. Once a BREAK occurrs on a + specified line, it is automatically removed. + To remove all existing BREAKs, execute BREAK + without any line numbers. +------------------------------------------------------------ + SYNTAX: BYE +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + SYNTAX: CALL subname( [parameter [, ...] ] ) +DESCRIPTION: Calls a subroutine that was defined by SUB and + END SUB. +------------------------------------------------------------ + SYNTAX: CHAIN filename$ [, linenumber] +DESCRIPTION: Load and execute another BASIC program, + without clearing common variables. For + System/370, the syntax is CHAIN + filename$,parameter$. +------------------------------------------------------------ + SYNTAX: CHANGE A$ TO X +DESCRIPTION: Changes a string to a numeric array. +------------------------------------------------------------ + SYNTAX: CHANGE X TO A$ +DESCRIPTION: Changes a numeric array to a string. +------------------------------------------------------------ + SYNTAX: CLEAR +DESCRIPTION: Sets all numeric variables to 0, and all + string variables to empty strings. +------------------------------------------------------------ + SYNTAX: CLOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: CLOAD* arrayname +DESCRIPTION: Loads a numeric array from a file saved using + CSAVE*. +------------------------------------------------------------ + SYNTAX: CLR +DESCRIPTION: Sets all numeric variables to 0, and all + string variables to empty strings. +------------------------------------------------------------ + SYNTAX: COMMON variable [, ...] +DESCRIPTION: Designates variables to be passed to a CHAINed + program. +------------------------------------------------------------ + SYNTAX: CONT +DESCRIPTION: Continue a BASIC program after a STOP has been + executed. Program resumes at the line after + the STOP. +------------------------------------------------------------ + SYNTAX: CSAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: CSAVE* ArrayName +DESCRIPTION: Saves a numeric array into a file for later + loading by CLOAD*. +------------------------------------------------------------ + SYNTAX: DATA constant [, ...] +DESCRIPTION: Stores numeric and string constants to be + accessed by READ. +------------------------------------------------------------ + SYNTAX: DEF FNname[( arg [,...] )] = value +DESCRIPTION: Defines a single-line function. Single-line + functions require an equal sign. +------------------------------------------------------------ + SYNTAX: DEF FNname[( arg [,...] )] +DESCRIPTION: Defines a multiline function. Multi-line DEF + functions do not have an equal sign and must + end with FNEND. +------------------------------------------------------------ + SYNTAX: DEFDBL letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFINT letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFSNG letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + numeric variables. +------------------------------------------------------------ + SYNTAX: DEFSTR letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + string variables. +------------------------------------------------------------ + 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. Deleting + a non-existing line does not cause an error. +------------------------------------------------------------ + SYNTAX: DIM [# filenum,] variable([ lower TO ] upper) +DESCRIPTION: Declares variables and specifies the + dimensions of array variables. For array + variables, if the lower bound is not + provided, then the OPTION BASE value is used. + If filenum is provided, then the variable is + virtual. +------------------------------------------------------------ + SYNTAX: DSP variable [, ...]] +DESCRIPTION: Diagnostic command to display the value every + time the variable is assigned. To remove all + existing DSPs, execute DSP without any + variables. +------------------------------------------------------------ + SYNTAX: EDIT +DESCRIPTION: implementation defined. +------------------------------------------------------------ + SYNTAX: ELSE +DESCRIPTION: Introduces a default condition in a multi-line + IF statement. +------------------------------------------------------------ + SYNTAX: ELSEIF +DESCRIPTION: Introduces a secondary condition in a + multi-line IF statement. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: END IF +DESCRIPTION: Specifies the last line of a multi-line IF + definition. +------------------------------------------------------------ + SYNTAX: ERASE variable [, ...] +DESCRIPTION: Eliminates arrayed variables from a program. +------------------------------------------------------------ + SYNTAX: EXCHANGE variable, variable +DESCRIPTION: Swaps the values of two variables. Both + variables must be of the same type. +------------------------------------------------------------ + SYNTAX: EXIT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: EXIT FOR +DESCRIPTION: Immediately exits the inner-most FOR-NEXT + strucure. +------------------------------------------------------------ + SYNTAX: EXIT REPEAT +DESCRIPTION: Exit a REPEAT - UNTIL structure. +------------------------------------------------------------ + SYNTAX: FNEND +DESCRIPTION: Specifies the last line of a multi-line DEF + function. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: GO +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: GO SUB 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. +------------------------------------------------------------ + SYNTAX: GO TO line +DESCRIPTION: Branches program execution to the specified + line. The line may be a number or a label. +------------------------------------------------------------ + SYNTAX: GOODBYE +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: GOTO line +DESCRIPTION: Branches program execution to the specified + line. The line may be a number or a label. +------------------------------------------------------------ + SYNTAX: IF value THEN line1 [ELSE line2] +DESCRIPTION: Single line standard IF command. If the value + is non-zero, then branh to line1. If the + value is zero and ELSE is provided, then + branch to line2. Otherwise continue to the + next line. LABELS are not allowed. +------------------------------------------------------------ + SYNTAX: IF value THEN +DESCRIPTION: Top of a multi-line IF - END IF structure. If + the value 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. +------------------------------------------------------------ + SYNTAX: IMAGE "format string" +DESCRIPTION: Provides format string for PRINT USING + linenum. +------------------------------------------------------------ + SYNTAX: INPUT "prompt string" , variable [, ...] +DESCRIPTION: Reads input from the terminal after displaying + a prompt. +------------------------------------------------------------ + SYNTAX: INPUT # filenum , variable [, ...]s +DESCRIPTION: Reads input from the file specified by + filenum. +------------------------------------------------------------ + SYNTAX: INPUT variable [, ...] +DESCRIPTION: Reads input from the terminal. +------------------------------------------------------------ + SYNTAX: [LET] variable [, ...] = value +DESCRIPTION: Assigns the value to the variable. The LET + keyword is optional. +------------------------------------------------------------ + SYNTAX: LINE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: LINE INPUT [[#] filenum,]["prompt string";] + variable$ +DESCRIPTION: Reads entire line from the keyboard or a file + into variable$. +------------------------------------------------------------ + SYNTAX: LIST line1 [- line2] +DESCRIPTION: Lists BASIC program lines from line1 to line2 + to the console on stdout. +------------------------------------------------------------ + SYNTAX: LLIST line1 [- line2] +DESCRIPTION: Lists BASIC program lines from line1 to line2 + to the printer on stderr. +------------------------------------------------------------ + SYNTAX: LOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: LPRINT [USING format-string$;] value ... +DESCRIPTION: Send output to the printer (stderr). +------------------------------------------------------------ + SYNTAX: MAINTAINER +DESCRIPTION: This command is reserved for use by the + Bywater BASIC maintainer. It is not for the + BASIC programmer. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS HTML +DESCRIPTION: Dump COMMAND vs VERSION as HTML table +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS ID +DESCRIPTION: Dump COMMAND #define. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS MANUAL +DESCRIPTION: Dump COMMAND manual. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS_SWITCH +DESCRIPTION: Dump COMMAND switch. +------------------------------------------------------------ + SYNTAX: MAINTAINER CMDS TABLE +DESCRIPTION: Dump COMMAND table. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG OFF +DESCRIPTION: Disable degug tracing. +------------------------------------------------------------ + SYNTAX: MAINTAINER DEBUG ON +DESCRIPTION: Enable degug tracing. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS HTML +DESCRIPTION: Dump FUNCTION vs VERSION as HTML table. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS ID +DESCRIPTION: Dump FUNCTION #define. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS MANUAL +DESCRIPTION: Dump FUNCTION manual. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS SWITCH +DESCRIPTION: Dump FUNCTION switch. +------------------------------------------------------------ + SYNTAX: MAINTAINER FNCS TABLE +DESCRIPTION: Dump FUNCTION table. +------------------------------------------------------------ + SYNTAX: MAINTAINER MANUAL +DESCRIPTION: Dump manual for the currently selected OPTION + VERSION. +------------------------------------------------------------ + SYNTAX: MAINTAINER STACK +DESCRIPTION: Dump the BASIC stack. +------------------------------------------------------------ + SYNTAX: MARGIN # filenumber, width +DESCRIPTION: Sets the file margin for writing; filenumber + <= 0 is ignored. +------------------------------------------------------------ + SYNTAX: MAT arrayname = value +DESCRIPTION: Matrix operations: + MAT A = CON + MAT A = IDN + MAT A = ZER + MAT A = INV B + MAT A = TRN B + MAT A = (k) * B + MAT A = B + MAT A = B + C + MAT A = B - C + MAT A = B * C +------------------------------------------------------------ + SYNTAX: MAT INPUT arrayname +DESCRIPTION: Matrix input. +------------------------------------------------------------ + SYNTAX: MAT PRINT arrayname +DESCRIPTION: Matrix print. +------------------------------------------------------------ + SYNTAX: MAT READ arrayname +DESCRIPTION: Matrix read. +------------------------------------------------------------ + SYNTAX: MAT WRITE arrayname +DESCRIPTION: Matrix write. +------------------------------------------------------------ + SYNTAX: NEW +DESCRIPTION: Deletes the program in memory and clears all + variables. +------------------------------------------------------------ + SYNTAX: NEXT [variable] +DESCRIPTION: The bottom line of a FOR - NEXT structure. +------------------------------------------------------------ + SYNTAX: OF +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON value GOSUB line [, ...] +DESCRIPTION: Calls based on the rounded value. +------------------------------------------------------------ + SYNTAX: ON value GOTO line [, ...] +DESCRIPTION: Branches based on the rounded value. +------------------------------------------------------------ + SYNTAX: ON ERROR +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: ON ERROR GOTO errline +DESCRIPTION: When a trappable error occurs, execute GOTO + errline. The error handler must terminate + with a RESUME command. If the line number is + 0 (zerp), then use the default error handler. + Valid when OPTION ERROR GOTO. +------------------------------------------------------------ + SYNTAX: OPEN filename$ + FOR INPUT|OUTPUT|APPEND|BINARY|RANDOM|VIRTUAL + AS [#] fileenumber + [LEN [=] record-length] +DESCRIPTION: Opens a file for use. + RANDOM requires LEN. +------------------------------------------------------------ + SYNTAX: OPTION +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE DEGREES +DESCRIPTION: Configures these math functions to accept and + return angles in degrees: ACOS, ACS, ANGLE, + ARCSIN, ASIN, ASN, ARCTAN, ATN, ATAN, COS, + COT, CSC, SEC, SIN and TAN. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE GRADIANS +DESCRIPTION: Configures these math functions to accept and + return angles in gradians: ACOS, ANGLE, + ASIN, ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN + and TAN. +------------------------------------------------------------ + SYNTAX: OPTION ANGLE RADIANS +DESCRIPTION: Configures these math functions to accept and + return angles in radians: ACOS, ANGLE, ASIN, + ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN and + TAN. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC DECIMAL +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC FIXED +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION ARITHMETIC NATIVE +DESCRIPTION: Currently has no effect. +------------------------------------------------------------ + SYNTAX: OPTION BASE integer +DESCRIPTION: Sets the default lowest array subscript. +------------------------------------------------------------ + SYNTAX: OPTION BUGS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION BUGS BOOLEAN +DESCRIPTION: Boolean results are 1 or 0 instead of bitwise. +------------------------------------------------------------ + SYNTAX: OPTION BUGS OFF +DESCRIPTION: Disables bugs commonly found in many BASIC + dialects. +------------------------------------------------------------ + SYNTAX: OPTION BUGS ON +DESCRIPTION: Enables bugs commonly found in many BASIC + dialects. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE BINARY +DESCRIPTION: Causes string comparisons to be + case-sensitive. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE DATABASE +DESCRIPTION: Causes string comparisons to be + case-insensitive. +------------------------------------------------------------ + SYNTAX: OPTION COMPARE TEXT +DESCRIPTION: Causes string comparisons to be + case-insensitive. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE OFF +DESCRIPTION: Disables BASIC code coverage recording, + displayed using the LIST command. +------------------------------------------------------------ + SYNTAX: OPTION COVERAGE ON +DESCRIPTION: Enables BASIC code coverage recording, + displayed using the LIST command. +------------------------------------------------------------ + SYNTAX: OPTION DATE format$ +DESCRIPTION: Sets the date format string used by C + strftime() for DATE$. +------------------------------------------------------------ + SYNTAX: OPTION DIGITS integer +DESCRIPTION: Sets the number of significant digits for + PRINT. Setting the value to zero restores + the default. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE COMMAND name$ +DESCRIPTION: Disables the specified BASIC command. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE FUNCTION name$ +DESCRIPTION: Disables the specified BASIC function. +------------------------------------------------------------ + SYNTAX: OPTION DISABLE OPERATOR name$ +DESCRIPTION: Disables the specified BASIC operator. +------------------------------------------------------------ + SYNTAX: OPTION EDIT string$ +DESCRIPTION: Sets the program name used by the EDIT + command. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE COMMAND name$ +DESCRIPTION: Enables the specified BASIC command. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE FUNCTION name$ +DESCRIPTION: Enables the specified BASIC function. +------------------------------------------------------------ + SYNTAX: OPTION ENABLE OPERATOR name$ +DESCRIPTION: Enables the specified BASIC operator. +------------------------------------------------------------ + SYNTAX: OPTION ERROR +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ERROR GOSUB +DESCRIPTION: When an error occurs, GOSUB to the error + handler. The error handler exits with + RETURN. +------------------------------------------------------------ + SYNTAX: OPTION ERROR GOTO +DESCRIPTION: When an error occurs, GOTO to the error + handler. The error handler exits with + RESUME. +------------------------------------------------------------ + SYNTAX: OPTION EXPLICIT +DESCRIPTION: All variables must be declared using DIM. +------------------------------------------------------------ + SYNTAX: OPTION EXTENSION string$ +DESCRIPTION: Sets the BASIC filename extension, commonly + ".bas". +------------------------------------------------------------ + SYNTAX: OPTION FILES string$ +DESCRIPTION: Sets the program name used by the FILES + command. +------------------------------------------------------------ + SYNTAX: OPTION IMPLICIT +DESCRIPTION: Variables need not be declared using DIM, + provided arrays have no more that 10 + elements. This is the opposite of OPTION + EXPLICIT, and is the default for all versions + of BASIC. +------------------------------------------------------------ + SYNTAX: OPTION INDENT integer +DESCRIPTION: Sets indention level for LIST. Zero means no + indention. Default is 2. +------------------------------------------------------------ + SYNTAX: OPTION LABELS +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION LABELS OFF +DESCRIPTION: Disables text labels. +------------------------------------------------------------ + SYNTAX: OPTION LABELS ON +DESCRIPTION: Enables text labels. +------------------------------------------------------------ + SYNTAX: OPTION PROMPT string$ +DESCRIPTION: Sets the BASIC prompt. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT AT char$ +DESCRIPTION: Sets the PRINT AT character, commonly "@". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT BYTE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type BYTE, commonly "~". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT COMMENT char$ +DESCRIPTION: Sets the shortcut COMMENT character. +------------------------------------------------------------ + SYNTAX: OPTION PUNCT CURRENCY char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type CURRENCY, commonly "@". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT DOUBLE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type DOUBLE, commonly "#". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT FILENUM char$ +DESCRIPTION: Sets the FILE NUMBER prefix character, + commonly "#". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT IMAGE char$ +DESCRIPTION: Sets the shortcut IMAGE character, commonly + ":". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT INPUT char$ +DESCRIPTION: Sets the shortcut INPUT character, commonly + "!". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT INTEGER char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type INTEGER, commonly "%". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT LONG char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type LONG, commonly "&". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT LPAREN char$ +DESCRIPTION: Sets the LEFT PARENTHESIS character, commonly + "(". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT_PRINT char$ +DESCRIPTION: Sets the shortcut PRINT character, commonly + "?". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT QUOTE char$ +DESCRIPTION: Sets the QUOTE character, commonly """ +------------------------------------------------------------ + SYNTAX: OPTION PUNCT RPAREN char$ +DESCRIPTION: Sets the RIGHT PARENTHESIS character, commonly + ")". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT SINGLE char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type SINGLE, commonly "!". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT STATEMENT char$ +DESCRIPTION: Sets the statement seperator character, + commonly ":". +------------------------------------------------------------ + SYNTAX: OPTION PUNCT STRING char$ +DESCRIPTION: Sets the suffix character that indicates a + variable is of type STRING, commonly "$". +------------------------------------------------------------ + SYNTAX: OPTION RECLEN integer +DESCRIPTION: Sets the default RANDOM record length. +------------------------------------------------------------ + SYNTAX: OPTION RENUM string$ +DESCRIPTION: Sets the program name used by the RENUM + command. +------------------------------------------------------------ + SYNTAX: OPTION ROUND +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION ROUND BANK +DESCRIPTION: Round using the Banker rule. +------------------------------------------------------------ + SYNTAX: OPTION ROUND MATH +DESCRIPTION: Round using mathematical rules. +------------------------------------------------------------ + SYNTAX: OPTION ROUND TRUNCATE +DESCRIPTION: Round using truncation. +------------------------------------------------------------ + SYNTAX: OPTION SCALE integer +DESCRIPTION: Sets the number of digits to round after the + decimal point for PRINT. Setting the value + to zero disables rounding. +------------------------------------------------------------ + SYNTAX: OPTION SLEEP double +DESCRIPTION: Sets multiplier for SLEEP and WAIT. Zero + means no waiting. Default is 1. +------------------------------------------------------------ + SYNTAX: OPTION STDERR filename$ +DESCRIPTION: Sets the file used for STDERR, which is used + by LPRINT commands. +------------------------------------------------------------ + SYNTAX: OPTION STDIN filename$ +DESCRIPTION: Sets the file used for STDIN, which is used by + INPUT commands. +------------------------------------------------------------ + SYNTAX: OPTION STDOUT filename$ +DESCRIPTION: Sets the file used for STDOUT, which is used + by PRINT commands. +------------------------------------------------------------ + SYNTAX: OPTION STRICT +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION STRICT OFF +DESCRIPTION: Disables checking for implicit array creation + without using the DIM command. +------------------------------------------------------------ + SYNTAX: OPTION STRICT ON +DESCRIPTION: Enables checking for implicit array creation + without using the DIM command. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL ADM +DESCRIPTION: Enables ADM-3A terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL ANSI +DESCRIPTION: Enables ANSI terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TERMINAL NONE +DESCRIPTION: Disables terminal control codes for CLS, + COLOR, and LOCATE. +------------------------------------------------------------ + SYNTAX: OPTION TIME format$ +DESCRIPTION: Sets the time format string used by C + strftime() for TIME$. +------------------------------------------------------------ + SYNTAX: OPTION TRACE +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION TRACE OFF +DESCRIPTION: Disables displaying a stack trace when an + ERROR occurs. +------------------------------------------------------------ + SYNTAX: OPTION TRACE ON +DESCRIPTION: Enables displaying a stack trace when an ERROR + occurs. +------------------------------------------------------------ + SYNTAX: OPTION USING +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: OPTION USING ALL char$ +DESCRIPTION: Specifies the magic ALL character for the + PRINT USING command. A common value is "&". +------------------------------------------------------------ + SYNTAX: OPTION USING COMMA char$ +DESCRIPTION: Specifies the magic COMMA character for the + PRINT USING command. A common value is ",". +------------------------------------------------------------ + SYNTAX: OPTION USING DIGIT char$ +DESCRIPTION: Specifies the magic DIGIT character for the + PRINT USING command. A common value is "#". +------------------------------------------------------------ + SYNTAX: OPTION USING DOLLAR char$ +DESCRIPTION: Specifies the magic DOLLAR character for the + PRINT USING command. A common value is "$". +------------------------------------------------------------ + SYNTAX: OPTION USING EXRAD char$ +DESCRIPTION: Specifies the magic EXRAD character for the + PRINT USING command. A common value is "^". +------------------------------------------------------------ + SYNTAX: OPTION USING FILLER char$ +DESCRIPTION: Specifies the magic FILLER character for the + PRINT USING command. A common value is "*". +------------------------------------------------------------ + SYNTAX: OPTION USING FIRST char$ +DESCRIPTION: Specifies the magic FIRST character for the + PRINT USING command. A common value is "!". +------------------------------------------------------------ + SYNTAX: OPTION USING LENGTH char$ +DESCRIPTION: Specifies the magic LENGTH character for the + PRINT USING command. A common value is "\". +------------------------------------------------------------ + SYNTAX: OPTION USING LITERAL char$ +DESCRIPTION: Specifies the magic LITERAL character for the + PRINT USING command. A common value is "_". +------------------------------------------------------------ + SYNTAX: OPTION USING MINUS char$ +DESCRIPTION: Specifies the magic MINUS character for the + PRINT USING command. A common value is "-". +------------------------------------------------------------ + SYNTAX: OPTION USING PERIOD char$ +DESCRIPTION: Specifies the magic PERIOD character for the + PRINT USING command. A common value is ".". +------------------------------------------------------------ + SYNTAX: OPTION USING PLUS char$ +DESCRIPTION: Specifies the magic PLUS character for the + PRINT USING command. A common value is "+". +------------------------------------------------------------ + SYNTAX: OPTION VERSION version$ +DESCRIPTION: Selects a specific BASIC version, which is a + combination of OPTION settings, commands, + functions and operators. If no version is + specified, displays a list of the available + versions. +------------------------------------------------------------ + SYNTAX: OPTION ZONE integer +DESCRIPTION: Sets the PRINT zone width. Setting the value + to zero restores the default. +------------------------------------------------------------ + SYNTAX: POP +DESCRIPTION: Pops one GOSUB from the return stack. +------------------------------------------------------------ + SYNTAX: PRINT # filenum , [USING format$;] value ... +DESCRIPTION: Sends output to a file. +------------------------------------------------------------ + SYNTAX: PRINT [USING format$;] value ... +DESCRIPTION: Sends output to the screen. +------------------------------------------------------------ + SYNTAX: READ variable [, ...] +DESCRIPTION: Reads values from DATA statements. +------------------------------------------------------------ + SYNTAX: RECALL ArrayName +DESCRIPTION: Loads a numeric array from a file saved using + STORE. +------------------------------------------------------------ + SYNTAX: REM ... +DESCRIPTION: Remark. +------------------------------------------------------------ + SYNTAX: RENUM +DESCRIPTION: Implementation defined. +------------------------------------------------------------ + SYNTAX: RENUMBER +DESCRIPTION: Implementation defined. +------------------------------------------------------------ + SYNTAX: REPEAT +DESCRIPTION: Top of a REPEAT - UNTIL structure. +------------------------------------------------------------ + SYNTAX: RESTORE [line] +DESCRIPTION: Resets the line used for the next READ + statement. line may be either a number or a + label. +------------------------------------------------------------ + SYNTAX: RESUME +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to ERL. +------------------------------------------------------------ + SYNTAX: RESUME line +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to the specified + line. +------------------------------------------------------------ + SYNTAX: RESUME NEXT +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to the line after + ERL. +------------------------------------------------------------ + SYNTAX: RESUME 0 +DESCRIPTION: Used in an error handler to specify the next + line to execute. Branch to ERL. +------------------------------------------------------------ + SYNTAX: RETURN +DESCRIPTION: Concludes a subroutine called by GOSUB. +------------------------------------------------------------ + SYNTAX: RUN filename$ +DESCRIPTION: Loads a new BAASIC program and executes the + program from the start. +------------------------------------------------------------ + SYNTAX: RUN line +DESCRIPTION: Executes the program in memory beginning at + line. +------------------------------------------------------------ + SYNTAX: RUN +DESCRIPTION: Executes the program in memory from the start. +------------------------------------------------------------ + SYNTAX: SAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: SCRATCH [# X] +DESCRIPTION: SCRATCH Deletes the program in memory and + clears all variables. SCRATCH # X Sets the + file mode to writing. +------------------------------------------------------------ + SYNTAX: STEP +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: STORE ArrayName +DESCRIPTION: Saves a numeric array into a file for later + loading by RECALL. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: SUBEND +DESCRIPTION: Specifies the last line of a multi-line SUB + definition. Same as END SUB. +------------------------------------------------------------ + SYNTAX: SWAP variable, variable +DESCRIPTION: Swaps the values of two variables. Both + variables must be of the same type. +------------------------------------------------------------ + SYNTAX: SYSTEM +DESCRIPTION: Exits to the operating system. +------------------------------------------------------------ + SYNTAX: TEXT letter[-letter] [, ...] +DESCRIPTION: Declares variables with single-letter names as + string variables. +------------------------------------------------------------ + SYNTAX: THEN +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: TLOAD [filename$] +DESCRIPTION: Loads an ASCII BASIC program into memory. +------------------------------------------------------------ + SYNTAX: TO +DESCRIPTION: Syntax Error. +------------------------------------------------------------ + SYNTAX: TRACE +DESCRIPTION: Enables tracing. +------------------------------------------------------------ + SYNTAX: TRACE OFF +DESCRIPTION: Disables tracing. +------------------------------------------------------------ + SYNTAX: TRACE ON +DESCRIPTION: Enables tracing. +------------------------------------------------------------ + SYNTAX: TSAVE [filename$] +DESCRIPTION: Saves the current program into the file + filename$ in ASCII format. +------------------------------------------------------------ + SYNTAX: UNTIL value +DESCRIPTION: Bottom of a REPEAT - UNTIL. If the value is + non-zero, then the loop is terminated. +------------------------------------------------------------ + SYNTAX: WEND +DESCRIPTION: Bottom of a WHILE - WEND structure. +------------------------------------------------------------ + SYNTAX: WHILE value +DESCRIPTION: Top of a WHILE - WEND structure. If the value + is non-zero, then the loop is terminated. +------------------------------------------------------------ + + +============================================================ + FUNCTIONS +============================================================ + + +------------------------------------------------------------ + SYNTAX: N = ABS( X ) + PARAMETER: X is a number +DESCRIPTION: The absolute value of X. +------------------------------------------------------------ + SYNTAX: N = ACS( X ) + PARAMETER: X is a number +DESCRIPTION: The arccosine of X in radians, where 0 <= + ACS(X) <= PI. X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ACSD( X ) + PARAMETER: X is a number +DESCRIPTION: The arccosine of X in degrees, where 0 <= + ACSD(X) <= 180. X shall be in the range -1 + <= X <= 1. +------------------------------------------------------------ + SYNTAX: N = ACSG( X ) + PARAMETER: X is a number +DESCRIPTION: The arccosine of X in gradians, where 0 <= + ACS(X) <= 200. X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ARCSIN( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in radians, where -PI/2 <= + ARCSIN(X) <= PI/2; X shall be in the range -1 + <= X <= 1. +------------------------------------------------------------ + SYNTAX: N = ARCTAN( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in radians, i.e. the angle + whose tangent is X, where -PI/2 < ARCTAN(X) < + PI/2. +------------------------------------------------------------ + SYNTAX: N = ASC( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The numeric code for the first letter in A$. + For example, ASC("ABC") returns 65 on ASCII + systems. +------------------------------------------------------------ + SYNTAX: N = ASC( A$, X ) + PARAMETER: A$ is a string, LEN >= 1 + PARAMETER: X is a number, [1,MAXLEN] +DESCRIPTION: The numeric code of the Xth character in A$. + Same as ASC(MID$(A$,X)). +------------------------------------------------------------ + SYNTAX: N = ASCII( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The numeric code for the first letter in A$. + For example, ASCII("ABC") returns 65 on ASCII + systems. +------------------------------------------------------------ + SYNTAX: N = ASN( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in radians, where -PI/2 <= + ASN(X) <= PI/2; X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ASND( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in degrees, where -90 <= + ASN(X) <= 90; X shall be in the range -1 <= X + <= 1. +------------------------------------------------------------ + SYNTAX: N = ASNG( X ) + PARAMETER: X is a number +DESCRIPTION: The arcsine of X in gradians, where -100 <= + ASNG(X) <= 100; X shall be in the range -1 <= + X <= 1. +------------------------------------------------------------ + SYNTAX: N = ATAN( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in radians, i.e. the angle + whose tangent is X, where -PI/2 < ATAN(X) < + PI/2. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = ATND( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in degrees, i.e. the angle + whose tangent is X, where -90 < ATND(X) < 90. +------------------------------------------------------------ + SYNTAX: N = ATNG( X ) + PARAMETER: X is a number +DESCRIPTION: The arctangent of X in gradians, i.e. the + angle whose tangent is X, where -100 < + ATND(X) < 100. +------------------------------------------------------------ + SYNTAX: N = CDBL( X ) + PARAMETER: X is a number, [MINDBL,MAXDBL] +DESCRIPTION: The double-precision value of X. +------------------------------------------------------------ + SYNTAX: S$ = CHAR( X, Y ) + PARAMETER: X is a number, [0,255] + PARAMETER: Y is a number, [0,MAXLEN] +DESCRIPTION: The string Y bytes long consisting of CHR$(X). + Same as STRING$(Y,X). +------------------------------------------------------------ + SYNTAX: S$ = CHAR$( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHAR$(65) returns "A". +------------------------------------------------------------ + SYNTAX: S$ = CHR( X ) + PARAMETER: X is a number +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHR(65) returns "A". +------------------------------------------------------------ + SYNTAX: S$ = CHR$( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The one-character string with the character + corresponding to the numeric code X. On + ASCII systems, CHR$(65) returns "A". +------------------------------------------------------------ + SYNTAX: N = CINT( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The short (16-bit) integer value of X. +------------------------------------------------------------ + SYNTAX: N = CLG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: S$ = CLK( X ) + PARAMETER: X is a number +DESCRIPTION: The time of day in 24-hour notation according + to ISO 3307. For example, the value of CLK + at 11:15 AM is "11:15:00". If there is no + clock available, then the value of CLK shall + be "99:99:99". The value of TIME$ at + midnight is "00:00:00". The value of + parameter X is ignored. +------------------------------------------------------------ + SYNTAX: S$ = CLK$ +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". +------------------------------------------------------------ + SYNTAX: N = CLOG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = CLOSE( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: Close file number X. +------------------------------------------------------------ + SYNTAX: N = CLS +DESCRIPTION: Clears the screen. Cursor is positioned at row + 1, column 1. +------------------------------------------------------------ + SYNTAX: N = CODE( A$ ) + PARAMETER: A$ is a string, LEN >= 1 +DESCRIPTION: The numeric code for the first letter in A$. + For example, CODE("ABC") returns 65 on ASCII + systems. +------------------------------------------------------------ + SYNTAX: N = COS( X ) + PARAMETER: X is a number +DESCRIPTION: The cosine of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = COSD( X ) + PARAMETER: X is a number +DESCRIPTION: The cosine of X, where X is in degrees. +------------------------------------------------------------ + SYNTAX: N = COSG( X ) + PARAMETER: X is a number +DESCRIPTION: The cosine of X, where X is in gradians. +------------------------------------------------------------ + SYNTAX: N = COUNT +DESCRIPTION: The current cursor position in the line. +------------------------------------------------------------ + SYNTAX: N = CSH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic cosine of X. +------------------------------------------------------------ + SYNTAX: N = CSNG( X ) + PARAMETER: X is a number, [MINFLT,MAXFLT] +DESCRIPTION: The single-precision value of X. +------------------------------------------------------------ + SYNTAX: S$ = CUR( 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. +------------------------------------------------------------ + SYNTAX: N = DEG +DESCRIPTION: Configures the math functions to accept and + return angles in degrees. +------------------------------------------------------------ + SYNTAX: N = DEG( X ) + PARAMETER: X is a number +DESCRIPTION: The number of degrees in X radians. +------------------------------------------------------------ + SYNTAX: N = DEGREE +DESCRIPTION: Configures the math functions to accept and + return angles in degrees. +------------------------------------------------------------ + SYNTAX: N = DEGREE( X ) + PARAMETER: X is a number +DESCRIPTION: The number of degrees in X radians. +------------------------------------------------------------ + SYNTAX: N = DET +DESCRIPTION: The determinant of the last MAT INV. Zero + means error. +------------------------------------------------------------ + SYNTAX: N = DIGITS( X, Y ) + PARAMETER: X is a number, [0,255] + PARAMETER: Y is a number, [0,255] +DESCRIPTION: X is the number of significiant digits to + print for numbers (0..17). If X = 0 then + disabled. Y is the number of decimal places + to round (0..17). If Y = 0 then disabled. +------------------------------------------------------------ + SYNTAX: N = ERL +DESCRIPTION: The line number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERR +DESCRIPTION: The error number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERRL +DESCRIPTION: The line number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERRN +DESCRIPTION: The error number of the most recent error. +------------------------------------------------------------ + SYNTAX: N = ERROR( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: Simulate the error number in X. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + SYNTAX: N = EXAM( X ) + PARAMETER: X is a number, [MINLNG,MAXLNG] +DESCRIPTION: The value read from hardware address X. + Causes ERROR 73. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = FETCH( X ) + PARAMETER: X is a number, [MINLNG,MAXLNG] +DESCRIPTION: The value read from hardware address X. + Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = FILL( X, Y ) + PARAMETER: X is a number, [MINLNG,MAXLNG] + PARAMETER: Y is a number, [0,255] +DESCRIPTION: Sends Y to hardware address X. Causes ERROR + 73. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = FLOW +DESCRIPTION: Turn tracing ON +------------------------------------------------------------ + SYNTAX: N = FRAC( X ) + PARAMETER: X is a number +DESCRIPTION: The fractional part of X, i.e. X - IP(X). +------------------------------------------------------------ + SYNTAX: N = FRE +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. +------------------------------------------------------------ + 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 only and it always returns a + fixed value of 32000.The value of A$ is + ignored. +------------------------------------------------------------ + SYNTAX: N = FRE( X ) + PARAMETER: X is a number +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. The value of X is + ignored. +------------------------------------------------------------ + SYNTAX: N = FREE +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. +------------------------------------------------------------ + SYNTAX: N = FREE( X ) + PARAMETER: X is a number +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. The value of X is + ignored. +------------------------------------------------------------ + SYNTAX: N = FREE( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000.The value of A$ is + ignored. +------------------------------------------------------------ + SYNTAX: N = GRAD +DESCRIPTION: Configures the math functions to accept and + return angles in gradians. +------------------------------------------------------------ + SYNTAX: N = GRADIAN +DESCRIPTION: Configures the math functions to accept and + return angles in gradians. +------------------------------------------------------------ + SYNTAX: N = HOME +DESCRIPTION: Clears the screen. Cursor is positioned at row + 1, column 1. +------------------------------------------------------------ + SYNTAX: N = INDEX( 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. +------------------------------------------------------------ + SYNTAX: S$ = INKEY$ +DESCRIPTION: The keypress, if available. If a keypress is + not available, then immediately returns an + empty string. If not supported by the + platform, then always returns an empty + string, so use INPUT$(1) instead. +------------------------------------------------------------ + SYNTAX: N = INP( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The value read from machine port X. Causes + ERROR 73. +------------------------------------------------------------ + SYNTAX: S$ = INPUT$( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X characters, read from the + terminal. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = KEY +DESCRIPTION: The keypress, if available. If a keypress is + not available, then immediately returns an + empty string. If not supported by the + platform, then always returns an empty + string, so use INPUT$(1) instead. +------------------------------------------------------------ + SYNTAX: S$ = KEY$ +DESCRIPTION: The keypress, if available. If a keypress is + not available, then immediately returns an + empty string. If not supported by the + platform, then always returns an empty + string, so use INPUT$(1) instead. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = LEN( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +DESCRIPTION: The length of A$. +------------------------------------------------------------ + SYNTAX: N = LGT( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: S$ = LIN( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string X bytes long of newline characters. +------------------------------------------------------------ + SYNTAX: N = LN( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The natural logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LOG( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The natural logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LOG10( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The common logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: N = LOGE( X ) + PARAMETER: X is a number, > 0 +DESCRIPTION: The natural logarithm of X; X shall be greater + than zero. +------------------------------------------------------------ + SYNTAX: S$ = MAX( A$, B$ ) + PARAMETER: A$ is a string, LEN >= 0 + PARAMETER: B$ is a string, LEN >= 0 +DESCRIPTION: The larger of the parameters. +------------------------------------------------------------ + SYNTAX: N = MAX( X, Y ) + PARAMETER: X is a number + PARAMETER: Y is a number +DESCRIPTION: The larger of the parameters. +------------------------------------------------------------ + SYNTAX: N = MEM +DESCRIPTION: The number of bytes of available memory. This + function is provided for backward + compatibility only and it always returns a + fixed value of 32000. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = MIN( X, Y ) + PARAMETER: X is a number + PARAMETER: Y is a number +DESCRIPTION: The smaller of the parameters. +------------------------------------------------------------ + SYNTAX: S$ = MIN( A$, B$ ) + PARAMETER: A$ is a string, LEN >= 0 + PARAMETER: B$ is a string, LEN >= 0 +DESCRIPTION: The smaller of the parameters. +------------------------------------------------------------ + SYNTAX: N = NOFLOW +DESCRIPTION: Turn tracing OFF +------------------------------------------------------------ + SYNTAX: N = NOTRACE +DESCRIPTION: Turn tracing OFF +------------------------------------------------------------ + SYNTAX: N = NUM +DESCRIPTION: The number of values processed by the last MAT + INPUT. Zero means error. +------------------------------------------------------------ + SYNTAX: N = NUM( A$ ) + PARAMETER: A$ is a string, LEN >= 0 +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, NUM( " 123.5 " ) = 123.5, NUM( + "2.E-99" ) could be zero, and NUM( "MCMXVII" + ) causes an exception. +------------------------------------------------------------ + SYNTAX: S$ = NUM$( X ) + PARAMETER: X is a number +DESCRIPTION: The string generated by the print-statement as + the numeric-representation of the value + associated with X. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = PAUSE( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then PAUSE + does nothing. The resolution is + implementation defined. +------------------------------------------------------------ + SYNTAX: N = PDL( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The value read from machine port X. Causes + ERROR 73. +------------------------------------------------------------ + SYNTAX: N = PEEK( X ) + PARAMETER: X is a number, [MINLNG,MAXLNG] +DESCRIPTION: The value read from hardware address X. + Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = PI +DESCRIPTION: The constant 3.14159 which is the ratio of the + circumference of a circle to its diameter. +------------------------------------------------------------ + SYNTAX: N = PI( X ) + PARAMETER: X is a number +DESCRIPTION: The constant 3.14159 which is the ratio of the + circumference of a circle to its diameter, + times X. +------------------------------------------------------------ + SYNTAX: N = PIN( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: The value read from machine port X. Causes + ERROR 73. +------------------------------------------------------------ + 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. Causes ERROR + 73. +------------------------------------------------------------ + SYNTAX: N = POS( X ) + PARAMETER: X is a number, [MININT,MAXINT] +DESCRIPTION: The current cursor position in the line for + file X. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = PRECISION( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: X is the number of decimal places to round + (0..17). If X = 0 then disabled. +------------------------------------------------------------ + SYNTAX: N = RAD +DESCRIPTION: Configures the math functions to accept and + return angles in radians. +------------------------------------------------------------ + SYNTAX: N = RAD( X ) + PARAMETER: X is a number +DESCRIPTION: The number of radians in X degrees. +------------------------------------------------------------ + SYNTAX: N = RADIAN +DESCRIPTION: Configures the math functions to accept and + return angles in radians. +------------------------------------------------------------ + SYNTAX: N = RAN +DESCRIPTION: Seeds the pseudo-random number generator with + TIME. +------------------------------------------------------------ + SYNTAX: N = RAN( X ) + PARAMETER: X is a number +DESCRIPTION: Seeds the pseudo-random number generator with + X. +------------------------------------------------------------ + SYNTAX: N = RANDOM +DESCRIPTION: Seeds the pseudo-random number generator with + TIME. +------------------------------------------------------------ + SYNTAX: N = RANDOM( X ) + PARAMETER: X is a number +DESCRIPTION: Seeds the pseudo-random number generator with + X. +------------------------------------------------------------ + SYNTAX: N = RANDOMIZE +DESCRIPTION: Seeds the pseudo-random number generator with + TIME. +------------------------------------------------------------ + SYNTAX: N = RANDOMIZE( X ) + PARAMETER: X is a number +DESCRIPTION: Seeds the pseudo-random number generator with + X. +------------------------------------------------------------ + SYNTAX: N = RESET +DESCRIPTION: Close all open files. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: S$ = SEG( 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. +------------------------------------------------------------ + SYNTAX: S$ = SEG$( 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. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = SIN( X ) + PARAMETER: X is a number +DESCRIPTION: The sine of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = SIND( X ) + PARAMETER: X is a number +DESCRIPTION: The sine of X, where X is in degrees. +------------------------------------------------------------ + SYNTAX: N = SING( X ) + PARAMETER: X is a number +DESCRIPTION: The sine of X, where X is in gradians. +------------------------------------------------------------ + SYNTAX: N = SINH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic sine of X. +------------------------------------------------------------ + SYNTAX: N = SLEEP( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then SLEEP + does nothing. The resolution is + implementation defined. +------------------------------------------------------------ + SYNTAX: N = SNH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic sine of X. +------------------------------------------------------------ + SYNTAX: S$ = SPA( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X blank spaces. +------------------------------------------------------------ + SYNTAX: S$ = SPACE( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X blank spaces. +------------------------------------------------------------ + SYNTAX: S$ = SPACE$( X ) + PARAMETER: X is a number, [0,MAXLEN] +DESCRIPTION: The string of X blank spaces. +------------------------------------------------------------ + SYNTAX: S$ = SPC( X ) + PARAMETER: X is a number +DESCRIPTION: The string of X spaces. Only for use within + the PRINT command. +------------------------------------------------------------ + SYNTAX: N = SQR( X ) + PARAMETER: X is a number, >= 0 +DESCRIPTION: The non-negative square root of X; X shall be + non-negative. +------------------------------------------------------------ + SYNTAX: N = SQRT( X ) + PARAMETER: X is a number, >= 0 +DESCRIPTION: The non-negative square root of X; X shall be + non-negative. +------------------------------------------------------------ + SYNTAX: S$ = STR( 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). +------------------------------------------------------------ + 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. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + 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$. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + SYNTAX: N = STUFF( X, Y ) + PARAMETER: X is a number, [MINLNG,MAXLNG] + PARAMETER: Y is a number, [0,255] +DESCRIPTION: Sends Y to hardware address X. Causes ERROR + 73. +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = TAN( X ) + PARAMETER: X is a number +DESCRIPTION: The tangent of X, where X is in radians. +------------------------------------------------------------ + SYNTAX: N = TAND( X ) + PARAMETER: X is a number +DESCRIPTION: The tangent of X, where X is in degrees. +------------------------------------------------------------ + SYNTAX: N = TANG( X ) + PARAMETER: X is a number +DESCRIPTION: The tangent of X, where X is in gradians. +------------------------------------------------------------ + SYNTAX: N = TANH( X ) + PARAMETER: X is a number +DESCRIPTION: The hyperbolic tangent of X. +------------------------------------------------------------ + SYNTAX: N = TI +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). +------------------------------------------------------------ + SYNTAX: S$ = TI$ +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". +------------------------------------------------------------ + SYNTAX: N = TIM +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). +------------------------------------------------------------ + SYNTAX: N = TIM( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: If X is 0, returns minutes in current hour. + If X is 1, returns hours in current day. If + X is 2, returns days in current year. If X + is 3, returns years since 1900. Any other + value for X is an ERROR. +------------------------------------------------------------ + 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). +------------------------------------------------------------ + SYNTAX: N = TIME( X ) + PARAMETER: X is a number +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). The value of the parameter + X is ignored. +------------------------------------------------------------ + 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". +------------------------------------------------------------ + SYNTAX: S$ = TIME$( X ) + PARAMETER: X is a number +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". The value of X is + ignored. +------------------------------------------------------------ + SYNTAX: N = TOP +DESCRIPTION: The address of the top of available memory. + This function is provided for backward + compatibility only and it always returns a + fixed value of 32000. +------------------------------------------------------------ + SYNTAX: N = TRACE +DESCRIPTION: Turn tracing ON +------------------------------------------------------------ + SYNTAX: N = TROFF +DESCRIPTION: Turn tracing OFF +------------------------------------------------------------ + SYNTAX: N = TRON +DESCRIPTION: Turn tracing ON +------------------------------------------------------------ + 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. +------------------------------------------------------------ + SYNTAX: N = VTAB( X ) + PARAMETER: X is a number, [0,255] +DESCRIPTION: Savme as LOCATE X, 1. +------------------------------------------------------------ + SYNTAX: N = WAIT( X ) + PARAMETER: X is a number +DESCRIPTION: The program pauses for X times the value of + OPTION SLEEP seconds. If the result is zero, + negative, or more than INT_MAX then WAIT does + nothing. The resolution is implementation + defined. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + 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. Causes ERROR 73. +------------------------------------------------------------ + SYNTAX: N = WIDTH( X, Y ) + PARAMETER: X is a number, [MININT,MAXINT] + PARAMETER: Y is a number, [0,255] +DESCRIPTION: If X = 0, sets the console width to Y. + If X < 0, sets the printer width to Y. + If X is an open file number, sets the file + line width to Y. + Otherwise sets the console rows to X and the + line width to Y. + A value of zero for Y means no wrapping will + occur. +------------------------------------------------------------ + + +============================================================ + OPERATORS +============================================================ + + +------------------------------------------------------------ + SYNTAX: X ** Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: X [ Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: X ^ Y +DESCRIPTION: Exponential + PRECEDENCE: 14 +------------------------------------------------------------ + SYNTAX: # X +DESCRIPTION: Posation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: + X +DESCRIPTION: Posation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: - X +DESCRIPTION: Negation + PRECEDENCE: 13 +------------------------------------------------------------ + SYNTAX: X * Y +DESCRIPTION: Multiplication + PRECEDENCE: 12 +------------------------------------------------------------ + SYNTAX: X / Y +DESCRIPTION: Division + PRECEDENCE: 12 +------------------------------------------------------------ + SYNTAX: X \ Y +DESCRIPTION: Integer Division + PRECEDENCE: 11 +------------------------------------------------------------ + SYNTAX: X MOD Y +DESCRIPTION: Integer Modulus + PRECEDENCE: 10 +------------------------------------------------------------ + SYNTAX: X + Y +DESCRIPTION: Addition + PRECEDENCE: 9 +------------------------------------------------------------ + SYNTAX: X - Y +DESCRIPTION: Subtraction + PRECEDENCE: 9 +------------------------------------------------------------ + SYNTAX: X & Y +DESCRIPTION: Concatenation + PRECEDENCE: 8 +------------------------------------------------------------ + SYNTAX: X < Y +DESCRIPTION: Less than + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X <= Y +DESCRIPTION: Less than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X <> Y +DESCRIPTION: Not Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X = Y +DESCRIPTION: Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X =< Y +DESCRIPTION: Less than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X => Y +DESCRIPTION: Greater than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X > Y +DESCRIPTION: Greater than + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X >< Y +DESCRIPTION: Not Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: X >= Y +DESCRIPTION: Greater than or Equal + PRECEDENCE: 7 +------------------------------------------------------------ + SYNTAX: NOT X +DESCRIPTION: Bitwise NOT + PRECEDENCE: 6 +------------------------------------------------------------ + SYNTAX: X AND Y +DESCRIPTION: Bitwise AND + PRECEDENCE: 5 +------------------------------------------------------------ + SYNTAX: X OR Y +DESCRIPTION: Bitwise OR + PRECEDENCE: 4 +------------------------------------------------------------ + SYNTAX: X XOR Y +DESCRIPTION: Bitwise Exclusive OR + PRECEDENCE: 3 +------------------------------------------------------------ + SYNTAX: X XRA Y +DESCRIPTION: Bitwise Exclusive OR + PRECEDENCE: 3 +------------------------------------------------------------ + +