A Short Introduction to the ABC Language
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 collectionSome 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.