Next: stdlib bytevector flonum, Previous: stdlib bytevector integers 32, Up: stdlib bytevector [Index]
k, …, k+7 must be valid indices of bytevector.
For bytevector-u64-set!
and bytevector-u64-native-set!
,
n must be an exact integer object in the interval 0 <= n <=
2^{64}-1.
For bytevector-s64-set!
and bytevector-s64-native-set!
,
n must be an exact integer object in the interval -2^{63} <=
n <= 2^{64}-1.
These retrieve and set eight–byte representations of numbers at indices
k, …, k+7, according to the endianness
specified by endianness. The procedures with u64
in their
names deal with the unsigned representation; those with s64
with
the two’s–complement representation.
The procedures with native
in their names employ the native
endianness, and work only at aligned indices: k must be a multiple
of 8.
The ...-set!
procedures return unspecified values.
(define b (u8-list->bytevector '(255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 253))) (bytevector-u64-ref b 8 (endianness little)) ⇒ 18302628885633695743 (bytevector-s64-ref b 8 (endianness little)) ⇒ -144115188075855873 (bytevector-u64-ref b 8 (endianness big)) ⇒ 18446744073709551613 (bytevector-s64-ref b 8 (endianness big)) ⇒ -3