Skip to content

RANDOM Expression

RANDOM is ACE's general-purpose numeric random expression. It parses two integer range arguments and forwards them to ACE's existing numeric random generator.

Syntax

RANDOM{low,high}

Examples

Existing ACE material uses forms such as:

RANDOM{1,6}
RANDOM{1,2}

The result is an integer returned by ACE's numeric random generator.

This expression reference intentionally does not promise behavior that is not defined by the expression layer itself, such as reversed-bound handling or cryptographic security. Use a normal range with low <= high.

RANDOM vs. RANDSTR

Use RANDOM for general-purpose numeric random choices. Use RANDSTR when you specifically need a cryptographically secure unpredictable string such as a token or random identifier.