printSet(set: long) 🡒 text, pure function

Given a 64-set, returns a complete text representation of its contents. Values appear in ascending order, separated by the , character.

Equivalently, returns the number of bits set to 1 in the binary representation of the provided 64-bit number.

ABC = union(flag(1), union(flag(2), flag(3)))
show scalar "" a1c2 with printSet(ABC) // {1,2,3}

Since 64-sets are limited to 64 values, and each value requires at most 3 characters to be displayed, printSet always stays under the Envision text size limit of 256 characters, and so its return value is always a complete representation of the set.

User Contributed Notes
0 notes + add a note