Category:XPL0: Difference between revisions

Content deleted Content added
Loren (talk | contribs)
No edit summary
Loren (talk | contribs)
No edit summary
Line 9: Line 9:


XPL0 has been implemented on more than a dozen processors, but it's
XPL0 has been implemented on more than a dozen processors, but it's
currently maintained for IBM-type PCs. Programs run under DOS and under versions of Windows that can still run DOS apps. Free, open-source versions of the
currently maintained on the Raspberry Pi and IBM-type PCs. Programs run under Linux, Windows, and DOS. Free, open-source versions of the
compilers (interpreted, assembly-code compiled, and optimizing) are
compilers (interpreted, assembly-code compiled, and optimizing) are
available from the official website: xpl0.org [http://www.xpl0.org/]. The 32-bit version of the compiler, XPLPX, was used for all these Rosetta Code tasks.
available from the official website: xpl0.org [http://www.xpl0.org/]. The 32-bit version of the DOS compiler, XPLPX, was used for most of these Rosetta Code tasks, but more recent tasks were implemented using the compilers for the Raspberry Pi.


Here's how the traditional Hello World program is coded:
Here's how the traditional Hello World program is coded:
Line 27: Line 27:
All names must be declared before they can be used. The command word
All names must be declared before they can be used. The command word
''code'' associates the name Text to the built-in routine number 12, which
''code'' associates the name Text to the built-in routine number 12, which
outputs strings. There are about 80 of these built-in routines that
outputs strings. There are over a hundred of these built-in routines that
provide capabilities such as input and output, graphics, and trig
provide capabilities such as input and output, graphics, and trig
functions.
functions.

The Raspberry Pi versions of the compilers (as well as the Windows' version, EXPL-32) automatically declare ''code'' declarations. Thus the above program can simply be written as:

<pre>
Text(0, "Hello World!")
</pre>