endianness(7scm)
π endianness(7scm) β quote an endianness symbol
okay so this is the Scheme Programmer's Manual page for endianness, and it's literally about quoting an endianness symbol. Group-chat voice on, facts stay on π
β¨ 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 making absolutely sure it's one of the supported endiannesses in the implementation. No fake symbols allowed, bestie β¨
An implementation must support at least big and little, but it may support other endianness symbols.
π§ IMPLEMENTATION NOTES π§
Heads up, this part is implementation-specific tea β
π Larcency Scheme
Using this syntax causes a deprecation warning to be printed.
π EVALUATION π
This syntax evaluates to one of the supported endianness symbols. It's giving validated-endianness-label energy, periodt π
π EXAMPLES π
Watch this:
(endianness little)
=> little
(endianness big)
=> big
π οΈ APPLICATION USAGE π οΈ
This is used as an argument to bytevector procedures. That's the whole job, and it ate π
π 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. Lowkey future-proofing, no cap β¨
π€ COMPATIBILITY π€
This syntax works the same everywhere that it's supported (but see Implementation Notes above). So yeah, consistent vibes, with that one deprecation-warning caveat π
π ERRORS π
This syntax can raise exceptions during expansion with the following condition types:
&syntax(R6RS) β The wrong number of operands was given or the operand was not a supported endianness symbol.
π SEE ALSO π
Go peek at native-endianness(3scm) and bytevector-u16-ref(3scm). Bestie cross-references, iykyk π
π STANDARDS π
R6RS. Periodt.
π¦ 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 https://github.com/schemedoc/manpages/.
okay that's the whole page, bestie π from the Scheme Programmer's Manual, date 2021-03-06, page endianness(7scm) β mwah π
π¦ where this page comes from
- nixpkgs unstable: scheme-manpages 0-unstable-2024-02-11
- π the page's license: MIT
- Copyright (c) 2021 Gwen Weinholt
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms