On the Subject of Markscript
Turing complete on the inside, wacky stripes on the outside.
Syntax used by this manual
All text is converted to all-caps and has excess whitespace trimmed before execution. Keywords that remain unchanged for each type of line will be shown in lower-case below.
-
Comments: ;COMMENT
- Can be added to the end of any line, with the comment being ignored when the line is executed. Refer to the original manual for limitations with comments.
-
Values: 123 or VARNAME
- Numbers can be negative by prepending -.
- Names are limited to letters A-Z only.
- Places where values are used below will simply be shown as VAL.
-
Variable declaration: var NAME <- VAL or var NAME = VAL
- That <- is the characters < and - side-by-side. They're combined into one as a "ligature" by the font in this manual.
- Alternatively, you can use = instead of <-; this is more typical of actual programming languages and should be familiar to you if you've played either Lines of Code or Not Red Arrows.
- Places where variables (i.e. just a number cannot be used) are used below will simply be shown as VRB.
- Variable assignment: NAME <- VAL or NAME = VAL
-
If statement: if VRB < VAL, if VRB = VAL, or if VRB > VAL
- I recommend prepending the subsequent two lines with n: and y: as a reminder of which line runs next. These additions will be ignored during execution similar to comments. Remember that if the n: line is not a jump, the next line to be run is the y: line.
- If you're using the alternative = syntax for assignment, don't get this mixed up with an if statement containing =, it's still a comparison, not an assignment!
- Jump: goto COMMENT
-
Addition: VRB <- VRB + VAL or VRB = VRB + VAL
- To match the behavior of what an actual Markscript program is capable of for this line, the two variables above must match. If they don't, an error will be displayed.
- Return: return VAL
-
Breakpoint: #
- This is a feature unique to this manual for help with debugging. Placing a # in your code will pause execution at the line it appears on. This is useful if you would like to look through a specific section slowly without needing to wait for prior sections to process at that speed.
- A breakpoint will pause every time this line is reached, not just the first.
- Attempting to press "Cont." while on a line with a breakpoint will not work, use "Step" instead.