Human-81
Jump to navigation
Jump to search
Human-81 is an Esolang made by User:A() for humans. It was designed to be simple to read, but also with less commands than other languages.
Commands
| Cmd | Header text |
|---|---|
| Start, (Name), with (inputs). | function |
| End. | Example |
| Print, "(text)" | Example |
| When [Condition], | If statement |
| Add (a) to (b) | a+b |
| Subtract (b) from (a) | a-b |
| While [Condition], | While loop |
| (a) is (b) | a == b |
| (a) isn't (b) | a != b |
| (a) and (b) | a && b |
| (a) or (b) | a or b |
| (a) xor (b) | (a && !b) or (!a && b) |
| (a) nor (b) | !(a or b) |
| Set (Var) to (value) | let a = b |
| Input | |
| do (function) with (inputs) | call function |
Programs
Multiplication
Start, "Multiplication". Set a to input. Set b to input. Set result to 0. While b isn't 0, subtract 1 from b. Add a to result. End. End.
Fractorial
Start, "Main". Start,"Fractorial" with n. When a is 1, return 1. End. # n * Frac(n-1) set local n2 to n subtract 1 from n2 return do Multiplication with n, do Fractorial with n2. End. Start, "Multiplication" with a,b. Set local result to 0. While b isn't 0, subtract 1 from b. Add a to result. End. Return result. End. End.