Backtracking INTERCAL
Jump to navigation
Jump to search
Backtracking INTERCAL is an extension of INTERCAL by Malcolm Ryan to include backtracking like in Prolog.
- A MAYBE tag on a statement creates a choice point, containing the entire state of the program except ABSTAIN/REINSTATE status, after which the statement is performed normally.
- A GO BACK statement backtracks to the most recent choice point, redoing the statement in the negated sense, ignoring it if it is active and performing it if it is abstained from.
- A GO AHEAD statement eliminates the most recent choice point from the stack.
See also
- Threaded INTERCAL
- POGA-INTERCAL
- Backtracking INTERCAL was implemented in version 0.25 of C-INTERCAL.
External resources
- Malcolm Ryan's Intercal Extensions (from the Wayback Machine; retrieved on 23 March 2016)