public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
From: mskala@ansuz.sooke.bc.ca
To: xconq7@sources.redhat.com
Subject: (remove) doesn't work
Date: Tue, 18 May 2004 22:12:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.21.0405181803440.5070-200000@diamond.ansuz.sooke.bc.ca> (raw)

[-- 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))

             reply	other threads:[~2004-05-18 22:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-18 22:12 mskala [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.21.0405181803440.5070-200000@diamond.ansuz.sooke.bc.ca \
    --to=mskala@ansuz.sooke.bc.ca \
    --cc=xconq7@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).