Scheme Programmer's Manual

NAME

endianness - quote an endianness symbol

LIBRARY

(import (rnrs))                     ;R6RS
(import (rnrs bytevectors))         ;R6RS

SYNOPSIS

(endianness endianness-symbol)

DESCRIPTION

The endianness syntax quotes the endianness-symbol, while ensuring that it is one of the supported endiannesses in the implementation.

An implementation must support at least the symbols big and little, but may support other endianness symbols.

IMPLEMENTATION NOTES

Larcency Scheme
Using this syntax causes a deprecation warning to be printed.

EVALUATION

This syntax evaluates to one of the supported endianness symbols.

EXAMPLES

(endianness little)
          => little

(endianness big)
          => big

APPLICATION USAGE

This is used as an argument to bytevector procedures.

RATIONALE

The native endianness is not included as an option, like it was in SRFI-74. It would have unnecessarily caused the expansion of a program to depend on the machine on which it's expanded.

It is impossible to tell if a new endianness will become popular in the future, so extensions are allowed.

COMPATIBILITY

This syntax works the same everywhere that it's supported (but see Implementation Notes above).

ERRORS

This syntax can raise exceptions during expansion with the following condition types:
&syntax-violation (R6RS)
The wrong number of operands was given or the operand was not a supported endianness symbol.

SEE ALSO

native-endianness(3), bytevector-u16-ref(3)

STANDARDS

R6RS

HISTORY

This syntax is new for R6RS and first appeared in SRFI-74.

There have been mixed-endianness machines, such as the PDP-11, which do not fit as either big or little.

AUTHORS

This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
IMPLEMENTATION NOTES
EVALUATION
EXAMPLES
APPLICATION USAGE
RATIONALE
COMPATIBILITY
ERRORS
SEE ALSO
STANDARDS
HISTORY
AUTHORS
Return to Main Contents