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 IBM-type PCs. Programs run under Linux, Windows, and MS-DOS. Free, open-source versions of the compilers (interpreted, assembly-code compiled, and optimizing) are available from the official website: xpl0.org [1]. The 32-bit version of the MS-DOS compiler, XPLPX, was used for many of these Rosetta Code tasks, but more recent tasks were implemented using the compilers for the Raspberry Pi. Some tasks were implemented using EXPL-32.
Here's how the traditional Hello World program is coded:
code Text=12; Text(0, "Hello World!")
Text is a built-in 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 built-in routine number 12, which outputs strings. There are over a hundred of these built-in routines that provide capabilities such as input and output, graphics, and trig functions.
The 32-bit versions of the compilers (as opposed to the older, 16-bit versions) automatically declare code declarations. Thus the above program can simply be rewritten as:
Text(0, "Hello World!")
Subcategories
This category has the following 2 subcategories, out of 2 total.
@
- XPL0 Implementations (1 P)
- XPL0 User (1 P)
Pages in category "XPL0"
The following 200 pages are in this category, out of 916 total.
(previous page) (next page)L
- Linear congruential generator
- Literals/Floating point
- Literals/Integer
- Literals/String
- Logical operations
- Logistic curve fitting in epidemiology
- Long literals, with continuations
- Long multiplication
- Long primes
- Long stairs
- Long year
- Longest common prefix
- Longest common substring
- Longest common suffix
- Longest increasing subsequence
- Look-and-say sequence
- Loop over multiple arrays simultaneously
- Loops/Break
- Loops/Continue
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Infinite
- Loops/N plus one half
- Loops/Nested
- Loops/While
- Loops/With multiple ranges
- Loops/Wrong ranges
- Ludic numbers
- Luhn test of credit card numbers
M
- Machine code
- Magic 8-ball
- Magic constant
- Magic squares of doubly even order
- Magic squares of odd order
- Magnanimous numbers
- Mandelbrot set
- Map range
- Matrix multiplication
- Matrix transposition
- Matrix with two diagonals
- Maximum difference between adjacent elements of list
- Maximum triangle path sum
- Maze generation
- McNuggets problem
- Meissel–Mertens constant
- Memory allocation
- Memory layout of a data structure
- Menu
- Mersenne primes
- Mertens function
- Metronome
- Mian-Chowla sequence
- Middle three digits
- Mind boggling card trick
- Minimal steps down to 1
- Minimum multiple of m where digital sum equals m
- Minimum number of cells after, before, above and below NxN squares
- Minimum numbers of three lists
- Minimum primes
- Modified random distribution
- Modular inverse
- Monte Carlo methods
- Monty Hall problem
- Morse code
- Mosaic matrix
- Mouse position
- Multi-dimensional array
- Multifactorial
- Multiple distinct objects
- Multiplication tables
- Multiplicatively perfect numbers
- Multisplit
- Munchausen numbers
- Munching squares
- Musical scale
- Mutual recursion
- Möbius function
N
- N'th
- N-grams
- N-queens problem
- Naming conventions
- Narcissistic decimal number
- Neighbour primes
- Nested function
- Next special primes
- Nice primes
- Nim game
- Nimber arithmetic
- Non-continuous subsequences
- Non-decimal radices/Convert
- Non-decimal radices/Input
- Non-decimal radices/Output
- Nth root
- Number names
- Number reversal game
- Numbers divisible by their individual digits, but not by the product of their digits.
- Numbers in base 10 that are palindromic in bases 2, 4, and 16
- Numbers in base-16 representation that cannot be written with decimal digits
- Numbers which are not the sum of distinct squares
- Numbers which are the cube roots of the product of their proper divisors
- Numbers whose binary and ternary digit sums are prime
- Numbers whose count of divisors is prime
- Numbers with equal rises and falls
- Numbers with prime digits whose sum is 13
- Numbers with same digit set in base 10 and base 16
- Numeric separator syntax
- Numerical integration
O
- O'Halloran numbers
- Odd and square numbers
- Odd squarefree semiprimes
- Odd word problem
- Odd words
- Old lady swallowed a fly
- Old Russian measure of length
- One of n lines in a file
- One-dimensional cellular automata
- Operator precedence
- Orbital elements
- Order by pair comparisons
- Order two numerical lists
- Ordered words
- Ormiston pairs
- Ormiston triples
- Own digits power sum
P
- Padovan n-step number sequences
- Palindrome dates
- Palindrome detection
- Palindromic gapful numbers
- Palindromic primes
- Palindromic primes in base 16
- Pandigital prime
- Pangram checker
- Parse command-line arguments
- Parsing/RPN calculator algorithm
- Parsing/Shunting-yard algorithm
- Particle fountain
- Pascal matrix generation
- Pascal's triangle
- Pascal's triangle/Puzzle
- Password generator
- Pathological floating point problems
- Peano curve
- Penholodigital squares
- Pentagram
- Perfect numbers
- Perfect shuffle
- Perfect totient numbers
- Periodic table
- Peripheral drift illusion
- Perlin noise
- Permutation test
- Permutations
- Permutations by swapping
- Permutations with repetitions
- Permuted multiples
- Pernicious numbers
- Phrase reversals
- Pick random element
- Pierpont primes
- Pig the dice game
- Pinstripe/Display
- Piprimes
- Plasma effect
- Playing cards
- Plot coordinate pairs
- Pointers and references
- Poker hand analyser
- Polynomial derivative
- Polyspiral
- Population count
- Positive decimal integers with the digit 1 occurring exactly twice
- Power set
- Practical numbers
- Pragmatic directives
- Price fraction
- Primality by trial division
- Primality by Wilson's theorem
- Prime decomposition
- Prime numbers p for which the sum of primes less than or equal to p is prime
- Prime numbers which contain 123
- Prime numbers which sum of digits is also prime
- Prime numbers whose neighboring pairs are tetraprimes
- Prime triplets
- Prime words
- Primes which contain only one odd digit
- Primes whose first and last number is 3
- Primes whose sum of digits is 25
- Primes with digits in nondecreasing order
- Priority queue
- Probabilistic choice
- Problem of Apollonius
- Product of divisors
- Product of min and max prime factors
- Program termination
- Proper divisors
- Pseudo-random numbers/Middle-square method
- Pseudorandom number generator image