1line
1line is a joke programming language worked on by DockedChutoy (talk) in the year 2022. It was made to be terrible.
Commands
Types
In 1line, there are 3 types:
Strings
Strings are marked by being surrounded by minuses, like this:
-Hi-
String can be also joined:
-The-+-Thing-
Numbers
Numbers can be made in this fashion:
|123|
Number operations can be stored as well:
|21+21|
Booleans
Booleans cannot be used by the user, and are instead used in conditionals, which will be explained further.
Printing
The command write{} is used to print stuff to screen, like this:
write{-Test-} write{|42|}
Variables
Variables are can be created using the var{} command this way:
var{x-Yes-}write{x}
(Remember that programs are to be written in ONE line, just like in the name) The above example creates a variable called x, stores the value Yes in it, and then prints it.
Also, a variable can be declared inside a command:
write{var{x|876|}}
And finally, you can change a variable:
var{x-AB-}write{x}var{x+-CD-}write{x}
Input
Input can be recieved and stored using the command expect{}:
expect{-x-}write{x}
If there is already something in the variable the input is assigned to, then the input is joined to the variable (Note that expecting the wrong type is an error):
var{x-This is a-}expect{-x-}write{x}
One can also make it so that a string or a number is joined to the recieved input:
expect{-x-+-yes-}
Joining two different types results in a error.
Examples
Hello World
write{-Hello World-}
Cat
write{expect{-x-}}