!/*
Paradigm(s) | Imperative |
---|---|
Designed by | User:TenBillionPlusOne |
Appeared in | 2025 |
Computational class | Total |
Reference implementation | Unimplemented |
File extension(s) | .islst |
!/* or islst is a total language that is . It has three numeric operations: incrementation, division by two and multiplication by three.
Memory
It has one floating-point accumulator, sometimes referred to as x
.
Digit is a natural number from 1 to 3.
Instructions
Each instruction can be an initial, a command or an operand:
Symbol | Initial | Command | Operand |
---|---|---|---|
! |
Set x to 1. |
Increment x . |
A + B |
/ |
Set x to 2. |
Divide x by 2. |
A / B |
* |
Set x to 3. |
Multiply x by 3. |
A * B |
^ |
Set x to a digit from input. |
Set x to x X digit from input. |
- |
? |
Set x to a random digit. |
Set x to x X random number. |
- |
_ |
- | Remove the fractional part of x . |
- |
& |
- | Print x as a number. |
- |
$ |
- | Print x as an ASCII character. |
- |
( X is the next instruction, which is treated as operand. )
An instruction is an initial if it's the first instruction of the code. It initializes the value of the accumulator.
An instruction is an operand if it's immediately after ^
or ?
. It isn't executed.
Error handling
!/* is very strict when it comes to error handling. Every error is displayed as CRITICAL ERROR
.
In the following cases the program reports an error:
- Non-instruction non-whitespace character found.
- Unallowed initial found.
- Unallowed operand found.
- No operand found.
- The program is empty.
- A character is printed when
x
mod 1 ≠ 0. - A character is printed when
x
< 0. - A character is printed when
x
> 255.
Examples
Hello world
*****//++++++++++++_$ **///+++++++++++++++++++_$ +++++++$$ +++$ *///+++_$ /++++++++++$ ***///+++++++++++_$ *//++++++++++++++++++++++_$ +++$ *//+++++++++++++++++++++++_$ ***/////+++++++++_$ //++++++++_$
Without whitespace:
*****//++++++++++++_$**///+++++++++++++++++++_$+++++++$$+++$*///+++_$/++++++++++$***///+++++++++++_$*//++++++++++++++++++++++_$+++$*//+++++++++++++++++++++++_$***/////+++++++++_$//++++++++_$
Quine
CRITICAL ERROR
Cat program
^&
Works only if the input is 1, 2 or 3.