Warning: This is the manual of the legacy Guile 2.0 series. You may want to read the manual of the current stable series instead.
Next: SRFI-6, Previous: SRFI-2, Up: SRFI Support [Contents][Index]
SRFI-4 provides an interface to uniform numeric vectors: vectors whose elements are all of a single numeric type. Guile offers uniform numeric vectors for signed and unsigned 8-bit, 16-bit, 32-bit, and 64-bit integers, two sizes of floating point values, and, as an extension to SRFI-4, complex floating-point numbers of these two sizes.
The standard SRFI-4 procedures and data types may be included via loading the appropriate module:
(use-modules (srfi srfi-4))
This module is currently a part of the default Guile environment, but it is a good practice to explicitly import the module. In the future, using SRFI-4 procedures without importing the SRFI-4 module will cause a deprecation message to be printed. (Of course, one may call the C functions at any time. Would that C had modules!)
• SRFI-4 Overview: | The warp and weft of uniform numeric vectors. | |
• SRFI-4 API: | Uniform vectors, from Scheme and from C. | |
• SRFI-4 and Bytevectors: | SRFI-4 vectors are backed by bytevectors. | |
• SRFI-4 Extensions: | Guile-specific extensions to the standard. |