Dartmouth Oversimplified Programming Experiment
{{Short description|Introductory programming language prior to BASIC (1962)}}
{{Infobox programming language
| name = DOPE (Dartmouth Oversimplified Programming Experiment)
| logo =
| logo caption =
| screenshot =
| screenshot caption =
| paradigms = procedural
| family =
| designers = John G. Kemeny
| developer = Sidney Marshall
| released = {{Start date and age|1962}}
| latest release version =
| latest release date =
| typing =
| scope =
| programming language = Assembly
| discontinued = Yes
| platform = LGP-30
| operating system =
| license =
| file ext =
| file format =
| website =
| implementations =
| dialects =
| influenced by = DARSIMCO, DART, Dartmouth ALGOL 30, Fortran
| influenced = Dartmouth BASIC
}}
DOPE, short for Dartmouth Oversimplified Programming Experiment, was a simple programming language designed by John Kemény in 1962 to offer students a transition from flow-charting to programming the LGP-30. Lessons learned from implementing DOPE were subsequently applied to the invention and development of BASIC.{{cite encyclopedia
|encyclopedia=History of programming languages I
|first=Thomas
|last=Kurtz
|pages=517-518 [https://archive.org/details/historyofprogram0000hist/page/517 517–518]
|publisher=ACM
|date=1981
|isbn=0-12-745040-8
|doi=10.1145/800025.1198404
|chapter-url=https://dl.acm.org/citation.cfm?doid=800025.1198404
|chapter=BASIC
|title=History of programming languages
|url=https://archive.org/details/historyofprogram0000hist/page/517
}}
Description
Each statement was designed to correspond to a flowchart operation and consisted of a numeric line number, an operation, and the required operands:
7 + A B C
10 SIN X Z
The final variable specified the destination for the computation. The above program corresponds in functionality to the later BASIC program:
{{sxhl|2=cbmbas|1=
7 LET C=A+B
10 LET Z=SIN(X)
}}
DOPE might be the first programming language to require every statement to have a line number, predating JOSS and BASIC.
The language was case insensitive.
Variable names were a single letter A to Z, or a letter followed by a digit (A0 to Z9). As with Fortran, different letters represented different variable types. Variables starting with letters A to D were floating point, as were variables from I to Z; variables E, F, G, and H each were defined as vectors with components from 1 to 16.
class="wikitable"
|+ Caption text | ||
Operation | Function | Number of operands |
---|---|---|
A | Ask (prompt for input) | 2 |
C | Arithmetic IF | 4 |
E | End loop | {{Unknown}} |
J | Input into variable | 1 |
N | Print a newline | {{Unknown}} |
P | Print a variable | 1 |
T | Jump | 1 |
Z | For loop | {{Unknown}} |
+ | Addition | 3 |
- | Subtraction | 3 |
* | Multiplication | 3 |
/ | Division | 3 |
EXP | E to the power | 2 |
LOG | Logarithm | 2 |
SIN | Sine | 2 |
SQR | Square root | 2 |
The language was used by only one freshman computing class.{{cite book |last1=Williams |first1=Michael |title=A History of Computing Technology |date=November 1, 1985 |publisher=Prentice-Hall |isbn=0133899179 |pages=432 |edition=1st}} Kemeny collaborated with high school student Sidney Marshall (taking freshman calculus) to develop the language.Application to the National Science Foundation, Kurtz, Rieser, and Meck, cited in Rankin, pages 20-21Kemeny, John G.; Kurtz, Thomas E. (1985). Back To BASIC: The History, Corruption, and Future of the Language. Addison-Wesley Publishing Company, Inc. 141 pp. {{ISBN|0-201-13433-0}}
Legacy
According to Thomas Kurtz, a co-inventor of BASIC, "Though not a success in itself, DOPE presaged BASIC. DOPE provided default vectors, default printing formats, and general input formats. Line numbers doubled as jump targets."
The language had a number of other features and innovations that were carried over into BASIC:
- Variable names were either a letter or a letter followed by a digit
- Arrays (vectors) did not have to be declared and had a default size (16 instead of 10)
- Every line required a numeric label*
- Lines were sorted in numeric order*
- Every line begins with a keyword*
- Function names were three letters long*
- The only loop construct was a for-loop
See also
- DARSIMCO, 'Dartmouth Simplified Code', a 1956 assembler macro language
- Dartmouth ALGOL 30, a compiler developed by Dartmouth for the LGP-30