Skip to content
Snippets Groups Projects
Commit b1c6ee03 authored by James M. Lawrence's avatar James M. Lawrence Committed by Attila Lendvai
Browse files

Fix default ARRAY-INDEX and ARRAY-LENGTH.


ARRAY-DIMENSION-LIMIT is an exclusive upper bound.

Signed-off-by: default avatarAttila Lendvai <attila.lendvai@gmail.com>
parent a019eda8
No related branches found
No related tags found
No related merge requests found
(in-package :alexandria) (in-package :alexandria)
(deftype array-index (&optional (length array-dimension-limit)) (deftype array-index (&optional (length (1- array-dimension-limit)))
"Type designator for an index into array of LENGTH: an integer between "Type designator for an index into array of LENGTH: an integer between
0 (inclusive) and LENGTH (exclusive). LENGTH defaults to 0 (inclusive) and LENGTH (exclusive). LENGTH defaults to one less than
ARRAY-DIMENSION-LIMIT." ARRAY-DIMENSION-LIMIT."
`(integer 0 (,length))) `(integer 0 (,length)))
(deftype array-length (&optional (length array-dimension-limit)) (deftype array-length (&optional (length (1- array-dimension-limit)))
"Type designator for a dimension of an array of LENGTH: an integer between "Type designator for a dimension of an array of LENGTH: an integer between
0 (inclusive) and LENGTH (inclusive). LENGTH defaults to 0 (inclusive) and LENGTH (inclusive). LENGTH defaults to one less than
ARRAY-DIMENSION-LIMIT." ARRAY-DIMENSION-LIMIT."
`(integer 0 ,length)) `(integer 0 ,length))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment