Category:XPL0
This programming language may be used to instruct a computer to perform a task.
See Also: 


XPL0 is essentially a cross between Pascal and C. It looks somewhat like Pascal but works more like C. It was originally created in 1976 by Peter J. R. Boyle, who designed it to run on a 6502 microprocessor as an alternative to BASIC, which was the dominant language for personal computers at the time. XPL0 is based on PL/0, an example compiler in the book Algorithms + Data Structures = Programs by Niklaus Wirth. The first XPL0 compiler was written in ALGOL, which was then used to create a compiler written in XPL0's syntax.
XPL0 has been implemented on more than a dozen processors, but it's currently maintained on the Raspberry Pi and IBMtype PCs. Programs run under Linux, Windows, and DOS. Free, opensource versions of the compilers (interpreted, assemblycode compiled, and optimizing) are available from the official website: xpl0.org [1]. The 32bit 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:
code Text=12; Text(0, "Hello World!")
Text is a builtin routine, called an intrinsic, that outputs a string of characters. The zero (0) tells where to send the string. In this case it is sent to the display screen; but it could just as easily be sent to a printer, a file, or out a serial port by using a different number.
All names must be declared before they can be used. The command word code associates the name Text to the builtin routine number 12, which outputs strings. There are over a hundred of these builtin routines that provide capabilities such as input and output, graphics, and trig functions.
The 32bit versions of the compilers (as opposed to the older, 16bit versions) automatically declare code declarations. Thus the above program can simply be written as:
Text(0, "Hello World!")
Pages in category "XPL0"
The following 200 pages are in this category, out of 644 total.
(previous page) (next page)2
A
 A+B
 ABC problem
 ABC words
 Abelian sandpile model
 Abundant odd numbers
 Abundant, deficient and perfect number classifications
 Achilles numbers
 Ackermann function
 Additive primes
 Address of a variable
 Air mass
 Almost prime
 Alternade words
 Amicable pairs
 Angle difference between two bearings
 Angles (geometric), normalization and conversion
 Animate a pendulum
 Animation
 Anonymous recursion
 Antiprimes
 Append numbers at same position in strings
 Approximate equality
 Archimedean spiral
 Arithmetic numbers
 Arithmeticgeometric mean
 Arithmetic/Complex
 Arithmetic/Integer
 Arrays
 Ascending primes
 Assertions
 Associative array/Creation
 Associative array/Iteration
 Attractive numbers
 Audio alarm
 Averages/Arithmetic mean
 Averages/Mean angle
 Averages/Mean time of day
 Averages/Pythagorean means
 Averages/Root mean square
B
 Babbage problem
 Balanced brackets
 Barnsley fern
 Base 16 numbers needing a to f
 Best shuffle
 Binary digits
 Binary search
 Bioinformatics/base count
 Birthday problem
 Bitmap
 Bitmap/Bresenham's line algorithm
 Bitmap/Bézier curves/Cubic
 Bitmap/Bézier curves/Quadratic
 Bitmap/Flood fill
 Bitmap/Midpoint circle algorithm
 Bitmap/Read a PPM file
 Bitmap/Write a PPM file
 Bitwise operations
 Boolean values
 Brilliant numbers
 Brownian tree
C
 Caesar cipher
 Calculating the value of e
 Calendar
 Camel case and snake case
 Cantor set
 Casesensitivity of identifiers
 Catalan numbers
 Change e letters to i in words
 Changeable words
 Chaos game
 Character codes
 Check Machinlike formulas
 Check that file exists
 Chowla numbers
 Circles of given radius through two points
 Circular primes
 Closestpair problem
 Code Golf: Code Golf
 Collect and sort square numbers in ascending order from three lists
 Color of a screen pixel
 Color wheel
 Colorful numbers
 Colour bars/Display
 Colour pinstripe/Display
 Combinations
 Combinations with repetitions
 Comma quibbling
 Commandline arguments
 Comments
 Common list elements
 Compare length of two strings
 Compiletime calculation
 Composite numbers k with no single digit factors whose factors are all substrings of k
 Concatenate two primes is also prime
 Concurrent computing
 Conditional structures
 Consecutive primes with ascending or descending differences
 Constrained random points on a circle
 Continued fraction
 Continued fraction/Arithmetic/Construct from rational number
 Convert seconds to compound duration
 Conway's Game of Life
 Coprime triplets
 Coprimes
 Copy a string
 Copy stdin to stdout
 Count how many vowels and consonants occur in a string
 Count in factors
 Count in octal
 Count occurrences of a substring
 Cramer's rule
 CRC32
 Create a file
 Create a twodimensional array at runtime
 CSV data manipulation
 Cubic special primes
 Cumulative standard deviation
 CUSIP
 Cyclops numbers
D
 Date format
 Day of the week
 Day of the week of Christmas and New Year
 De Polignac numbers
 Deal cards for FreeCell
 Department numbers
 Descending primes
 Detect division by zero
 Determine if a string has all the same characters
 Determine if a string has all unique characters
 Determine if a string is collapsible
 Determine if a string is squeezable
 Determine sentence type
 Digit fifth powers
 Digital root
 Dinesman's multipledwelling problem
 Disarium numbers
 Distinct power numbers
 Dot product
 Dragon curve
 Draw a cuboid
 Draw a pixel
 Draw a rotating cube
 Draw a sphere
 Draw pixel 2
 Duffinian numbers
E
 EKG sequence convergence
 Empty program
 Empty string
 Enforced immutability
 Entropy
 Enumerations
 Environment variables
 Equal prime and composite sums
 Equilibrium index
 ErdősNicolas numbers
 Erdősprimes
 Ethiopian multiplication
 Euler method
 Euler's sum of powers conjecture
 Evaluate binomial coefficients
 Even numbers which cannot be expressed as the sum of two twin primes
 Even or odd
 Evolutionary algorithm
 Exactly three adjacent 3 in lists
 Exponentiation operator
 Extra primes
 Extract file extension
F
 Factorial
 Factorial primes
 Factors of an integer
 Fairshare between two and more
 Farey sequence
 FASTA format
 Fibonacci nstep number sequences
 Fibonacci sequence
 File input/output
 File size
 Filter
 Find adjacent primes which differ by a square integer
 Find first missing positive
 Find if a point is within a triangle
 Find minimum number of coins that make a given value
 Find prime n such that reversed n is also prime
 Find prime numbers of the form n*n*n+2
 Find square difference
 Find squares n where n+1 is prime
 Find the intersection of two lines
 Find the last Sunday of each month
 Find the missing permutation
 Find words which contain the most consonants
 Find words which contains all the vowels
 Find words which contains more than 3 e vowels
 Find words whose first and last three letters are equal