(BUG?) implicit indexing return message

Q&A's, tips, howto's
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

(BUG?) implicit indexing return message

Post by newdep »

Why is (-3 L) out of bound but (3 L) is ()..

(setq L '( (one) (two) )
((one) (two))

-> (L 0)
(one)
-> (L 1)
(two)
-> (L 2)
ERR: list index out of bounds

-> (0 L)
((one) (two))
-> (1 L)
((two))
-> (2 L)
()
-> (3 L)
()
-> (4 L)
()




These though are concequent ->

-> (L -3)
ERR: list index out of bounds

-> (-3 L)
ERR: list index out of bounds




why is a too big index an Illigal parameter type: 2 ?->
That seems to be the wrong index, shouldnt that be 3 ?


-> (1 2 L)
((two))

-> (1 2 3 L)
ERR: illegal parameter type : 2

-> (1 5 3 L)
ERR: illegal parameter type : 5
-- (define? (Cornflakes))

Locked