"unprepend" bug in 2.1

James M Grimes <[email protected]> Wed, 23 Feb 2005 14:21:35 -0800
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
I think ...

It looks like unprepend is taking the second element (i.e. index 1) out 
of a list, instead of the first element (index 0).

Attached is a small program that shows the behavior both visually and 
in the log file.  The first time through a list of objects it 
highlights them in index order, just to show that they are in that 
order.  The second time through it
   1) prints the addresses of the element indices 0, 1, 2,
   2) unprepends,
   3) prints the adress of the unprepended object,
   4) frees that object.

Visually, the spheres disappear in order, except that sphere{0} never 
goes away.  Instead, when you get down to a list of length one you get 
a run-time error.  In the log (which is easier to understand if you 
stretch it out horizontally and vertically), you can actually see the 
the unprepended object is the second element in all cases, and the 
first element (index 0) remains the same through the whole run.

Thanks in advance for look at this.
Jim Grimes



___________________________________________________

Disclaimer:  Opinions stated herein are my own, and do not reflect 
policies or opinions of the Jet Propulsion Laboratory, NASA, or the 
California Institute of Technology.

James M Grimes                            Phone:  1-818-354-3890
Jet Propulsion Laboratory            Fax:       1-818-393-5239
Section 313 - Flight Systems       E-mail: [email protected]
Mailing  Address:                           Office Location: 301-475U
     Jet Propulsion Laboratory, M/S 301-486
     4800 Oak  Grove Drive
     PASADENA  CA 91109-8099

_______________________________________________
breve mailing list
[email protected]
http://lists.spiderland.org/mailman/listinfo/breve
TestList.tz (application/octet-stream, 2.1 KB) - not displayed