Re: out of memory, even tho remembered nothing!
- Posted by useless_ Oct 18, 2012
- 1797 views
Well, anyhow, this fails to run properly also:
junk = gets(readfile) while sequence(junk) do size += length(junk) puts(1,sprintf("%d",size)&"\r") junk = gets(readfile) end while
And then.........
Yes, I typically check for a sequence, since you only get an atom returned from gets() after you've read all of the file.
But that's my point in that last post, testing for junk being a SEQUENCE doesn't work. EOF is defined as a CONSTANT, and those are defined as OBJECTs, ergo gets() does not return an ATOM.
Yeah, this is related to the long debated equals() vs = reform. But I don't see changing the truth value of atoms changing (the sequence as a boolean / truth value is more likely).
I've defaulted to use equal() now, the debate has been going on over 10 years. Fact is, i'd wrap the boolean expression in parentheses anyhow, so leaving out the = and writing "equal" simply makes it stand out as not an assignment.
useless

