diff --git a/doc/Vintage_BASIC_Users_Guide.html b/doc/Vintage_BASIC_Users_Guide.html index 4b52b84..97d76ad 100644 --- a/doc/Vintage_BASIC_Users_Guide.html +++ b/doc/Vintage_BASIC_Users_Guide.html @@ -5,11 +5,11 @@

Vintage BASIC User's Guide 1.0.3

-

© 2009–2017, Lyle +

© 2009–2017, Lyle Kopnicky

Congratulations on installing Vintage BASIC! You are now the proud owner of a copy of a versatile tool for BASIC development.

-

Vintage BASIC is a language derived from the Microsoft's +

Vintage BASIC is a language derived from Microsoft's original Altair BASIC. It would feel right at home on a Commodore 64. The design tensions of @@ -21,7 +21,7 @@

Vintage BASIC User's Guide 1.0.3

  • Stick fairly close to the behavior of Microsoft BASIC v2 as found on the Commodore 64.
  • Be informed by (but not always stick to) the ANSI Minimal -BASIC standard (ANSI X.360-1978).
  • +BASIC standard (ANSI X3.60-1978).
  • Relax constraints in the language where it is easy to do so without compromising compatibility.
  • @@ -101,7 +101,7 @@

    BASIC

    Control flow will end when your program reaches the end of the lines, when an END or STOP statement is encountered, or when an error occurs. Errors may occur -during parsing or execution, and always being with an exclamation point +during parsing or execution, and always begin with an exclamation point (!).

    BASIC Syntax

    @@ -159,7 +159,7 @@

    BASIC Precision depends upon your platform, but is generally IEEE bin32 (single precision). There are no special IEEE values, like +Inf or NaN. String literals are enclosed in quotes, e.g. "HELLO". -There are no escape sequences. To generate a quote character, append a CHR$(34). +There are no escape sequences. To generate a quote character, use a CHR$(34).
    varname
    Variable names can include any number of letters followed by any number @@ -175,7 +175,7 @@

    BASIC are considered the same.

    Variables can store integers, floating-point -numbers or strings. Integer variables are mainly there to save storage +numbers, strings or user-defined functions. Integer variables are mainly there to save storage memory; in calculations they are converted to floats. String variable names are ended with a $, and integer variables with a %, while floating-point @@ -186,7 +186,7 @@

    BASIC value in A% without a conflict.

    var
    Variables can also be scalar or array. Scalar variables are -indicated by an variable name alone. Array variables are accessed by +indicated by a variable name alone. Array variables are accessed by following the variable name with parentheses enclosing a comma-separated list of expressions whose values are indices into the array. For example, A(3) is the value from @@ -214,7 +214,7 @@

    BASIC keywords, so they cannot be used in variable names. See the list of builtin functions below.

    (expr)
    -
    A parenthesized expression has the same value of +
    A parenthesized expression has the same value as the expression. Parentheses can be used to override operator precedence.
    - expr
    @@ -236,8 +236,8 @@

    BASIC value of the second expression. Division by zero is an error.
    expr1 + expr2
    -
    Addition. Adds the value of the first expression to the -value of the second expression.
    +
    Addition. For numbers, adds the value of the first expression to the +value of the second expression. For strings, concatenates two strings.
    expr1 - expr2
    @@ -245,13 +245,13 @@

    BASIC from the value of the first expression.
    expr1 = expr2
    -
    Equality test. Evaluates to 0 -if the two strings or numbers are equal, -1 +
    Equality test. Evaluates to -1 +if the two strings or numbers are equal, 0 if they differ.
    expr1 <> expr2
    -
    Inequality test. Evaluates to -1 -if the two strings or numbers are equal, 0 if +
    Inequality test. Evaluates to 0 +if the two strings or numbers are equal, -1 if they differ.
    expr1 < expr2
    @@ -266,12 +266,12 @@

    BASIC
    expr1 > expr2
    Greater than. Evaluates to -1 if -the first string or number is less than the second, 0 +the first string or number is greater than the second, 0 otherwise. (Strings are compared alphabetically.)
    expr1 >= expr2
    Greater than or equal. Evaluates to -1 -if the first string or number is less than or equal to the second, 0 +if the first string or number is greater than or equal to the second, 0 otherwise. (Strings are compared alphabetically.)
    NOT expr
    Negates a boolean expression. Specifically, nonzero values @@ -376,7 +376,7 @@

    Builtin float)
    In its first form, returns a substring starting from the specified index (1-based), through the end of the string. In the second -form, returns a substring starting an index specified by the second +form, returns a substring starting at the index specified by the second argument, with the number of characters specified by the third argument. Indexes less than one or string lengths less than zero will result in a runtime error. Any attempt to extract characters beyond the @@ -389,7 +389,7 @@

    Builtin error, while numbers too large will result in the whole string being returned.

    RND(float)
    -
    Psuedorandom number generator. The behavior is different +
    Pseudorandom number generator. The behavior is different depending on the value passed. If the value is positive, the result will be a new random value between 0 and 1 (including 0 but not 1). If the value is zero, the result will be a repeat of the last random @@ -408,7 +408,7 @@

    Builtin
    SQR(float)
    Returns the square root of the value. Argument must be non-negative.
    -
    STR(float)
    +
    STR$(float)
    Returns a string representation of the floating-point value, as it would be printed by PRINT, but without the trailing space.
    @@ -453,7 +453,7 @@

    BASIC variable names that may be used in the expression. While the standard allows only for numeric functions of a single floating-point variable, Vintage BASIC permits string, integer or -floating-point functions ofany number and type of arguments. Example: DEF +floating-point functions of any number and type of arguments. Example: DEF FN F(X) = X^2 + 3*X - 4. The argument variables shadow the original variables; that is, the value of the original variable with the same name will be restored after the function is evaluated. @@ -467,7 +467,7 @@

    BASIC literal values; they can be any expression. Attempting to re-dimension an array will produce an error. Arrays can be referenced without dimensioning; in that case they are automatically created as -one-dimenional arrays with an upper bound of 10. Example: DIM +one-dimensional arrays with an upper bound of 10. Example: DIM RX$(20, 5) creates a two-dimensional, 20x5 array of strings.

    END
    @@ -486,7 +486,7 @@

    BASIC value of the control variable has not exceeded the value of the end expression, control will continue with the statement following the FOR. -But if the value of the control value exceeds end (greater than +But if the value of the control variable exceeds end (greater than end if increment is positive, less than end if increment is negative), control will pass to the statement following the NEXT. @@ -539,7 +539,7 @@

    BASIC will be re-prompted. The user will also be re-prompted (with a double question mark) if the user enters insufficient values to fill the variables. The variables may be scalar or (indexed) array variables. -Examples: INPUT "NAME AND AGE";NA$(I), AG(I).

    +Example: INPUT "NAME AND AGE";NA$(I), AG(I).
    LET var = expr
    Evaluates the expression and assigns the value to the variable. The LET keyword is optional.
    @@ -547,7 +547,7 @@

    BASIC
    Returns control to a FOR statement to determine whether the loop should be repeated. If the termination condition has not been met, control will proceed with the -line following the FOR statement. If the +statement following the FOR statement. If the termination condition has been met, control will proceed with the statement following the NEXT. How does the interpreter determine which FOR goes with the @@ -599,6 +599,8 @@

    BASIC with a leading space, so that they take up the same amount of space as negative numbers. Example: PRINT "TURN";TU, "YOU HAVE";LI;"LIVES LEFT".

    +
    ?
    +
    An alias for PRINT.
    RANDOMIZE
    Re-seeds the random number generator used for the RND function, based on the number of seconds that have elapsed since @@ -638,9 +640,9 @@

    BASIC statement was designed to send control to that solitary END statement. Vintage BASIC imitates this behavior by treating the STOP statement as an END. This is unlike Microsoft -version of BASIC, in which STOP is used to +BASIC, in which STOP is used to terminate the program without clearing variables, so that they can be -inspected for debugging purpose, and the CONT +inspected for debugging purposes, and the CONT statement can resume control where it left off. That wouldn't be very useful in Vintage BASIC, since it does not have a read-eval-print loop.

    @@ -706,7 +708,7 @@

    Error
    !REDIM'D ARRAY IN LINE label
    A DIM statement was encountered, but the array has already been dimensioned, either explicitly (through -anorther DIM statement), or automatically +another DIM statement), or automatically (through reference to the array).
    !RETURN WITHOUT GOSUB ERROR IN LINE label
    A RETURN statement was