syncin

From Esolang
Jump to navigation Jump to search

syncin is an esoteric programming language created by BowlingPizzaBall. syncin is the reverse order of insync (based off syllables), and so every single instruction must be written in reverse order. It has support for multiple lines.

Instructions

Name What it does Usage
def Defines a variable. This is the only way strings in the code can be displayed. <varcontent> <varname> def
var Calls a variable. <varname> var
sum Adds 2 numbers. <number2> sum <number1>
sub Subtracts 2 numbers. <number2> sub <number1>
mul Multiplies 2 numbers. <number2> mul <number1>
div Divides 2 numbers. <number2> div <number1>
equals Used as a comparison, checks if something is equal to something. Returns 1 if so, 0 if not. <thing2> equals <thing1>
if If statement. equals is used here. <thing2> equals <thing1> if
else Else statement. <content> if; else
endif Ends an if statement.
endelse Ends an else statement.
loopstart Starts a loop. <times_to_loop(optional)> loopstart
loopend Ends a loop. <loop>; loopend
input Checks the input, then returns it.
length Checks the length of the input, then returns it.
pleaseend
thismisery
rightnow
Ends the program. (not required for all programs)

Examples

Hello World

"Hello World" helloworld def;
helloworld var;

Truth Machine

"0" 0 def;
"1" 1 def;
0 equals input if:
0 var;
pleaseendthismiseryrightnow;
else:
loopstart:
1 var;
loopend;
endelse;
endif;

Cat

input

Fibonacci

"0" firstnum def;
"1" secondnum def;
1 n1 def;
1 n2 def;
firstnum var;
secondnum var;
secondnum var;
loopstart:
n2 sub n1 n1 def;
n1 var;
n1 sub n2 n2 def;
n2 var;
loopend;