Re: out of memory, even tho remembered nothing!

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

So why can't i do this any more?

readfile = open(readfilename,"rb") 
junk = gets(readfile) 
while junk do 
  size += length(junk) 
  puts(1,sprintf("%d",size)&"\r") 
  junk = gets(readfile) 
end while 


It fails to run because junk isn't an atom. But then, if it was an atom, it would be -1, and not execute the while loop. So i still must do the type checks on it.

useless

Wouldn't this hang as an infinite loop if junk is -1 (a true value) anyway?

http://openeuphoria.org/docs/lang_loop.html#_156_whilestatement

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

Search



Quick Links

User menu

Not signed in.

Misc Menu