Skip to content

VAR Expression

VAR reads the current value of an ACE variable.

Syntax

VAR{username;database_name;variable_name}

The production implementation requires exactly three non-empty semicolon-separated parts. It resolves the named user, database, and variable inside the current environment, then substitutes the variable's current value.

Access control

The current user must have the VariableGetValue privilege for the target variable (including the existing ownership/component privilege rules evaluated by ACE). If the read is not permitted, the expression is rejected.

Existing examples

ACE's existing knowledge/reference material uses shapes such as:

VAR{alice;home;count}
VAR{alice;home;temp}
VAR{alice;home;mode}
VAR{alice;home;level}

and nests them in expressions, for example:

CALC{VAR{alice;home;count} + 1}
IF{COMPARE{NUM;>;VAR{alice;home;temp},30};ALERT: too hot;Temperature OK}
SWITCH{VAR{alice;home;mode};1;Night;2;Day;Unknown}
CLAMP{VAR{alice;home;level},0,255}