QuickLang
(Redirected from QuickLangs)
Instructions start with a . and end with a ;.
The Hello World Program is:
.out:"Hello, World";.end;
.out is the output, while .end ends the program.
Other instructions include:
| structs | info |
|---|---|
| .in | take input |
| .if:...{...} | if the instruction is 1, it does what is in the braces, if it's zero then it just ignores the braces |
| .loop:...{...} | same as if, just loops until zero |
| .add | adds one |
| .sub | subtracts one |
| @var | variables begin with an @ symbol
|
truth-machine:
@var = .in;
.if:@var{.loop:@var{.out:@var;}}
.out:@var;
.end;
A+B Problem:
@a = .in;
@b = .in;
@i = @b
.loop:@i{
.add:@a;
.sub:@i;
}
.out:@a;
.end;
Anything not starting with . or @ is a comment (just don't use ., ;, or @ in a comment)
Xkcd Number:
.out:"4"; numbers also work .end; example: out:4