JCLN

From Esolang
Jump to navigation Jump to search

JCLN (Jump Conditionally to a LiNe) is an OISC instruction invented by User:A.

Syntax

Programs are executed in a sequential order by default.
The basic syntax of the command is to jump to a specific line if a line specified is the "current line".
-1 is a special line: it matches with all of the lines.

To unconditionally jump to a line:

jcln -1, line
#For example, to jump to line 5, you type:
jcln -1, 5

To conditionally jump to a line:

jcln 1, 5
#If the current line number is 1, jump to line 5.

Examples

Odd-Numbered Lines Jumper

This program skips any even-numbered lines, visiting merely that at the positions one (1), three (3), and five (5):

jcln 1, 3
jcln 2, 0
jcln 3, 5
jcln 4, 0

Interpreter

  • Common Lisp implementation of the JCLN programming language.