m==
		
		
		
		Jump to navigation
		Jump to search
		
m== is an esoteric programming language by User:A inspired by This=That. This programming language tries to represent 6 conditional operators using only 1 operator.
Syntax
| & "this is a comment" | The & operator takes a string and ignores it. It works like a comment. | 
| = | Set a variable to a value. | 
| Output a variable. | |
| input | Set the variable "input" as input. | 
| +, -, *, and / | Do math, like x=4 Jerome=x-2 sets  fruit="fly" printer="paper" sticky=fruit+printer sets  Note that if you try to do math on strings using -, *, or /, the strings will be converted to its hash value. | 
| if exp {things_to_do} | execute "things_to_do" if exp is true. | 
| while exp {things_to_do} | execute "things_to_do" until exp is false. | 
Conditions
Conditions support only one operator, which is the m== operator.
& "m== a b c"
& "evaluate the maximum value of a and b. Return true if the value is equal to c. Otherwise, return false."
& "Works like:"
if m== 12 13 13
{
    a="success"
    print a
}
How to implement other conditionals in if statements:
& "a==b"
if m== a b a
{
    if m== a b b
    {
         & "a==b"
    }
}
& "a!=b"
flag=true
if m== a b a
{
    if m== a b b
    {
        flag=false
    }
}
if m== flag true flag
{
    if m== flag true true
    {
        & "a!=b"
    }
}
& "a>b"
if m== a b a
{
    & "a>b"
}
& "a<b"
if m== a b b
{
    & "a<b"
}
& "a>=b"
flag=true
if m== a b a
{
    flag=false
}
if m== flag true flag
{
    if m== flag true true
    {
        & "a>=b"
    }
}
& "a<=b"
flag=true
if m== a b a
{
    flag=false
}
if m== flag true flag
{
    if m== flag true true
    {
        & "a<=b"
    }
}
Computational Class
You can translate This=That programs easily into this programming language, so it is Turing-complete.