Condit

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

Condit is an esoteric programming language by Paul E Collins from 2001. All statements of Condit are conditional, taking the form:

when condition then actions

When a program is run, all statements are checked in order, and those with true conditions are run. Then execution starts from the top of the program again, unless no conditions are true, in which case the program halts.

See Talk:Condit to go in-depth on how Condit works

Examples

The linefeed at the end of the examples are MANDATORY

Truth-machine

when a=0 then set i=1 set a=1
when i=1 then put i
when i=0 then put i set i=2

Hello, world!

when a=0 then set a=1 put "Hello, world!"

External resources