Skip to contentSkip to Content

Mantis DEFINE Command

The DEFINE command creates compile-time constants for strings (STR) and integers (INT).

Constants are resolved entirely by Karvi Studio at build time, replacing identifier tokens before bytecode generation without incurring runtime memory overhead on the microcontroller.


Syntax & Examples

hello.mantis
1DEFINE #TARGET_HOST STR karvilabs.in
2DEFINE #INIT_PAUSE INT 1500
3
4DELAY #INIT_PAUSE
5GUI r
6DELAY 500
7STRINGLN ping #TARGET_HOST

  • STRING — Inject text constants.
  • DELAY — Use numeric constants for pauses.
Last updated on