Giff Variables and Expressions - Owen2k6/GoOS GitHub Wiki

Variables & Expressions

Variable names

Variables are stored case-insensitively. Internally they’re keyed as lower-case. Prefer simple names: user, path_out.

Substitution

Any command string parameter can include $varName:

  • $name expands to the variable value if present.
  • If not present, the literal $name is kept (no crash).

Example:

set first = "Ada";
set last  = "Lovelace";
concat "$first ", "$last", full;
message "Hello, $full!";

Built-in variables set by controls

  • Buttons: button_<name>_text
  • Labels: label_<name>_text
  • Inputs: input_<name>_text (kept up-to-date on onChange)
  • ListBoxes: listbox_<name>_item_<i>, listbox_<name>_count
  • Panel children: prefix with panel_<panelName>_...

Truthiness (for if)

  • Falsey: empty string, "0", "false" (case-insensitive).
  • Everything else is truthy.

Comparisons

  • == and != perform case-insensitive string comparison.
  • < and > compare integers parsed from both sides.
⚠️ **GitHub.com Fallback** ⚠️