Runtime v2.81 · Updated Sep 30, 2026

random_int

Return a random integer in the inclusive min -> max range.

Syntax

random_int(min, max, /)

Parameters

NameDescription
minInt
Lower bound of the range.
Required · Positional only
No default
maxInt
Upper bound of the range.
Required · Positional only
No default

Returns

Int — Random integer between min and max (inclusive).

Behavior / side effects

Return a random integer in the inclusive min -> max range.

Execution

  • Blocking: Conditional
  • Thread safety: Not guaranteed
  • Parallel execution: Conditional

Execution cost and waits depend on the documented operation. Keep mutable values in their owning flow; sharing arbitrary objects between flows has no general thread-safety guarantee.

Example

delay_steps = random_int(1, 4)
wait(delay_steps * 100)

Errors / limitations

No additional limitations documented; follow the parameter and behavior contract above.

Related APIs

None