The ABC Programming Language: a short introduction (original) (raw)
New: The Origins of Python - An article by Lambert Meertens on the origins of ABC, and its influence on Python.
New: Implementation for the Raspberry Pi!.
The ABC Programmer's Handbook is available online.
ABC is an interactive programming language and environment for personal computing, originally intended as a good replacement for BASIC. It was designed by first doing a task analysis of the programming task.
ABC is easy to learn (an hour or so for someone who has already programmed), and yet easy to use. Originally intended as a language for beginners, it has evolved into a powerful tool for beginners and experts alike.
Here is an example function words to collect the set of all words in a document:
HOW TO RETURN words document: PUT {} IN collection FOR line IN document: FOR word IN split line: IF word not.in collection: INSERT word IN collection RETURN collection
Some features of the language:
- a powerful collection of only 5 data types that can easily be combined
- strong typing, yet without declarations
- no limitations (such as max int), apart from sheer exhaustion of memory
- refinements to support top-down programming
- nesting by indentation
- programs typically one fourth or one fifth the size of the equivalent Pascal or C.
Some features of the environment:
- no need for files: procedures and functions and global variables remain after logging out
- one consistent face is shown to the user at all times, whether executing commands, editing, or entering input to a program
- generalized undo mechanism.
Here follows a quick overview of the programming language ABC and its implementations, and a few examples of ABC programs. Full documentation about ABC is in the ABC Programmer's Handbook (details below).
- The Language
- The Environment
- Some Simple Examples
- Program Examples
- Why ABC is good for teaching purposes
- Newsletters
- A list of all publications about ABC.
- ABC Quick Reference.
- Implementations: for the PC, Unix, the Mac, and the Raspberry Pi.
MORE INFORMATION
Full details of ABC and the implementations, along with many example programs are in the book "The ABC Programmer's Handbook" by Leo Geurts, Lambert Meertens and Steven Pemberton, originally published by Prentice-Hall (ISBN 0-13-000027-2), and later reissued by Bosko Books (ISBN 0-9547239-4-5).
See also Steven Pemberton, "An Alternative Simple Language and Environment for PCs", IEEE Software, Vol. 4, No. 1, January 1987, pp. 56-64.
There are also copies of an irregular newsletter (see above). Back issues not online are no longer available.
Email: steven.pemberton@cwi.nl
Steven Pemberton, CWI, Amsterdam
Last modified: 2024-02-09