Previous: , Up: bytevectors utils   [Index]


27.1.2 Scaled setters and getters

The following syntaxes are wrappers for bytevector-*-ref and bytevector-*-set! specifying the endiannes in their name, without the need of an additional argument (useful in macros), and scaling the index with the size of the word. The following bindings are exported by the library (vicare containers bytevectors).

Unsigned words of 8-bit

The 8-bit setters and getters exist with the only purpose of having 8-bit identifiers with the same naming scheme of the others; this is useful when building identifiers in macros.

Syntax: bytevector-u8-litend-scaled-set! bv idx val
Syntax: bytevector-u8-bigend-scaled-set! bv idx val
Syntax: bytevector-u8-native-scaled-set! bv idx val

Scaled setters.

Syntax: bytevector-u8-litend-scaled-ref bv idx
Syntax: bytevector-u8-bigend-scaled-ref bv idx
Syntax: bytevector-u8-native-scaled-ref bv idx

Scaled getters.

Signed words of 8-bit

The 8-bit setters and getters exist with the only purpose of having 8-bit identifiers with the same naming scheme of the others; this is useful when building identifiers in macros.

Syntax: bytevector-s8-litend-scaled-set! bv idx val
Syntax: bytevector-s8-bigend-scaled-set! bv idx val
Syntax: bytevector-s8-native-scaled-set! bv idx val

Scaled setters.

Syntax: bytevector-s8-litend-scaled-ref bv idx
Syntax: bytevector-s8-bigend-scaled-ref bv idx
Syntax: bytevector-s8-native-scaled-ref bv idx

Scaled getters.

Unsigned words of 16-bit

Syntax: bytevector-u16-litend-scaled-set! bv idx val
Syntax: bytevector-u16-bigend-scaled-set! bv idx val
Syntax: bytevector-u16-native-scaled-set! bv idx val

Scaled setters.

Syntax: bytevector-u16-litend-scaled-ref bv idx
Syntax: bytevector-u16-bigend-scaled-ref bv idx
Syntax: bytevector-u16-native-scaled-ref bv idx

Scaled getters.

Signed words of 16-bit

Syntax: bytevector-s16-litend-scaled-set! bv idx val
Syntax: bytevector-s16-bigend-scaled-set! bv idx val
Syntax: bytevector-s16-native-scaled-set! bv idx val

Scaled setters.

Syntax: bytevector-s16-litend-scaled-ref bv idx
Syntax: bytevector-s16-bigend-scaled-ref bv idx
Syntax: bytevector-s16-native-scaled-ref bv idx

Scaled getters.

Unsigned words of 32-bit

Syntax: bytevector-u32-litend-scaled-set! bv idx val
Syntax: bytevector-u32-bigend-scaled-set! bv idx val
Syntax: bytevector-u32-native-scaled-set! bv idx val

Scaled setters.

Syntax: bytevector-u32-litend-scaled-ref bv idx
Syntax: bytevector-u32-bigend-scaled-ref bv idx
Syntax: bytevector-u32-native-scaled-ref bv idx

Scaled getters.

Signed words of 32-bit

Syntax: bytevector-s32-litend-scaled-set! bv idx val
Syntax: bytevector-s32-bigend-scaled-set! bv idx val
Syntax: bytevector-s32-native-scaled-set! bv idx val

Scaled setters.

Syntax: bytevector-s32-litend-scaled-ref bv idx
Syntax: bytevector-s32-bigend-scaled-ref bv idx
Syntax: bytevector-s32-native-scaled-ref bv idx

Scaled getters.

Unsigned words of 64-bit

Syntax: bytevector-u64-litend-scaled-set! bv idx val
Syntax: bytevector-u64-bigend-scaled-set! bv idx val
Syntax: bytevector-u64-native-scaled-set! bv idx val

Scaled setters.

Syntax: bytevector-u64-litend-scaled-ref bv idx
Syntax: bytevector-u64-bigend-scaled-ref bv idx
Syntax: bytevector-u64-native-scaled-ref bv idx

Scaled getters.

Signed words of 64-bit

Syntax: bytevector-s64-litend-scaled-set! bv idx val
Syntax: bytevector-s64-bigend-scaled-set! bv idx val
Syntax: bytevector-s64-native-scaled-set! bv idx val

Scaled setters.

Syntax: bytevector-s64-litend-scaled-ref bv idx
Syntax: bytevector-s64-bigend-scaled-ref bv idx
Syntax: bytevector-s64-native-scaled-ref bv idx

Scaled getters.

Single–precision floating–point words

Syntax: bytevector-ieee-single-litend-scaled-set! bv idx val
Syntax: bytevector-ieee-single-bigend-scaled-set! bv idx val
Syntax: bytevector-ieee-single-native-scaled-set! bv idx val

Scaled setters.

Syntax: bytevector-ieee-single-litend-scaled-ref bv idx
Syntax: bytevector-ieee-single-bigend-scaled-ref bv idx
Syntax: bytevector-ieee-single-native-scaled-ref bv idx

Scaled getters.

Double–precision floating–point words

Syntax: bytevector-ieee-double-litend-scaled-set! bv idx val
Syntax: bytevector-ieee-double-bigend-scaled-set! bv idx val
Syntax: bytevector-ieee-double-native-scaled-set! bv idx val

Scaled setters.

Syntax: bytevector-ieee-double-litend-scaled-ref bv idx
Syntax: bytevector-ieee-double-bigend-scaled-ref bv idx
Syntax: bytevector-ieee-double-native-scaled-ref bv idx

Scaled getters.


Previous: , Up: bytevectors utils   [Index]