Posted by Chris Stillwell on April 22, 2001 at 21:06:58:
In Reply to: what the.... posted by Z on April 22, 2001 at 20:53:27:
This one I can tell you what's probably happening. It's a scope problem, most likely. Your lists contain whatever was in memory before they got ahold of it. When they enter your function, they perform as expected. When they leave your funtion, they leave scope, forget everything, and go back to having their funky values.
: Before my program executes the first command, my
: Plant list and Animal list already have sizes, right
: before it enters the function that executes the first
: push, my Plant list has a size of 4, and Animal list
: has a size of something like 347896, but then when
: it enters the function that executes the first push,
: suddenly both become 0 as they should be, then the push
: is executed and one of them becomes a size of 1, then
: it leaves the function and gets those crazy sizes again,
: what in Gods name is going on?
Post a Followup