The notation#
Blocks are written one per line, the way they read in the editor. Inputs are marked by their brackets, a body is indented and closed by an end marker. The vocabulary is the editor’s own in the chosen language — the parser matches against Scratch’s translations, Blockly’s message files or the MakeCode editors’ strings, and a line it does not recognise is drawn as written in a neutral grey (or in the colour of a category you name, see below).
| Pattern | Example | Description |
|---|---|---|
| Stack block | move (10) steps | A command; blocks on consecutive lines snap together |
| Hat block | when green flag clicked | An event; starts a new script |
| Reporter | (x position) | A value with round ends |
| Boolean | <mouse down?> | A condition with pointed ends |
| Input: number | (10) | Numeric input field |
| Input: string | [hello] | String input field |
| Input: dropdown | [random position v] | Dropdown selector — the v marks it |
| Empty input | (), [], <> | An empty slot |
| C-block | repeat (4) … end | A block with a body: indent the body, close it with the end marker |
| C-block with else | if <…> then … else … end | A second body after the else marker |
| Icon | @greenFlag, @turnRight, @turnLeft | The flag and the turn arrows |
| Line label | move (10) steps #step | Names the line, see Labels and line numbers |
What differs between the editors is small and follows the editor:
- End and else markers follow the language:
end/elsein English,ende/sonstin German Blockly,ende/ansonstenin German MakeCode,fin/sinonin French.end,endeandelseare understood in every Blockly and MakeCode language. - Booleans. Scratch and MakeCode draw a condition as a hexagon, so
<…>and(…)are different shapes. Blockly has no hexagonal boolean: there<…>equals(…). - Unknown labels. Scratch names a category with a prefix,
@motion free text(see @category). Blockly and MakeCode use a suffix,hebe Murmel auf ::aktionen— on jwinf the normal case, because the same block reads differently from task to task. - Units. MakeCode shows some units in parentheses; they are typed like a value and drawn as the label:
pausiere (ms) (100),Temperatur (°C). - Editors. MakeCode’s LED matrix and melody editor have a notation of their own, see MakeCode.