array.uint64
import array
Everything here is re-exported by
array, soimport arrayis enough and the names are called asarray.*. Importingarray.uint64on its own works too and reaches the same definitions.
UInt64Array: a packed array of unsigned 64-bit integers, 8 bytes per
element.
UINT64_MAX and UINT64_MIN bound what an element may be; a value
outside them raises rather than wrapping.
Constants
UINT64_MAX
array.UINT64_MAX: bigint
Maximum value that “should” exist in a list passed to UInt64Array.
Classes
UInt64Array
class array.UInt64Array < Array
class UInt64Array represents an array of twos-complement 64-bit unsigned integers in the platform byte order.
Values at or beyond 2^53 need Zuri’s bigint type to be represented
exactly (a regular number is an IEEE-754 double, and loses precision
past that point): append()/set() accept either a plain integer or a
bigint (is_bigint()) for that reason.
- printable — has a
@to_string(), soechoandprint()show something useful - serializable — has a
@to_json(), so it can be handed straight tojson.encode() - valueable — has a
@to_value(), so it converts to a plain Zuri value
UInt64Array.reverse()
array.UInt64Array.reverse() -> UInt64Array
Returns a new array containing the elements in the original array in reverse order.
Returns UInt64Array
UInt64Array.clone()
array.UInt64Array.clone() -> UInt64Array
Returns a new UInt64Array containing all items from the current array. The new array is a shallow copy of the original array.
Returns UInt64Array
UInt64Array.slice()
array.UInt64Array.slice(start, end) -> UInt64Array
Returns a new UInt64Array over [start, end) of this array (both
default to the whole array; negative bounds count from the end).
Parameters
start(?number)end(?number)
Returns UInt64Array
2021, Richard Ore and Zuri contributors