Basic module

enum_range

procedureSource

The lowest and highest member value of the enum t.

enum_range :: ($t: Type) -> (low: s64, high: s64)

Parameters

$t: Type

Returns

low: s64
high: s64
Example↗
Level :: enum { LOW :: 1; MID :: 5; HIGH :: 9; }
low, high := enum_range(Level);
assert(low == 1 && high == 9);

See also