Skip to contentSkip to Content
The Language of MantisValues & constants

Values & constants

No variables, by design

HDC doesn’t have variables in the traditional sense. There’s no runtime memory to read from or write to while a script is executing, no reassignment, and no way for a script to change its own behavior based on what happened earlier. Once compiled, a payload runs the exact same sequence of instructions every single time.

What HDC gives you instead is DEFINE — a compile-time constant. It doesn’t behave like a variable in Python or JavaScript; think of it as a find-and-replace the compiler performs before your script is turned into bytecode.

DEFINE

DEFINE declares a named constant that later STRING-family commands can reuse:

greeting.hdc
DEFINE #GREETING STR Hello there STRINGLN #GREETING

Syntax: DEFINE <name> <STR|INT> <value>. The name is conventionally prefixed with # to make it visually distinct, but that’s a style convention, not a requirement enforced by the compiler.

Stick to STR-type constants when substituting into STRING, STRINGLN or FAST_STRING — that path is well exercised. INT-type constants exist for numeric contexts and are still being finished.

Data types

HDC recognizes exactly two data types, and both exist purely to tag a DEFINE value:

TypeMeaning
STRA text value — a run of characters, used the same way a literal string is.
INTA whole number value.

There’s no float, boolean, or list type, and no type conversion — because HDC isn’t a computation language, there’s simply nothing to compute.

Speed presets

HDC also ships four named presets you can pass to SET_SPEED, each expanding to a fixed per-character delay in milliseconds:

PresetDelayNotes
$Fastest7 msMachine speed — the fastest pace the device allows.
$Normal15 msStandard, consistent typing pace.
$Human20 msMimics a steady human typist; good default for stealth.
$Random (Pro)12 ms baseVariable-speed, human-like pacing. Pro-tier feature.

See Timing for how these interact with SET_DELAY and DELAY.

Last updated on