You are looking at historical revision 30786 of this page. It may differ significantly from its current revision.
SRFI-63
Homogeneous and Heterogeneous Arrays
Documentation
This SRFI, which is to supersede SRFI-47, "Array",
- synthesizes array concepts from Common-Lisp and Alan Bawden's array.scm;
- incorporates all the uniform vector types from SFRI-4 "Homogeneous numeric vector datatypes";
- adds a boolean uniform array type;
- adds 16 bit and 128 bit floating-point uniform-array types;
- adds decimal floating-point uniform-array types; and
- adds array types of (dual) floating-point complex numbers.
For the complete SRFI-63 document see SRFI 63.
Note: this extension is compiled in case-sensitive mode, so array prototype identifiers like A:fixZ64b must be spelled using the correct case.
Homogeneous Array Types
All implementations must support Scheme strings as rank 1 character arrays. This requirement mandates that Scheme strings be valid arguments to array procedures; their stored representations may be different from other character arrays.
Although an implementation is required to define all the prototype functions, it is not required to support all or even any of the homogeneous numeric arrays. It is assumed that no uniform numeric types have larger precision than the Scheme implementation supports as numbers.
prototype procedure | exactness | element type |
---|---|---|
vector | any | |
A:floC128b | inexact | 128 bit binary flonum complex |
A:floC64b | inexact | 64 bit binary flonum complex |
A:floC32b | inexact | 32 bit binary flonum complex |
A:floC16b | inexact | 16 bit binary flonum complex |
A:floR128b | inexact | 128 bit binary flonum real |
A:floR64b | inexact | 64 bit binary flonum real |
A:floR32b | inexact | 32 bit binary flonum real |
A:floR16b | inexact | 16 bit binary flonum real |
A:floQ128d | exact | 128 bit decimal flonum rational |
A:floQ64d | exact | 64 bit decimal flonum rational |
A:floQ32d | exact | 32 bit decimal flonum rational |
A:fixZ64b | exact | 64 bit binary fixnum |
A:fixZ32b | exact | 32 bit binary fixnum |
A:fixZ16b | exact | 16 bit binary fixnum |
A:fixZ8b | exact | 8 bit binary fixnum |
A:fixN64b | exact | 64 bit nonnegative binary fixnum |
A:fixN32b | exact | 32 bit nonnegative binary fixnum |
A:fixN16b | exact | 16 bit nonnegative binary fixnum |
A:fixN8b | exact | 8 bit nonnegative binary fixnum |
A:bool | boolean | |
string | char |
Procedures
Author
Aubrey Jaffer
Version history
License
Copyright (C) 2005 Aubrey Jaffer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.