Content deleted Content added
Quuxplusone (talk | contribs) use <code> where proper (<source> doesn't support ALGOL; coloring is wrong for Perl); rm Ruby examples as repetitive |
Quuxplusone (talk | contribs) m oops, ALGOL 60 is right link; "External links" plural per MoS |
||
Line 1:
The '''Trabb Pardo-Knuth algorithm''' is a [[computer program|program]] introduced by [[Donald Knuth]] and [[Luis Trabb Pardo]] to illustrate the evolution of computer [[programming language]]s.
In their
The simpler [[Hello world program]] has been used for much the same purpose.
==The algorithm==
In [[ALGOL 60]]:
<code lang="algol">
Line 33:
==Python version==
The following Python version of the algorithm uses the common Python idiom of using a list instead of an array
<source lang="python">
Line 51:
* "The Early Development of Programming Languages" in ''A History of Computing in the Twentieth Century'', New York, Academic Press, 1980. ISBN 0-12-491650-3 (Reprinted in Knuth, Donald E., ''et al'', ''Selected Papers on Computer Languages'', Stanford, CA, CSLI, 2003. ISBN 1-57586-382-0)
==External
* [http://cs.fit.edu/~ryan/compare Implementations in several modern languages]
|