Next: database fcookie, Previous: database tmpfile, Up: Persistence
Return
#tif the native encoding of numbers is big-endian for the machine running Guile,#fif the native encoding is little-endian.
Convert the exact integer n to a machine-format number encoded in a string of length size, which must be 2, 4, or 8. If signed? is true, then the number is encoded with two's complement, otherwise it is encoded as an unsigned bit stream. If big-endian? is true, then the most significant eight bits of the number are encoded in the first character of the resulting string, otherwise the least-significant bits are encoded in the first character, and so on. The default value of big-endian? is the result of
system-big-endian?.If dest is provided, it must be a mutable string of length size; in that case, the encoding of n is written into dest, and dest is returned as the result. If dest is not provided, the result is a newly allocated string. If n cannot be encoded in a string of the requested size and format, an error is thrown. If dest is provided and it is not of length size, an error is thrown.
Convert the machine-format number encoded in string s to an exact integer. The string must contain either 2, 4, or 8 characters. If signed? is true, then the string is decoded as a two's-complement number, otherwise it is decoded as an unsigned integer. If big-endian? is true, then the first character's ASCII value provides the most significant eight bits of the number, otherwise the first character provides the least-significant eight bits, and so on. The default value of big-endian? is the result of
system-big-endian?.
Convert the real number x to its IEEE representation in a string of length size, which must be 4 or 8. If big-endian? is true, then the most significant eight bits of the number are encoded in the first character of the resulting string, otherwise the least-significant bits are encoded in the first character, and so on. The default value of big-endian? is the result of
system-big-endian?. If dest is provided, it must be a mutable string of length size; in that case, the encoding of x is written into dest, and dest is returned as the result. If dest is not provided, the result is a newly allocated string. If dest is provided and it is not of length size, an error is thrown.
Convert the IEEE floating-point number encoded in string s to an inexact real number. The string must contain either 4 or 8 characters. If big-endian? is true, then the first character's ASCII value provides the most siginficant eight bits of the IEEE representation, otherwise the first character provides the least-significant eight bits, and so on. The default value of big-endian? is the result of
system-big-endian?.