Previous: iklib arrays poke, Up: iklib pointers [Index]
With all the following functions: the memory argument must be a
valid pointer object; the index argument must be an exact integer
in the range of the C language type ptrdiff_t
. When adding an
offset to a pointer: all the following functions do scale the
index to the size of the peeked value.
The following bindings are exported by the libraries (vicare)
and (vicare system $foreign)
and reexported by the library
(vicare ffi)
.
The following functions retrieve signed and unsigned exact integers from raw memory location selecting the size with the number of bits required to represent the value.
Peek the 8 bits located at index from memory and return them as signed or unsigned exact integer.
Peek the 16 bits located at index from memory and return them as signed or unsigned exact integer.
Peek the 32 bits located at index from memory and return them as signed or unsigned exact integer.
Peek the 64 bits located at index from memory and return them as signed or unsigned exact integer.
The following functions store signed and unsigned exact integers from raw memory locations selecting the size according to the one used by the C language implementation.
Peek the signed char
or unsigned char
integer located
at index from memory and return it as signed or unsigned
exact integer.
Peek the signed short int
or unsigned short int
integer located
at index from memory and return it as signed or unsigned
exact integer.
Peek the signed int
or unsigned int
integer located
at index from memory and return it as signed or unsigned
exact integer.
Peek the signed long
or unsigned long
integer located
at index from memory and return it as signed or unsigned
exact integer.
Peek the signed long long
or unsigned long long
integer located
at index from memory and return it as signed or unsigned
exact integer.
Peek the size_t
integer located at index from memory
and return it as signed or unsigned exact integer.
Peek the ssize_t
integer located at index from memory
and return it as signed or unsigned exact integer.
Peek the off_t
integer located at index from memory
and return it as signed or unsigned exact integer.
Peek the ptrdiff_t
integer located at index from
memory and return it as signed or unsigned exact integer.
Return the four–byte float (represented as IEEE 754 single precision floating point number) stored at index from memory. The value is extended to an IEEE 754 double precision floating point number that Vicare uses to represent inexact numbers.
Return the eight–byte float (represented as IEEE 754 double precision floating point number) stored at index from memory.
Return a cflonum composed by the two eight–byte floats (represented as IEEE 754 double precision floating point numbers) stored at index from memory.
Return the pointer stored at index from memory. The size of the pointer (also the number of bytes loaded) depends on the architecture: it is 4 bytes on 32-bit systems and 8 bytes on 64-bit systems.
Previous: iklib arrays poke, Up: iklib pointers [Index]