Page 1 of 1

EOF() depending loops

Posted: Tue Feb 24, 2004 7:49 am
by Dreglor
eof() doesn't seam to work in empty file in the result is that loops reading the file depending of eof don't end

Posted: Tue Feb 24, 2004 8:08 am
by plouf
OpenFile(0,"c:\1.txt")
Debug "Start"
While Eof(0)=0
Debug "i am looping"
Wend
Debug "End"

this one ends immidiatly
or you dont mean this ?

Posted: Tue Feb 24, 2004 8:13 am
by Dreglor
sry but i just figured out for some reason on my computer it returns -1 at when it's at the end
the tool bar help says it would be 1 if it hit the end not -1

Posted: Tue Feb 24, 2004 2:45 pm
by GPI
Dreglor wrote:sry but i just figured out for some reason on my computer it returns -1 at when it's at the end
the tool bar help says it would be 1 if it hit the end not -1
Little Tip: True means <>#False. Don't check a=#true, check a<>#false

Posted: Tue Feb 24, 2004 4:30 pm
by Dare2
It would be really nice if #FALSE and #TRUE (and logical returns of same) were fixed values, 0 and 1.

Posted: Tue Feb 24, 2004 6:33 pm
by techjunkie
Dare2 wrote:It would be really nice if #FALSE and #TRUE (and logical returns of same) were fixed values, 0 and 1.
Not many computer languages that work that way... 0 or NULL are always FALSE, but TRUE anything except FALSE...

Posted: Wed Feb 25, 2004 1:02 am
by Dare2
27 (TRUE)

But it would still be nice ... :)