Well, That Sucks

chaoticset on 2001-10-07T14:55:38

Really bizarre behavior from the last sub insert_cards.

See, I started commenting things out again. (I don't know if that's acceptable or smart, but it helps me weed out a certain type of error. The type where you forget something fairly easy to forget, like a right curly brace or a semicolon or something, and the next fifteen lines read in okay, and then there's an error.) I just start commenting things until there's a few lines commented and everything else works okay, and then I go over the few lines.

Well, it works for now, anyway.

For some reason the *outer* foreach loop works. Commented the whole inside out, slapped a print statement in, bango. The cards are reading into the main foreach properly.

The thing that puzzles me are the *KIND* of errors I got for a while. At one point, it would print the first card, then hang. And sit. And look at me.

I'd break out, fascinated. Run it again. Same deal.

There were several variations on this, and I can't think that somehow the arrays became infinitely long (wouldn't that crash the machine, anyway?) and I don't think that foreach somehow started tracking something else.

Weird.

(Okay, okay. I know that at this point, if someone reads this, they're saying to themselves: "He doesn't UNDERSTAND. !" Yup, you're right. That's why I'm keeping the journal: Entertainment of technically able programmers-uh, I mean, to learn from my mistakes. Yeah.)

Anyway. Just wanted to document this and move on.

(Oh, and I'll probably start deleting journal posts soon. It would be a little embarrassing [not to mention I'd get in trouble with pudge] to look at the Top 10 and find out I have a few thousand journal entries.)