Category:XPL0: Difference between revisions
(Created page with "{{stub}}{{language}}") |
No edit summary |
||
Line 1: | Line 1: | ||
{{stub}}{{language}} |
{{stub}}{{language}} |
||
'''XPL0''' is essentially a cross between Pascal and C. It was created in 1976 |
|||
by Peter J. R. Boyle, who designed it to run on a 6502 microcomputer 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 |
|||
compiler was written in ALGOL. This was used to create a compiler |
|||
written in XPL0 syntax. |
|||
The language has been implemented on over a dozen processors, but is |
|||
currently maintained for IBM-type PCs. Free, open-source versions of the |
|||
compilers (interpreted, assembly code compiled, and optimizing) are |
|||
available from the official website: xpl0.org [http://www.xpl0.org/] |
|||
Here is how the traditional Hello World program is coded: |
|||
<pre> |
|||
code Text=12; |
|||
Text(0, "Hello World!") |
|||
</pre> |
|||
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 about 80 of these built-in routines that |
|||
provide capabilities such as input and output, graphics, and trig |
|||
functions. |
Revision as of 02:57, 22 April 2012
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 was created in 1976 by Peter J. R. Boyle, who designed it to run on a 6502 microcomputer 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 compiler was written in ALGOL. This was used to create a compiler written in XPL0 syntax.
The language has been implemented on over a dozen processors, but is currently maintained for IBM-type PCs. Free, open-source versions of the compilers (interpreted, assembly code compiled, and optimizing) are available from the official website: xpl0.org [1]
Here is 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 about 80 of these built-in routines that provide capabilities such as input and output, graphics, and trig functions.
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 865 total.
(previous page) (next page)D
E
- Eban numbers
- Egyptian division
- EKG sequence convergence
- Elementary cellular automaton
- Emirp primes
- Empty program
- Empty string
- Enforced immutability
- Entropy
- Entropy/Narcissist
- Enumerations
- Environment variables
- Equal prime and composite sums
- Equilibrium index
- Erdős-Nicolas numbers
- Erdős-primes
- Esthetic numbers
- Ethiopian multiplication
- Euler method
- Euler's constant 0.5772...
- 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
- Exceptions
- Exceptions/Catch an exception thrown in a nested call
- Execute Computer/Zero
- Exponentiation operator
- Exponentiation order
- Extra primes
- Extract file extension
- Extreme floating point values
- Extreme primes
F
- Factorial
- Factorial primes
- Factorions
- Factors of an integer
- Fairshare between two and more
- Farey sequence
- FASTA format
- Feigenbaum constant calculation
- Fibonacci n-step number sequences
- Fibonacci sequence
- File extension is in extensions list
- File input/output
- File size
- Filter
- Find adjacent primes which differ by a square integer
- Find first and last set bit of a long integer
- Find first missing positive
- Find if a point is within a triangle
- Find limit of recursion
- 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 a line with a plane
- 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
- Find words with alternating vowels and consonants
- Finite state machine
- First 9 prime Fibonacci number
- First perfect square in base n with n unique digits
- Five weekends
- Fixed length records
- FizzBuzz
- Flow-control structures
- Floyd's triangle
- Forbidden numbers
- Fork
- Formatted numeric output
- Forward difference
- Four bit adder
- Four sides of square
- Fractal tree
- Frobenius numbers
- Function definition
- Function frequency
- Fusc sequence
G
- Galton box animation
- Gamma function
- Gapful numbers
- General FizzBuzz
- Generate Chess960 starting position
- Generate lower case ASCII alphabet
- Generate random numbers without repeating a value
- Generator/Exponential
- Generic swap
- Get system command output
- Giuga numbers
- Globally replace text in several files
- Goldbach's comet
- Golden ratio/Convergence
- Gray code
- Greatest common divisor
- Greatest element of a list
- Greatest prime dividing the n-th cubefree number
- Greatest subsequential sum
- Greyscale bars/Display
- Guess the number
- Guess the number/With feedback
- Guess the number/With feedback (player)
- GUI/Maximum window dimensions
H
- Hailstone sequence
- Halt and catch fire
- Hamming numbers
- Happy numbers
- Harmonic series
- Harshad or Niven series
- Hash from two arrays
- Haversine formula
- Hello world/Graphical
- Hello world/Line printer
- Hello world/Newline omission
- Hello world/Standard error
- Hello world/Text
- Here document
- Heronian triangles
- Hex dump
- Hilbert curve
- Hofstadter Q sequence
- Hofstadter-Conway $10,000 sequence
- Honaker primes
- Honeycombs
- Horizontal sundial calculations
- Horner's rule for polynomial evaluation
- Host introspection
- Humble numbers
I
- Identity matrix
- Idiomatically determine all the characters that can be used for symbols
- Idiomatically determine all the lowercase and uppercase letters
- Idoneal numbers
- Image noise
- Implicit type conversion
- Include a file
- Inconsummate numbers in base 10
- Increasing gaps between consecutive Niven numbers
- Increment a numerical string
- Infinity
- Input loop
- Input/Output for lines of text
- Input/Output for pairs of numbers
- Integer comparison
- Integer overflow
- Integer roots
- Integer sequence
- Inventory sequence
- ISBN13 check digit
- Iterated digits squaring
- Iterators
J
K
- K-means++ clustering
- Kahan summation
- Kaprekar numbers
- Kernighans large earthquake problem
- Keyboard input/Flush the keyboard buffer
- Keyboard input/Keypress check
- Keyboard input/Obtain a Y or N response
- Klarner-Rado sequence
- Knapsack problem/0-1
- Knapsack problem/Continuous
- Knapsack problem/Unbounded
- Knight's tour
- Knuth shuffle
- Koch curve