PLDB
Languages Features Calendar About Lists Add Language
GitHub icon

Aldor

Aldor

Aldor is a programming language created in 1990 by Richard Dimick Jenks and Barry Trager and Stephen Watt and James Davenport and Robert Sutor and Scott Morrison.

Aldor is a programming language. It is the successor of A# as the extension language of the Axiom computer algebra system. Aldor combines imperative, functional, and object-oriented features. Read more on Wikipedia...

#581on PLDB 32Years Old 81.0Users

Example code from Wikipedia:

#include "aldor" #include "aldorio" import from Integer, String; bob(n: Integer): String == { b: String := " bottle"; if n ~= 1 then b := b + "s"; b + " of beer"; } main(): () == { n: Integer := 99; otw: String := " on the wall"; -- refrain while n > 0 repeat { stdout << n << bob(n) << otw << ", " << n << bob(n) << "." << newline; stdout << "Take one down and pass it around, "; n := n - 1; if n > 0 then stdout << n; else stdout << "no more"; stdout << bob(n) << otw << "." << newline; stdout << newline; } -- last verse stdout << "No more" << bob(n) << otw << ", no more" << bob(n) << "." << newline; stdout << "Go to the store and buy some more, "; n: Integer := 99; stdout << n << bob(n) << otw << "." << newline; } main();

Language features

Feature Supported Example Token
Comments โœ“
-- A comment
Line Comments โœ“
-- A comment
--
Semantic Indentation โœ“

Article source

PLDB - Build the next great programming language. v5.0.0 - Acknowledgements ยท Email ยท GitHub