|
|
There are 14 different meanings of False.


Prime number
4 products, approx. 34 pages
Write all prime numbers up to 100:
Lambda calculus
2 products, approx. 20 pages
Subroutines are lambda calculus expressions, and are pieces of code contained between [ and ]. The "apply" operator is !. It takes the lambda calculus expression on top of the stack and runs it. Note that if the value on top of the stack is not a lambda expression, the program will behave abnormally. A very basic example subroutine:
ASCII
2 products, approx. 17 pages
, (comma) prints out the topmost stack item as an ASCII character.
Control flow
3 products, approx. 15 pages
FALSE has two control flow statements, if and while.
Factorial
3 products, approx. 11 pages
Factorial calculator for numbers 1 through 8:
Hello world program
1 product, approx. 2 pages
Sample programs taken from the FALSE Programming Language web page: Hello world:
FALSE is an esoteric programming language designed by Wouter van Oortmerssen in 1993, named after his favorite Boolean value. It is a small Forth-like stack-oriented language, with syntax designed to make the code inherently obfuscated, confusing, and unreadable. It is also noteworthy for having a compiler of only 1024 bytes (written in 68000 assembly). According to van Oortmerssen, FALSE provided the inspiration for various well known esoteric languages, including brainfuck and Befunge. FALSE is notably more tractable than most esoteric programming languages. The fundamental operations that it provides are reasonably sensible, and there is no gratuitous complexity. In these respects it stands in stark contrast to the behemoths Intercal and Malbolge. The difficulty of programming in FALSE comes mostly from the low level nature of the language, which has the feel of a Forth-like assembly language. The remainder of the language's awkwardness comes from the concise punctuation-based syntax, which many people find more difficult than a more conventional word-based syntax. The language features basic arithmetic and logical operations, variables, subroutines as lambda calculus expressions, control flow statements, and input/output operations. FALSE operations are done using a stack. Its structure is largely based on the Forth programming language.
Data types that can be used in the program are ASCII characters (which are preceded by ' (single-quote)), 32-bit integers, boolean values (0 representing false; -1 representing true), and lambda calculus expressions. These can be used on the stack or stored in variables.
FALSE supports binary and unary operations in reverse Polish notation, as well as operations that act on the stack alone. Arithmetic operators are +, -, *, and / (binary operators, which pop two elements from the stack and push (respectively) their sum, difference, product, or quotient) and the _ (underscore) is unary negation (which pops one element and pushes its negation). Logical operators are =, >, &, | (binary operators of equality, greater than, logical conjunction, and logical disjunction), and ~ (unary logical negation). Stack operators are (with examples of form example input → resulting stack):
Strings are not a real data type in FALSE; they only exist as string literals and cannot be stored directly on the stack nor in variables, and cannot be modified. However, they can be contained within lambda expressions (which can be stored). When a string is encountered it is simply printed as output. Strings are any character sequence between double-quotes ( ""), including newlines. So, a program consisting simply of

|