INTERCAL programming language

From Academic Kids

(Redirected from INTERCAL)

INTERCAL is a programming language parody, the canonical esoteric programming language. It satirizes aspects of the FORTRAN and COBOL programming languages, as well as the proliferation of proposed language constructs and notations in the 1960s. Consequently, the humour may appear rather dated to modern readers brought up with C or Java.

INTERCAL was created by Don Woods and James Lyon, two Princeton University students, in 1972. The current version, C-INTERCAL, is maintained by Eric S. Raymond. INTERCAL is said by the original authors to stand for "Compiler Language With No Pronounceable Acronym".

INTERCAL is purposely different from all other computer languages. Common operations in other languages have cryptic and redundant syntax in INTERCAL. From the INTERCAL Reference Manual:

It is a well-known and oft-demonstrated fact that a person whose work is incomprehensible is held in high esteem. For example, if one were to state that the simplest way to store a value of 65536 in a 32-bit INTERCAL variable is:
DO :1 <- #0$#256
any sensible programmer would say that that was absurd. Since this is indeed the simplest method, the programmer would be made to look foolish in front of his boss, who would of course have happened to turn up, as bosses are wont to do. The effect would be no less devastating for the programmer having been correct.

The INTERCAL manual also contains many paradoxical, nonsensical, or otherwise humorous instructions:

Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!

INTERCAL has many other features designed to make it even more aesthetically unpleasing to the programmer: it uses statements such as "READ OUT", "IGNORE", "FORGET" and "PLEASE". The INTERCAL manual gives unusual names for all non-alphanumeric ASCII characters: single and double quotes are "sparks" and "rabbit ears" respectively. The equivalent of a "half mesh" or equals sign in most programming languages is a "<-", referred to as "gets" and made up of an "angle" and a "worm".

The Usenet newsgroup alt.lang.intercal ( is devoted to the study and appreciation of INTERCAL and other esoteric languages.

Despite the language's being intentionally obtuse and wordy, INTERCAL is nevertheless Turing-complete: given enough memory, INTERCAL can solve any problem that a universal Turing machine can solve. It does this very slowly, however. A Sieve of Eratosthenes benchmark, computing all prime numbers less than 65536, was tested on a Sun SPARCStation-1. In C, it took less than 0.5 seconds; the same program in INTERCAL took over seventeen hours. (Stross, 1992)

It should be noted that almost any programming language allows notational horrors as great as or greater than INTERCAL's, as demonstrated in contests such as the International Obfuscated C Code Contest. However, these are generally intentional efforts to create unreadable code, in contrast to INTERCAL's obfuscation by design.

According to the INTERCAL manual, "the aim in designing INTERCAL was to have no precedents", supposedly neither in flow control features, nor in data manipulation operators. The designers were partially successful; the only known precedent is a machine instruction in a Soviet mainframe computer BESM-6, released in 1967, that is effectively equivalent to INTERCAL's "select" operator.


The original Woods-Lyon INTERCAL was very limited in its input/output capabilities: the only acceptable input was numbers with the digits spelled out, and the only output was an extended version of Roman numerals.

The C-INTERCAL reimplementation, being available on the Internet, has made the language more popular with devotees of esoteric programming languages. The C-INTERCAL dialect has a few differences from original INTERCAL and introduced a few new features, such as a COME FROM statement and a means of doing text I/O based on the Turing Text Model.

The authors of C-INTERCAL also created the TriINTERCAL variant, based on the ternary system and generalising INTERCAL's set of operators.

A more recent variant is Threaded Intercal, which extends the functionality of COME FROM to support multithreading.

Hello, world

The traditional "Hello, world!" program demonstrates how different INTERCAL is to standard programming languages. In C, it reads as follows:

        #include <stdio.h>
        int main(void) {
          printf("hello, world\n");
          return 0;

The equivalent program in C-INTERCAL is longer and harder to read:

        DO ,1 <- #13
        PLEASE DO ,1 SUB #1 <- #234
        DO ,1 SUB #2 <- #112
        DO ,1 SUB #3 <- #112
        DO ,1 SUB #4 <- #0
        DO ,1 SUB #5 <- #64
        DO ,1 SUB #6 <- #194
        DO ,1 SUB #7 <- #48
        PLEASE DO ,1 SUB #8 <- #22
        DO ,1 SUB #9 <- #248
        DO ,1 SUB #10 <- #168
        DO ,1 SUB #11 <- #24
        DO ,1 SUB #12 <- #16
        DO ,1 SUB #13 <- #214
        PLEASE READ OUT ,1

External links

Part of an earlier version of this article contains text from The Jargon File 4.2.3 Mar 2001 ( Template:Esolangsde:INTERCAL et:INTERCAL es:INTERCAL eo:INTERCAL (programlingvo) ko:INTERCAL pl:InterCal ru:INTERCAL sk:Intercal sv:INTERCAL


Academic Kids Menu

  • Art and Cultures
    • Art (
    • Architecture (
    • Cultures (
    • Music (
    • Musical Instruments (
  • Biographies (
  • Clipart (
  • Geography (
    • Countries of the World (
    • Maps (
    • Flags (
    • Continents (
  • History (
    • Ancient Civilizations (
    • Industrial Revolution (
    • Middle Ages (
    • Prehistory (
    • Renaissance (
    • Timelines (
    • United States (
    • Wars (
    • World History (
  • Human Body (
  • Mathematics (
  • Reference (
  • Science (
    • Animals (
    • Aviation (
    • Dinosaurs (
    • Earth (
    • Inventions (
    • Physical Science (
    • Plants (
    • Scientists (
  • Social Studies (
    • Anthropology (
    • Economics (
    • Government (
    • Religion (
    • Holidays (
  • Space and Astronomy
    • Solar System (
    • Planets (
  • Sports (
  • Timelines (
  • Weather (
  • US States (


  • Home Page (
  • Contact Us (

  • Clip Art (
Personal tools