random.integer

random.integer(max: number) 🡒 number, pure function

Returns an integer in the segment $[0,k[$ where $k$ is the exclusive upper bound.

table T = with
  [| 0 as Max |]
  [| 5 |]
  [| 50 |]
  [| 500 |]

T.K = random.integer(T.Max)

show table "" a1b5 with T.Max, T.K