Re: out of memory, even tho remembered nothing!

new topic     » goto parent     » topic index » view thread      » older message » newer message
useless_ said...


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.........

mattlewis said...

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.

mattlewis said...

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu