Stage of development: VERY WIP Scroll down to see the instructions on how to use this. Press space to stop execution and go back to the code. Note: x and y values start at 0 from the left and top respectively, and pixels are 3 times bigger than normal Scratch pixels. Non-code commands: "delete": prompts a line number to delete "replace": prompts a line number and what to replace it with "insert": prompts a line number and what to insert there "run": executes your current code "save": gives a code to copy and paste to share your code "load": loads a saved code Expressions use the order of operations! Expression syntax (no spaces, w/ the exception of strings): (, ), +, -, *, /, and ^ do what you'd expect + will concatenate instead of add if either value is a string mouseDown, mouseX, and mouseY should also be self-explanatory "[string]": [string] is a string -use \n for new line, use \ to not do the normal function of the next character (e.g., \" to not have the quotes conflict with the end quotes of the string) [x]%[y]: x mod y [x]=[y]: true if [x] is equal to [y] [x]!=[y]: true if [x] isn't equal to [y] etc for <, >, <=, >= [x]&[y]: true if both [x] and [y] are true [x]|[y]: true if either [x], [y], or both are true e and pi give the value of those constants use the name of a variable to get the value of that variable The following operations have this syntax (operator represented by op): use parentheses or underscores to separate operands e.g.: 1 operand: op_[x] or op([x]) 2 operands: op_[x]_[y] or op([x])([y]) key[x]: true if the key [x] is pressed ([x] must be a string) ![x]: true if [x] is false (doesn't necessarily need underscore or parentheses to separate operand) rand[x]: random integer from 0 to [x] sqrt[x]: square root of [x] abs[x]: absolute value of [x] etc for floor, ceil, round, sin, cos, tan, asin, acos, atan, log, ln atan2[x][y]: finds angle from positive x-axis to the point (x, y) logB[x][y]: log base [x] of [y] prompt[x]: asks the user [x] and returns the answer [x]_includes_[y]: true if [x] contains [y] in it [x][y]: letter [y] of [x] (starts at 0) [x]_length: length of [x] [list]_[x]: item [x] of [list] (starts at 0) [list]_length: # of items in [list] [list]_includes_[x]: true if [x] is an item in [list] [list]_indexOf_[x]: item # (starts at 0) of [x] in [list] Code: self-explanatory ([list][item#] when not used as a value must use _, not just parentheses): console clear console show console hide if [value] ... else (optional) ... end while [value] ... end print [value] [var] = [value] list [list] = [value(s)] (values separated by spaces) [list][item#] = [value] [list][item#] delete [list] clear [list] append [value] plot [value] [value] line [value] [value] [value] [value] (x0, y0, x1, y1) end: end of a statement that contains other code rad: switches to radian mode (default) degrees: switches to degree mode clear: clears everything to white (doesn't affect console) color: either use 3 or 4 values (4th for opacity) or use hex code with optional 4th channel for opacity (e.g., ff0000 or ff0000ff) draw: function that tries to do all code within it in one frame use +=, -=, *=, or /= instead of = for assignment to add, subtract, etc the value to the variable or list item
-Expression calculation is now fully functional! -parentheses -order of operations -variables -lists -strings -many math functions and boolean operations -added "rand" -added "prompt" -added "logB" (log w/ arbitrary base) -added "mouseDown", "mouseX", and "mouseY" -added "key" -added automatic indenting -supports "if"/"else", "while", "function", "end" -added error messages -added "console show", "console hide", "console clear", and "print" -string syntax is now fully functional -"\" escapes the next character -escaped "n" is a new line -added "degrees" and "rad" -sets the mode for trig functions (default is radians) -added "if"/"else", "while", and "end" -added variables -added lists -added save/load commands -added "clear", "color", "plot", and "line" -added "draw" (function that tries to do all code within it in one frame)