Skip to content
ZeroTrace cybersecurity hardware and software

ZeroTrace HID

Operators

ZeroTrace supports dynamic operators (prefixed with _$) and variables.

Operator Syntax Rules

  1. Standalone or in variables: can be used directly or assigned to variables.
  2. Always starts with _$: identifies the token as an operator.
  3. Parentheses required: arguments must be inside (...) even for no-argument operators.
  4. Case-sensitive names: operator names must match exactly.

Valid Usage

# Direct usage
writeLn _$random(1,100)

# Variable assignment
_$VAR randomNum = "_$random(1,100)"
writeLn "${randomNum}$"

Invalid Usage

writeLn "Value: _$random(1,100)"  # Embedded in a normal string
writeLn _$Random(1,100)            # Incorrect case

Available Operators

Random Number Generation

_$random(from, to)  # Random integer between from and to

Example: Input: _$random(1, 10) Output: 7

_$random_number()  # Random digit (0-9)

Example: Input: _$random_number() Output: 3

Practical Examples

Dynamic Configuration

_$VAR ledR = "_$random(0,255)"
_$VAR ledG = "_$random(0,255)"
_$VAR ledB = "_$random(0,255)"
ledColor "${ledR}$" "${ledG}$" "${ledB}$"

or

ledColor _$random(0,255) _$random(0,255) _$random(0,255)

Pro tip: Combine variables and operators to generate dynamic values each run.

Important:

  1. Wrap operator expressions in quotes when assigning to variables.
  2. Reference variables with ${variable}$.
  3. Do not embed operators in normal string literals.
  4. Nested random operators are not supported. Example: _$random(1, _$random(2,5)) is invalid.

Command Palette

Search for a command to run...