Bit_Array module

for_expansion

procedureSource

Lets a Bit_Array be used in a for loop over all its bits, in order: it is the bit and it_index its position.

Example↗
bits := make_bit_array(4);
bits[2] = true;
for bits if it assert(it_index == 2);
deinit(*bits);

Pointer and reverse loops (for *, for <) are not supported and fail an assert. See only_set and only_unset to skip the others.

for_expansion :: (array: *Bit_Array, body: Code, flags: For_Flags)

Parameters

array: *Bit_Array
body: Code
flags: For_Flags

See also