Next: , Up: Syntax   [Index]


5.1 Princeton and Atari Syntax

The history of INTERCAL is plagued with multiple syntaxes and character sets. The result has settled down with two versions of the syntax; the original Princeton syntax, and the Atari syntax (which is more suited to the operating systems of today).

Princeton syntax

INTERCAL-72 C-INTERCAL CLC-INTERCAL J-INTERCAL
some versions version 0.18+ all versions no

The original INTERCAL-72 compiler was the Princeton compiler, which introduced what has become known as the Princeton syntax for INTERCAL; this is the syntax used in the original manual, for instance, and can be considered to be the ‘original’ or ‘official’ INTERCAL syntax. It is notable for containing various characters not found in some character sets; for instance, it writes the operator for mingle as a cent sign (known as ‘change’). The other operator that often causes problems is the bookworm operator ‘V’, backspace, ‘-’, which is used for exclusive-or; the backspace can cause problems on some systems (which was probably the original intention). This syntax is also the default syntax in the CLC-INTERCAL compiler, which is the de facto standard for expanding the Princeton syntax to modern INTERCAL features that are not found in INTERCAL-72; however, it does not appear to have been used as the default syntax in any other compilers. Nowadays, there are other ways to write the required characters than using backspace; for instance, the cent sign appears in Latin-1 and UTF-8, and there are various characters that approximate bookworms (for instance, CLC-INTERCAL uses the Latin-1 yen symbol for this, which just to make things confusing, refers to a mingle in modern Atari syntax).

Atari syntax

INTERCAL-72 C-INTERCAL CLC-INTERCAL J-INTERCAL
some versions yes version 0.05+ yes

The other main syntax is the Atari syntax, so called because it was originally described in notes about an “Atari implementation” added to the paper INTERCAL-72 manual when it was softcopied in 1982. These notes describe a never-completed compiler implementation for 6502 by Mike Albaugh and Karlina Ott; it was meant to use the Atari 800 cartrtidge and screen editor, but that portion was never written. The syntax was designed to work better on ASCII-based systems, by avoiding the change character (although it can still be written as ‘c’, backspace, ‘/’, which the Atari compiler documentation claims that the Princeton compiler supported) in favour of a ‘big money’ character (‘$’), and using the ‘what’ (‘?’) as an alternative character for exclusive-or. This is the syntax that C-INTERCAL and J-INTERCAL have always used, and is the one most commonly used for communicating INTERCAL programs on Usenet and other similar fora (where ASCII is one of the most reliable-to-send character sets). It is also the syntax used for examples in this manual, for much the same reason. The Atari syntax for constructs more modern than INTERCAL-72 is normally taken to be that used by the C-INTERCAL compiler, because it is the only Atari-syntax-based compiler that contains non-INTERCAL-72 constructs that actually need their own notation.


Next: , Up: Syntax   [Index]