public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
* (remove) doesn't work
@ 2004-05-18 22:12 mskala
  2004-05-18 22:26 ` mskala
  2004-05-19  0:30 ` Eric McDonald
  0 siblings, 2 replies; 7+ messages in thread
From: mskala @ 2004-05-18 22:12 UTC (permalink / raw)
  To: xconq7

[-- Attachment #1: Type: TEXT/PLAIN, Size: 610 bytes --]

As far as I can tell, the (remove) form simply returns its second argument
instead of doing its job.  Test case attached - this will fail regardless
because of the lack of terrain types, but it'll also give an error about
trying to match a length-7 list with another list that should also be
length-7 but is in fact length-10.  The only shipped game module using
(remove) is tailhook.g.  I haven't figured out whether (remove) is
misbehaving in that file, but it definitely misbehaves in my test case.
-- 
Matthew Skala
mskala@ansuz.sooke.bc.ca                    Embrace and defend.
http://ansuz.sooke.bc.ca/

[-- Attachment #2: Type: TEXT/PLAIN, Size: 857 bytes --]

(game-module "remove"
  (title "Remove bug demo")
  (version "1.0")
  (blurb "Displays an error in the remove form.")
)

(unit-type unit1 (image-name "adventurer"))
(unit-type unit2 (image-name "adventurer"))
(unit-type unit3 (image-name "adventurer"))
(unit-type unit4 (image-name "adventurer"))
(unit-type unit5 (image-name "adventurer"))
(unit-type unit6 (image-name "adventurer"))
(unit-type unit7 (image-name "adventurer"))
(unit-type unit8 (image-name "adventurer"))
(unit-type unit9 (image-name "adventurer"))
(unit-type unit10 (image-name "adventurer"))

(define nonspecialunits (remove (unit1 unit2 unit3) u*))

;;;; Here's the error: the "remove" form should have set nonspecialunits to
;;;; a length-7 list (10 minus 3) but instead it will have set it to a
;;;; length-10 list.
(add nonspecialunits hp-max (1 2 3 4 5 6 7))

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-06-08  3:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-18 22:12 (remove) doesn't work mskala
2004-05-18 22:26 ` mskala
2004-05-19  0:30 ` Eric McDonald
2004-05-19 12:24   ` mskala
2004-05-19 15:44     ` Jim Kingdon
2004-05-19 21:10       ` mskala
2004-06-08  3:10         ` Eric McDonald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).