Re: out of memory, even tho remembered nothing!

new topic     » goto parent     » topic index » view thread      » older message » newer message
useless_ said...
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.

Yes, -1 is an atom. Yes, gets() returns an atom on EOF. I've used that idiom for years.

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu