Xyz

From Esolang
Jump to navigation Jump to search

Xyz is a programming language that uses letters

How it works

it translates the letters a-z to 1-26, and letters A-Z to 27-52,
the commands are split into 8 letters, 1-3 are instruction. 4-8 are data

Instructions

aab - nop
aac - set the reference var to the next 5 letters, aka the data part, the name for it is ZZZ, ZZ is the name, Z is the determining part
aad - define the next 2 letters as a var,
the 3rd letter in the data part is the "determine if it is a var or a data" thing, B means it is a var
aae - start a function where the next 2 letters is the name,
the 3rd letter is the "determine if it is a var or a data" thing, C means it is a function,
the input is two letters long, the first letter being the name, the second letter being the determiner,
use D for function inputs, function inputs are 1 letter long, 2 if you include the determining part
aaf - end the function, all data spots are unused
aag - run the function which is the next 3 letters, with inputs which are 1 letter long,
the reference var, aka the return var, will be taken out of the function after finishing
aah - output the next 5 letters
aai - halt, all data spots are unused
aaj-ZZZ - a comment

Hello world

aahhello
aahworld
aaiaaaaa

Forever loop

aaeFOCaa
ZZZFOREV
ZZZERSTA
ZZZRTaaa
aagFOCaa
ZZZRUNAG
ZZZAINaa
aafaaaaa
ZZZENDFO
ZZZREVER
aaqFOCaa
ZZZRUNaa