This project took many hours to create! Positive feedback, constructive criticism, and questions are welcome. Without further ado, here are the (very long) instructions: NAVIGATION When prompted to enter text, entering certain things can trigger different results. - 'Add' makes the next line entered add to the code, bypassing other shortcuts it may trigger - 'Run' will start the program, which will take you to a console and away from the code, which can be returned to by pressing the space bar - 'Fix' followed by a number will replace the line number entered with the next line you give it - 'Insert' followed by a number will insert the next line at the given line number - 'Del' followed by a number will delete the line at the specified number EXPRESSIONS Expressions follow the order of operations. Currently supported is addition, subtraction, multiplication, division, exponentiation, and parentheses. Addition can join two (2) strings or a string and a number. VARIABLES Variables can store information for later use! This can be a number or a string, and it is assigned to a name. - Defining a variable uses the syntax 'var varName = info', replacing 'varName' with the name of your variable and 'info' with the information to be stored - A number is simply entered as a number, whereas a string (grouping of characters) should be surrounded by either single (') or double (") quotes - A variable is accessed by using the name in place of a number in any expression - Variables can be updated using 'varName = info', which is the same syntax as before, but without 'var' - Variables can also be created without the keyword 'var' - The equals sign (=) is optional COMMENTS Any line starting with two (2) forward slashes (//) will be ignored. PRINTING Any line starting with 'print' will print the remainder of the line to the console. This can be a variable or an expression. Other than errors, this is the only way to give any kind of output. BOOLEANS A boolean is either 'true' or 'false'. Those can be typed, but 'true' directly evaluates to 1 and 'false' to 0. 'null' () and 0 evaluate to 'false', while everything else is 'true'. IF STATEMENTS An 'if' statement will run one block of code if a certain expression evaluates to 'true', and a different one if it evaluates to 'false'. The second block of code is optional. An 'if' statement might look like this: 'if someBoolean: firstBlock else: otherBlock' where 'someBoolean' is the boolean, 'firstBlock' is the first block of code (can be multiple lines), and 'secondBlock' is the second block of code. The tab key can also be substituted with a greater than sign (>). You can even stack if statements! Another possible 'if' statement might look like this: 'if someBoolean: >if otherBoolean: >>print "Both are true!" >else: >>print "Only the first one is true..."' WHILE LOOPS A 'while' loop will repeat a block is code so long as a certain boolean evaluates to 'true'. A 'while' loop will look like this: 'while someBoolean: codeBlock' The tab is substitutable with a greater than sign (>). FUNCTIONS A function is a block of code that can be called repeatedly. It can also take inputs to be created as temporary variables while the function is running. A function cannot share its name with a variable. - A function is defined as follows: 'func functionName: repeatableCode' where 'functionName' is the name of the function and 'repeatableCode' is the code that will get called. The tab can be replaced with a greater than sign (>). - Inputs are added using this syntax: 'func functionName inputOne inputTwo: >codeThatPresumablyUsesTheInputs' - The keyword 'func' is optional - Functions are called using their names followed by parentheses ('functionName()') - Give inputs using this syntax: 'functionName(inputOne inputTwo) - The parentheses are optional - Functions can be called an unlimited number of times
1563 lines of original code PLEASE NOTE: Scratch is NOT case sensitive, and shortcuts, variables, etc. can all be triggered with ANY capitalization There's a bug with if/else statements but I can't be bothered to fix it.