Alex

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.

Alex is an esoteric programming language with stack-based memory, but it has strange syntax, and all command must end with: " - Alex.". This language was invented by Ronald Houkens.

Examples

Hello, World!

You: This is a comment.
You: Hello World in Alex

Say H - Alex.
Say e - Alex.
Say l - Alex.
Say l - Alex.
Say o - Alex.
Say , - Alex.
Say Space - Alex.
Say W - Alex.
Say o - Alex.
Say r - Alex.
Say l - Alex.
Say d - Alex.
Say ! - Alex.
Say LineFeed - Alex.

Counts from 5 to 0

Set A1 5 - Alex.

Label A - Alex.
Put A1 - Alex.
Decrement A1 - Alex.
Say LineFeed - Alex.
IfNotZero A1 A - Alex.

Truth-machine

You: Truth-machine by SLNETAIGA

Set A1 0 - Alex.
Set A2 1 - Alex.

Get A3 - Alex.
IfEquals A3 A1 z - Alex.
IfEquals A3 A2 o - Alex.
End - Alex.

Label o - Alex.
Say 1 - Alex.
GoTo o - Alex.

Label z - Alex.
Say 0 - Alex.
End - Alex.


Brainfuck translation

Brainfuck Alex
+ Increment A<cell_id> - Alex.
- Decrement A<cell_id> - Alex.
> (No Alex equivalent. Just specify cell id)
< (No Alex equivalent. Just specify cell id)
. Puts A<cell_id> - Alex.
, Gets A<cell_id> - Alex.
[ label A - Alex.
] IfNotZero A<cell_id> A - Alex.

External resources