Skip to content

Dartmouth

Cory Smith edited this page Jun 24, 2022 · 2 revisions

"The First" circa May 1964

At some point the different versions of Dartmouth BASIC was referred to as "The Sixth", "The Seventh", etc. So for the purposes of this documentation will be referring to the original release as "The First".

Specs

  • Line numbers required and must be unique/sequential; 1 to 99999.
  • Variables are floating point numeric only (no string variables).
  • Variables (except arrays) could be named A-Z and optionally contain a number (0-9).
  • Numeric values could only hold 9-digits of precision, with or without a decimal point. E-notation supported and referred to as "exponent of ten".
  • Math symbols supported: +-*/^
  • Supported parens in expressions.
  • Arrays are mentioned (and apparently discussed in "Part II"); however, I don't have the documentation for this so not sure of the details.
  • String constants allowed.
  • Only has support for the simplest version of IF...THEN; the GOTO variant.
  • LET required.
  • NEXT requires the variable.
  • GOTO can optionally be written as GO TO.

Functions

Keywords

Commands

  • HELLO
  • {CATALOG|CAT}
  • OLD filename
  • NEW [filename]
  • RENAME [filename]
  • LIST
  • RUN
  • SAVE
  • REPLACE
  • UNSAVE
  • STOP
  • SYSTEM {BASIC|ALGOL}
  • BYE

"The Second"? circa October 1964

Specs

  • Mention of minus sign for numbers.
  • Mention of operator precedence; (), ^, */, +- with the */+- being done left to right.
  • Discusses arrays in the context of "Lists" (single-dimensional) and "Tables" (two-dimensional). They must be a single letter variable name. The dimensions are initialized automatically 0 to 10; the DIM statement allows increasing (or decreasing) the upperbound.
  • The INT statement is mentioned in the May documentation, but the details are in the missing "Part II". In this manual, it is clear that INT is very different in this BASIC than in the Microsoft variants.
    • "round numbers to the nearest whole integer", "operates by chopping off the fractional part"; which is different in newer BASIC's, which truncates.
  • PRINT introduces the "packed form of output" using the semi-colon character. Instead of moving a full zone using the comma (which is 6 or more characters depending), it will "move next multiple of 3 characters". It is also mentioned that the SPC and TAB will hold off the CR (like semi-colon and comma). There is also a discussion regarding PRINT "X="X where the x variable will print immediately after the string constant.
  • GOSUB and RETURN introduced. Can optionally be written as GO SUB.
  • A new feature under "Some Ideas for More Advanced Programmers" is the REM keyword.
  • This manual also includes a section for "CARDBASIC".
    • Arrays are limited to 1000 components in any one vector or list; no matrix or table dimension may exceed 500 and total number of components in all vectors and matrices (lists and tables) may not exceed 4000.
    • Matrices must start with component 1 (not 0).
    • Although matrices can be used in regular math functions/statements after they've been DIM (DIM required), a matrix is not a matrix until the first MAT command is applied.

Keywords

  • DIM
  • GOSUB
  • RETURN
  • REM
  • MAT READ A(M, N) ' Read one matrix, dimensions shown.
  • MAT PRINT A ' PRint one matrix.
  • MAT C = A + B ' Add two matrices.
  • MAT C = A - B ' Subtract matrices.
  • MAT C = A * B ' Multiply matrices.
  • MAT C = ZER(M, N) ' Introduce a 0 matrix, dimensions shown.
  • MAT C = CON(M, N) ' Matrix of all 1's, dimensions shown.
  • MAT C = IDN(N) ' Identity matrix, dimensions shown.
  • MAT C = TRN(A) ' Transpose.
  • MAT C = INV(A) ' Inverse.
  • MAT C = (k)*A ' Constant multiple, note parentheses.

Commands

  • SCRATCH ' Similar to NEW except retains filename.
Clone this wiki locally