Plea
Plea is a high-level esoteric programming language created by User:UnavgAustralian on the 3rd of December 2025. It is named due to the fact that you have to beg the program to run.
Syntax
Beg
Every Plea program must have its first line be
beg "enter begging here"
in order for the program to run, plus the begging must also be sufficient for the program to run. So you can't just type anything in.
Functions
Plea functions are defined like this:
fnctn returns <value> nm <name> args <parameters> calls
<function code>
;
The value in returns is the return value of the entire function, also there is no return keyword.
The name is the name of the function, the parameters are the parameters of the function, and the function code is the function code.
The parameters are defined like this:
let <name> <in/out> <type>
Where <in/out> is used to specify the direction of the parameter, 'in' means that the value is inputted externally, and 'out' means that the value is outputted to an external call. The first out parameter and the return value also must match, or the program will refuse to run.
The main function
The main function in Plea is usually defined like this:
fnctn returns 0 nm main args let v in void calls
<main code>
;
And it is the entry point for all Plea programs, and as such, it must call itself or the program will stop since it will assume you didn't want to call main.
Calling functions
Functions are called like this:
call <function_name> in <input_variables (required)> endin out <output_variables (optional)> endout
You can use parameter syntax for output variables.
Built-in functions
The built-in functions are print and let_all_hell_break_loose. The last one randomises the execution of the program once it reaches it until it crashes.
Variables
Variables are defined like this:
let <name> = <value/shorthand_type>
If you assign a variable to a value, Plea will automatically choose a type for the variable. If you assign a variable to a type instead of a value, Plea will automatically set the value of that variable to that type's default value (0 for ints, 0.0 for floats, and 72 for chars). There are no strings in Plea, so you have to use a char array instead.
let hello = "Hello" << Illegal!
You might be saying, "Why is the default default value for chars a number?" It's because chars are not defined by a character (let h = 'h'), but instead by that character's ascii value, and with an optional 'c' prefix so that it isn't mistaken for an integer (let h = c104).
Arrays
Arrays are defined with their type plus '[]', you cannot assign a value to them but only to their elements, which must be defined separately, for example:
let int_array = i[] then let int_array@0 = 1 then let int_array@1 = 2 then let int_array@2 = 3
'@' means at index.
You can also refer to the first element with just the name of the array. Referring to the array itself requires using '[]' after the name.
Changing variables
Variables' values can be changed using 'chg', which is used like this:
chg <variable>,<new_value>
You can also chain changes, for example:
chg a,chg b,c
Which changes a and b to c.
Math
In plea, there is no multiplication, division, modulo, bitwise logic, etc. There are only increment and decrement operators, which you can easily repeat with this syntax:
.x<times_to_repeat>
The number of times to repeat an operation can be represented by a number or variable, and you can even repeat repeats, which makes multiplication a bit easier. There is a self symbol ('*'), which can be used in 'chg' to refer to the variable being changed, for example
chg a,*+
increments a by one. And this multiplies a by itself plus one:
chg a,*+.x*.x*
Control Flow
There are no if statements or loops. Instead there are when statements and jumps. When statements are declared with this
when <variable> <is/is not> <value>
at the end of any statement or expression, and executes the statement whenever the condition is met, if it is never met, the program refuses to run.
Jumps are declared with 'jmp' plus the line to jump to, not as a number, but as an expression similar to a math expression but without repeats, and with '_' as the self symbol instead of '*'. For example
jmp _++
jumps 2 lines forward, and this
jmp _--
jumps 2 lines backward.
Jumps are expressions, which means you can use them in returns, setting variables, and changing variables.
Catch
Catches are used after a line to make the program ignore any instance of the value in the catch in that line. Catches should be predominantly used with when statements, since you can also catch errors with them, for example
chg a,0 when b is 1 catch error
will change a to 0 whenever b is 1, but if b is never 1 the program will not refuse to run because of the error being caught.
Here is another example of catch but not with a when statement:
let a = 20 catch 0
This code will set a to 2 instead of 20 because of the 0 being ignored.
Defl
Defl means 'defined later', and can be used for basically anything, for return values, values of variables, function names, variable names, calls, etc. It signifies to the program that the thing after it is defined later, for example
fnctn returns 0 defl nm ...
makes the function's name classified as defined later, but if it is never defined later, the program will refuse to run, but you can do this
fnctn returns 0 defl nm catch error ...
in order for a function's name to be able to be permanently 'defined later'.
You are probably wondering, "Can you call a function or reference a variable that is defined later?" And the answer is yes, when a function or variable is 'defined later', it gets automatically assigned with a default name ('undefined_<number>' for functions, and 'undefined_var_<number>' for variables), and you can refer to that function or variable name with that name.
"But how can you make a function or variable's name not defined later", you might say. Well, you can use this syntax:
undefined_<number>.name = <defined_name>
You cannot use this syntax for anything else, only for defining things that are 'defined later'.
Weird intentional behaviour
Its late, I'm just going to finish this tomorrow