Skip to content

Dartmouth

Cory Smith edited this page Jul 21, 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.
  • Evaluators: = <> > < >= <=
  • Arrays are mentioned (and apparently discussed in "Part II"); however, I don't have the documentation for this so not sure of the details.
  • Arrays start at index 1 (note that this is modified in later editions).
  • 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.

"The Third" circa 1966

Specs

  • MAT merged with main from CARDBASIC.
  • Added SGN and RESTORE.
  • Modified INT from toward zero to floor.
  • Introduced INPUT for numerical input.
  • This is also about the time that the concept of "structured" begins to make its way into BASIC by allowing white space indentation.

"The Fourth" circa 1967

  • Added RANDOMIZE, ON...GOTO, ON...THEN and TAB.
  • Introduction of string variables (denoted by appending that $ character).
  • INPUT enhanced to support strings.
  • Introduction of the CHANGE statements - CHANGE a$ to a and CHANGE a to a$; which converts between string variable and a numeric array where the 0'th element is the total number of characters (the max index).

"The Fifth" circa 1970

  • Introduction of several file handling keywords.
  • INPUT enhanced for reading from a file.
  • Mention of FILES (not to be confused with FILES). (RESEARCH PENDING)
  • Mention of RESET. (RESEARCH PENDING)
  • Added STR$, VAL, ASC, LOC, LOF, LEN, POS. (RESEARCH PENDING)
  • Mention of SEG$. (RESEARCH PENDING)
  • Introduced the use of & to concatenate strings.
  • DEF FN enhanced for string support.
  • Mention of TIM, CLK$ and DAT$. (RESEARCH PENDING)
  • Introduction of the ' as an option for REM.

"The Sixth" circa September 1971

  • Mention of CHAIN and CALL. (RESEARCH PENDING)
  • Introduction of [SUB...END SUB](SUB...END SUB]. (RESEARCH PENDING)
  • Move to utilize file numbers. (RESEARCH PENDING)

"The Seventh" circa ????

(RESEARCH PENDING)

Clone this wiki locally