'''Atlas Autocode''' (AA) was a [[programming language]] developed around 1965 at [[Manchester University]] for the [[Atlas Computer]]. It was developed by Tony Brooker and Derrick Morris as an improvement on the [[ALGOL]] [[programming language]]s, removing some of Algol's poorer features such as passing parameters by name. It featured explicitly typed variables, subroutines and functions. The AA compiler generated range-checking for array accesses, and the language allowed an array to have dimensions that were determined at run-time (i.e. you could declare an array as <code><u>integer</u> <u>array</u> Thing (i:j)</code>, where <code>i</code> and <code>j</code> were calculated values). Atlas Autocode included a <code><u>complex</u></code> data type which would support [[complex number]]s (for example, the square root of -1), a feature which was dropped when the language later morphed into the [[Edinburgh IMP]] programming language. (Imp was an extension of AA and was notable for being used to write the [[Edinburgh Multiple Access System|EMAS]] [[operating system]].)

Keywords in AA were represented as being underlined, however for the sake of easy typing it was possible to [[Stropping|strop keywords]] by placing a "<code>%</code>" sign in front of them, for example
the keyword <code><u>endofprogramme</u></code> could be typed as <code>%end %of %programme</code> or <code>%endofprogramme</code>


There were no reserved words in the language. In the statement <code><u>if</u> token=if <u>then</u> <u>result</u> = token</code>, there is both a keyword <code><u>if</u></code> and a variable named <code>if</code>.

Because of this keyword stropping, it was possible for AA to allow spaces in variable names, such as <code><u>integer</u> previous value</code>. Spaces were not significant and were removed prior to parsing in a trivial pre-lexing stage called "line reconstruction".
What the compiler would see in the above example would be "<code><u>if</u>token=if<u>thenresult</u>=token</code>"
.

The syntax for expressions was very close to mathematical standards and allowed implicit multiplication such as <code>z = 3x + y</code> as an alternative to the more common <code>z = x * 3 + y</code>.

Atlas Autocode's syntax was influenced by the output device which the author had available, a [[Friden]] [[Flexowriter]]. Consequently it allowed symbols like "½" and superscripts for "<math>i^2</math>". The flexowriter supported overstriking and therefore AA did as well - up to three characters could be overstruck as a single symbol. For example the character set had no "↑" symbol, so exponentiation was an overstrike of "|" and "*". (The underlining of keywords mentioned above could also be done using overstriking.) The language is described in detail in the [http://history.dcs.ed.ac.uk/archive/docs/atlasautocode.html Atlas Autocode Reference Manual].

When AA was ported to the [[KDF9]] computer, the character set was changed to ISO and that compiler has actually been recovered from an old paper tape by the [http://history.dcs.ed.ac.uk/ Edinburgh Computer History Project] and is available online, as is a high-quality scan of the original Atlas Autocode manual.

Atlas Autocode's second-greatest claim to fame (after being the progenitor of Imp and EMAS) was that it was the original "[[Compiler
-compiler|Compiler Compiler]]" of which "[[Yacc]]" was a later derivative. A variant of the AA compiler included run-time support for a top-down recursive descent parser. The style of parser used in the Compiler Compiler was in use continuously at Edinburgh from the 60's until almost the turn of the millennium.

Other [[Autocode]]s were developed for the [[Titan (computer)]] (a prototype Atlas 2) at Cambridge and the [[Ferranti]] Mercury.

== External links ==
* [http://history.dcs.ed.ac.uk/archive
/bfoley/atlasautocode.html Atlas Autocode Reference Manual]
* [http://history.dcs.ed.ac.uk/archive/docs/CU-Rep-1-AA.pdf Programming In Atlas Autocode] - Edinburgh University Computer Unit Report #1 (1965) (PDF 1.2 format - you may need to right-click and save first, depending on your browser and version of Adobe reader)

[[Category:Procedural programming languages]]
[[Category:Programming languages]]
[[Category:Structured programming languages
]]