User talk:AlvinBalvin321

From Esolang
Jump to navigation Jump to search

talk

Overview

Klishinova is an esoteric programming language made by AlvinBalvin321. I was inspired by BASIC, Java (Javagony), ///,

Commands

label <label name> makes a label label <label name> at <line#/+num/-num> makes (or sets) a label at a line number, <num> lines before the command goto <line# or label> jump to a line number or label input <variable/line#/label> stores user input into a variable, line number, or label print


+ set initial variable to sum, if initial isnt a var then does not stor the result. add a backtick (`) after an equation to set second var to result. * set initial variable to product, if initial isnt a var then does not stor the result. add a backtick (`) after an equation to set second var to result. - set initial variable to difference, if initial isnt a var then does not stor the result. add a backtick (`) after an equation to set second var to result. / set initial variable to quocient, if initial isnt a var then does not stor the result. add a backtick (`) after an equation to set second var to result. / <


, set initial parameter to concatination, if initial is a num or string then doesnt store result. add a backtick (`) after to set second parameter to result. \<comment>\ a comment, isnt run as code try tries the code after "try" until "catch", for exceptions or errors catch runs the code after "catch" until "else" if an exception or error was caught in the "try" code else runs code after "else" until "end", after "try" code if nothing is caught end the end of a try-catch-else statement replace replaces all cases of the first parameter to the second parameter throughout the rest of the code replace at <label/line#/+num/-num> replaces all cases of the first parameter to the second parameter at the mentioned line replace in replaces all cases of the first parameter to the second parameter in the mentioned parameter klishinova prints info about the language variables and labels must be made up of only letters and "_", and cannot be any commands all commands, labels, variables, etc are case insensitive (execpt strings)

Examples

basic math

input a input b \gets input for variables a and b\ a / b \sets initial variable to result, if\ b / a` \add a backtick (`) after the equation to set the second var to result\ a + b \sets a to sum a * b a - b a - b` \use this to set b to a-b\ \larger equation like "a - b * 7" will result in an error\ a , b \concatinate a with b\ "a: " , a` "b: " , b` print a print b

truth machine

input num try 1 / num \tries everything after "try" until "catch", and does all code after "catch" if there’s an exception or error, if there's no error then run the code after "else" untile "end"\ catch print "0" else label one_loop print "1" goto one_loop end

if a = b then say equal

print "enter a number" input a print "enter another number" input b a - b try 1 / a catch print "equal" else print "not equal" end \for try cases, all "try" "catch" "else" and "end" commands are needed if you don't need an else block use can just leave it blank\ try 1/0 catch print "1/0" else end

user can code?

label code-at at +3 input code-at try

\type "you are a pro coder"\ catch print "you is POOP at cOdE" else end

quine

print 1

setting variables

\to set a variable it is kinda unintuitive\ a + 15 \you can set a to 15 like this because variables are set to 0 by default\ b , 15 \or like this because 015 is just equal to 15, it will be stored as "015" for string purposes, but when it's used as a number, the "0" will disappear\ print b b / 3 print b \console will output "015", then "5"\

printing and more math

a + 10 b + 5 try print a + b catch print "error" \you cannot print an equation, this will result in an error\ else end \here's an alternative\ a_ + 10 b_ + 5 a + b print a a - b \b is subtracted from a to bring a back to 10\ \another thing, negative numbers are not excepted, it will result in an error\ small_num + 5 large_num + 10 try small_num - large_num catch print "wtf is wrong with u, negatives are STUPID" \u can also leave catches blank to just stop an error from happening (rest of try code will not run)\ else end

arrays

\only 1d arrays are available\ array[0] + 1 array[1] + 5 print array \prints array as "[1,5]"\

for loop

loop_to + 5 \the amount of loops\ i + 0

try