MAD (programming language)

Uses your system voice; voice and rate in settings.

Snapshot

≈ 7 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

MAD (Michigan Algorithm Decoder) is a programming language and compiler for the IBM 704 and later the IBM 709, IBM 7090, IBM 7040, UNIVAC 1107, UNIVAC 1108, Philco 210-211, and eventually IBM System/370 mainframe computers. Developed in 1959 at the University of Michigan by Bernard Galler, Bruce Arden and Robert M. Graham, MAD is a variant of the ALGOL language.

It was widely used to teach programming at colleges and universities during the 1960s and played a minor role in the development of Compatible Time-Sharing System (CTSS), Multics, and the Michigan Terminal System computer operating systems. The original version of the chatbot ELIZA was written in MAD-SLIP. The archives at the Bentley Historical Library of the University of Michigan contain reference materials on the development of MAD and MAD/I, including three linear feet of printouts with hand-written notations and original printed manuals.

MAD (Michigan Algorithm Decoder) is a programming language and compiler for the IBM 704 and later the IBM 709, IBM 7090, IBM 7040, UNIVAC 1107, UNIVAC 1108, Philco 210-211, and eventually IBM System/370 mainframe computers. Developed in 1959 at the University of Michigan by Bernard Galler, Bruce Arden and Robert M. Graham, MAD is a variant of the ALGOL language.

It was widely used to teach programming at colleges and universities during the 1960s and played a minor role in the development of Compatible Time-Sharing System (CTSS), Multics, and the Michigan Terminal System computer operating systems. The original version of the chatbot ELIZA was written in MAD-SLIP. The archives at the Bentley Historical Library of the University of Michigan contain reference materials on the development of MAD and MAD/I, including three linear feet of printouts with hand-written notations and original printed manuals.

VECTOR VALUES HELLOW=$13h0Hello, world*$ END OF PROGRAM The first character of the line is treated as logical carriage control, in this example the character "0" which causes a double-spaced line to be printed. Alternatively, contractions can be used, and the compiler will expand them in the listing: P'T HELLOW V'S HELLOW=$13h0Hello, world*$ E'M

Arrays and matrices

There is no limit on the number of dimensions. Negative and zero as well as floating-point subscripts are allowed. Matrices are storied in consecutive memory locations in the order determined by varying the rightmost subscript first. Matrices may be referenced using a subscript for each dimension, NAME(s 1 ,s 2 ,s 3 ), or using a single subscript, NAME(s 1 ).

Input-output lists, VECTOR VALUES statements, and some subroutines allow the use of block notation, which has the form A,...,B or A...B, which is a reference to the entire region from A to B. inclusive. In terms of a vector, A(1)...A(N) would be A(1), A(2), A(3), ..., A(N). There are facilities that allow changing dimensions at run-time; permitting the programmer to vary the location of the initial element in an array within the overall block which has been set aside for the array; and allowing an arbitrary storage mapping to be specified.

VECTOR VALUES array(n) = c 1 , c 2 , c 3 , ... VECTOR VALUES array(m) ... array(n) = constant DOUBLE STORAGE MODE mode-list (doubles the amount of storage allocated for the modes listed) EQUIVALENCE (a 1 , a 2 , ..., a m ), ... PROGRAM COMMON a, b, c, ... (may include dimension information) ERASABLE a, b, c, ...

(may include dimension information) PARAMETER A 1 (B 1 ), A 2 (B 2 ), ..., A n (B n ) SYMBOL TABLE VECTOR variable FULL SYMBOL TABLE VECTOR variable LISTING ON (the default) LISTING OFF REFERENCES ON REFERENCES OFF (the default) variable = expression (assignment) TRANSFER TO statement-label WHENEVER boolean-expression, executable-statement (simple conditional) WHENEVER boolean-expression (compound conditional) OR WHENEVER boolean-expression OTHERWISE END OF CONDITIONAL CONTINUE (do nothing statement, usually used to carry a statement label) THROUGH statement-label, FOR VALUES OF variable = expression-list (iteration) (where variable may be any mode including floating-point) SET LIST TO array-element, [ expression ] SAVE DATA list RESTORE DATA list PAUSE NO. octal-integer (stop execution, print an octal number on the operators console, allow manual restart) END OF PROGRAM (the last statement in all MAD programs) READ DATA (reads data using a self-defining format, var1=value1, var2=value2, ..., varN=valueN READ AND PRINT DATA (similar to READ DATA, but data read is echoed to the printer) READ FORMAT format, list READ BCD TAPE n, format, list READ BINARY TAPE n, list PRINT RESULTS list PRINT BCD RESULTS list PRINT OCTAL RESULTS list PRINT COMMENT $string$ (first character of string is carriage control) PRINT FORMAT format, list PRINT ON LINE FORMAT format, list (display a message for the machine operator) WRITE BCD TAPE n, format, list WRITE BINARY TAPE n, list PUNCH FORMAT format, list LOOK AT FORMAT format, list (read data without advancing to next record) REWIND TAPE n END OF FILE TAPE n BACKSPACE RECORD OF TAPE n BACKSPACE RECORD OF TAPE n, IF LOAD POINT TRANSFER TO statement BACKSPACE FILE OF TAPE n BACKSPACE FILE OF TAPE n, IF LOAD POINT TRANSFER TO statement SET LOW DENSITY TAPE n SET HIGH DENSITY TABLE n REWIND TAPE n UNLOAD TAPE n FORMAT VARIABLE list (declaration, may include dimension information) INTERNAL FUNCTION function-name.(argument-list) = expression (single statement definition) INTERNAL FUNCTION function-name.(argument-list) EXTERNAL FUNCTION function-name.(argument-list) ENTRY TO NAME name.

END OF FUNCTION (last statement in a multiple line definition) FUNCTION RETURN [ expression ] ERROR RETURN (force an error return to a statement or to the operating system, if no error statement is given as last argument of the call) SAVE RETURN RESTORE DATA RESTORE RETURN EXECUTE procedure.(argument-list) (call a non-single valued function) MODE STRUCTURE mode-no = mode-no existing-op mode-no MODE STRUCTURE mode-no = mode-no existing-op mode-no SAME SEQUENCE AS mode-no existing-op mode-no where: rank is one of SAME AS, LOWER THAN, or HIGHER THAN; and mode-options are the options that appear on the MODE STRUCTURE statement.

Three pre-defined packages of definitions (MATRIX, DOUBLE PRECISION, and COMPLEX) are available for inclusion in MAD source programs using the INCLUDE statement. INCLUDE package Internal organization of the MAD translator, Arden, B. W., Galler, B. A. and Graham, R. M., pp. 28–31, CACM Volume 4 No. 1 (Jan 1961) An Introduction To Algorithmic Methods Using The MAD Language, Alan B. Marcovitz and Earl J. Schweppe, Macmillan, 1966. An Introduction to Digital Computers and the MAD Language, Brice Carnahan, University of Michigan.

The Language of Computers, Bernard A. Galler, University of Michigan, McGraw-Hill, 1962. MAD at Michigan: its function & features, Arden, B. W., Galler, B. A., and Graham, R. M., pp27–28, Datamation, Volume 7 No. 12 (Dec 1961) Flow Charts of The Michigan Algorithm Decoder, by G. B. Smith, SHARE General Program Library, SHARE Distribution Number 1327 PA, 1961

Text derived from https://en.wikipedia.org/w/index.php?oldid=1301116190 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

15 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.