What was the first programming language with Enumerations? What was the first programming language with Enumerations? swift swift

What was the first programming language with Enumerations?


Pascal had enumerated types, but didn't use the keyword enum. AFAIK, the keyword enum was first used by C, but the concept is older by quite a margin.

See Wikipedia on Enumerated type for an example such as:

type  cardsuit = (clubs, diamonds, hearts, spades);  card = record           suit: cardsuit;           value: 1 .. 13;         end;var  hand: array [ 1 .. 13 ] of card;   trump: cardsuit;

I think Pascal is the oldest of the languages listed on the Wikipedia page. The LISP referred to is Common Lisp, which postdates Pascal even though original LISP handily pre-dates Pascal.

The Programming Language Pascal from 1970 lists these types in section 6.1.1 Scalar Types, so for all practical purposes, these enumerated types have always been a part of Pascal. See the documents page at the Standard Pascal web site. The revised report is also available there (1972), and is probably the more widely read document. You can also track Pascal at Wikipedia, of course.

(There might be another earlier language with analogous features; I've not identified it, but I've not looked everywhere. Algol-60 was not such a language, though; nor was Fortran or Cobol. Algol-68 and PL/1 are possible contenders.)


Algol 68 did not have enums. PL/I did not have enums.Historic Lisp had no notion of compile-time types at all.Algol W and Simula 67 did not have enums. Oddly enough,COBOL is not only a possible contender but the most likelyone. Not that it had user-definable types, but look up"88-level". The macro facilities of Burroughs Algol,SAIL, CORAL 66, and RTL/2 could be used to give names to numbers,which takes you almost as far as C's rather broken enums go.