Skip to contentSkip to Content

Syntax

HDC’s syntax rules are short enough to hold in your head:

  • One command per line. A newline always ends the current instruction.
  • Commands are case-sensitive and always written in UPPERCASE (STRING, not string or String).
  • Text-taking commandsSTRING, STRINGLN, FAST_STRING, REM — consume the rest of the line exactly as typed, spaces included. STRING open the pod bay doors keeps its spacing intact as the literal text.
  • Other commands take a single value after them on the same line, e.g. DELAY 500 or LOOP 5.
  • A bare key name by itself presses that key: ENTER, TAB, F5, UPARROW.
  • A modifier keyword followed by another key combines them into one held-together keypress — CTRL ALT DELETE is one chord, not three separate presses.
  • Block commands open with one keyword and must be closed with their matching END_ keyword: STRING_BLOCK / END_STRING, FUNCTION / END_FUNCTION, BUTTON_DEF / END_BUTTON, LOOP / END_LOOP. Forgetting the closing keyword is a compile error, not a silent mistake.

Every error HDC can raise is caught at compile time, on your computer — see Error handling. Nothing partially-correct is ever uploaded to the device.

Last updated on