| native-endianness(3scm) | Scheme Programmer's Manual | native-endianness(3scm) |
NAME
native-endianness - return the native endiannessLIBRARY
(import (rnrs)) ;R6RS (import (rnrs bytevectors)) ;R6RS
SYNOPSIS
(native-endianness)
DESCRIPTION
This procedure returns the native endianness of the system as a symbol. The symbol is normally one of these:- big
- Big endian. The more significant bytes come before the less significant bytes.
- little
- Little endian. The less significant bytes come before the more significant bytes.
RETURN VALUES
Returns a single symbol.EXAMPLES
(native-endianness)
=> little
APPLICATION USAGE
This procedure is sometimes used when interfacing with external systems that use the native endianness to pass data.COMPATIBILITY
This procedure exists in R6RS and is absent from R7RS-small. SRFI-74 has the native endianness as part of the endianness(3scm) syntax.Other endianness values may exist and they are in that case valid arguments to the system's bytevector procedures.
Most systems today are little endian, but big endian hardware also exists. Other endianness variants have died out.
ERRORS
This procedure can raise exceptions with the following condition types:- &assertion (R6RS)
- The wrong number of arguments was passed.
SEE ALSO
endianness(3scm), bytevector-u16-native-ref(3scm)STANDARDS
R6RSAUTHORS
This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://weinholt.se/scheme/manpages/.| 2021-03-09 |