Atlas Autocode facts for kids
Paradigms | Procedural, imperative, structured |
---|---|
Family | ALGOL |
Designed by | Tony Brooker, Derrick Morris |
Developer | University of Manchester |
First appeared | 1963 |
Typing discipline | Static, strong |
Scope | Lexical |
Implementation language | ALGOL 60 |
Platform | Atlas English Electric KDF9 |
OS | Supervisor |
Major implementations | |
Edinburgh IMP | |
Influenced by | |
ALGOL 60 |
Atlas Autocode (often called AA) was an early programming language. It was created around 1963 at the University of Manchester in the United Kingdom.
This language was a version of ALGOL, another important programming language. Tony Brooker and Derrick Morris designed Atlas Autocode for the Atlas computer. The word Autocode was an old term for a programming language. Different autocodes could be very different from each other.
Contents
What Made Atlas Autocode Special?
Atlas Autocode was a block-structured language. This means its code was organized into neat sections or blocks. It used variables that had specific types, like numbers or text. It also had subroutines and functions. These are reusable blocks of code that perform specific tasks.
Smart Compiler Features
The AA compiler (a program that turns code into something a computer understands) was quite smart.
- It could check if you were trying to access an item in an array (a list of items) that wasn't there. This helped prevent errors.
- You could also create arrays whose size was decided while the program was running. This made the language more flexible.
Mixing Code Types
Programmers could even mix AA code with machine code. Machine code is the very basic language computers understand directly. This was useful for making parts of a program run faster. It also helped with tasks that were hard to do with regular AA code.
Handling Complex Numbers
AA included a special data type for complex numbers. These numbers are used in electrical engineering to describe things like how alternating current behaves. The imaginary unit (the square root of -1) was shown as `i`. This `i` was a fixed complex number.
Atlas Autocode later changed into a new language called Edinburgh IMP. The `complex` data type was removed in IMP. IMP was used to create the Edinburgh Multiple Access System (EMAS) operating system.
A Compiler Pioneer
Atlas Autocode was also famous for its connection to the Compiler Compiler. This was a tool that helped create other compilers. A version of the AA compiler supported a way of reading code called a recursive descent parser. This method of parsing was used at Edinburgh for many years.
Other autocodes were made for different computers. These included the Titan computer and the Ferranti Mercury.
How Atlas Autocode Looked (Syntax)
Atlas Autocode's syntax (its rules for writing code) was much like ALGOL. But it was also shaped by the Friden Flexowriter. This was a special typewriter-like machine used to enter code.
Special Characters
The Flexowriter allowed some unique symbols:
- `½` could be used for `0.5`.
- `2` (a superscript 2) could mean "to the power of 2".
- You could even print up to three characters on top of each other. This was called "overstriking". For example, `|` and `*` could be overstruck to make an exponentiation symbol.
The underlining of reserved words (keywords) was also done using overstriking. Other Flexowriter characters used in AA included:
- `α` in floating-point numbers, like `3.56α-7` for `3.56e-7`.
- `β` to mean the second half of a 48-bit Atlas memory word.
- `π` for the mathematical constant pi.
Changes for Other Computers
When AA was moved to the English Electric KDF9 computer, its character set changed. It started using the International Organization for Standardization (ISO) character set. You can find this compiler online. The original manual is also available from the Edinburgh Computer History Project.
Keywords and Variables
Keywords in AA were underlined to tell them apart from other text. For example, `if` was a keyword. This was done by overstriking on the Flexowriter.
There were also ways to "strop" keywords:
- In "uppercase delimiters" mode, all uppercase letters were treated as underlined lowercase.
- Some versions let you put a "
%
" sign in front of keywords. For example, `endofprogramme` could be typed as ` %end %of %programme`. This made typing faster.
Unlike many modern languages, AA did not have reserved words. This meant you could have a variable with the same name as a keyword. For example, in `if token=if then result = token`, `if` is a keyword, but `if` is a variable.
Spaces in Names
AA also allowed spaces in variable names, like `integer previous value`. Spaces were not important and were removed before the code was processed. This was possible because keywords were identified by underlining, not just by their spelling.
Shorthand for Math
In expressions, you could sometimes leave out the multiplication sign. For example, `3a` meant `3*a`. Also, `a(i+j)` meant `a*(i+j)` if `a` was not an array. The compiler would always try to find the longest possible name first. So, `ab` would not be seen as `a*b`, even if `a` and `b` were declared.