Septem Lingua
Septem Lingua is designed by PSTF. It has 7 basic commands, and everyone can add more commands into this language.
Disclaimer
The name of this language literally means 'seven languages,' but it has no direct connection to seven languages. Septem stands for 7, which means this has 7 command.
Rules
- Do not add non-computable commands to this language.
- Adding joke commands is prohibited. Septem Lingua is a serious language.
- Unless otherwise specified, all commands will be treated as functions.
Reserved Area
[} {]is a comment block.- String literals are quoted in double quotation marks, and single quotation mark is for Rune type.
- Escaping Sequence is same as in Python.
- stdin means user's raw input.
- There is NO boolean literals. Non-empty value is used as true and empty value(for example, 0, or "") is false.
Command Table
print arg_list, sep <- "", end <- "\n", filename <- "CON"
Output a series of contents separated by sep and ending with end to the file pointed to by filename. By default, filename points to CON, that is, the console.
let x <- y
Let x be y. If x is already defined, then "let" must be omitted.
label x:
Define a label.
jump x
Point the code pointer to the corresponding label.
if x then y else z end
Evaluates to y if x is true otherwise z.
while x do y end
Repeatly do y until x is not true.
halt
Halt.
Note: do end is a code block.
Extended Command Table
By PSTF himself
type x
Return x after converting it to the corresponding data type.
typeof x
Return x's type.
lambda arg_list do function_body end
Function definition. Can be assigned to variable.
Examples
Better Machine
let x <- int(stdin)
let y <- int(stdin)
if (x - y) = 0 then do
let a <- x + y
while a != 0 do
print 0
a <- a - 1
end
else
while 1 do
print 1
end
end