Everything else that doesn't fall into one of the other PB categories.
Dreglor
Enthusiast
Posts: 759 Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA
Post
by Dreglor » Tue Feb 24, 2004 7:49 am
eof() doesn't seam to work in empty file in the result is that loops reading the file depending of eof don't end
~Dreglor
plouf
Enthusiast
Posts: 282 Joined: Fri Apr 25, 2003 6:35 pm
Location: Athens,Greece
Post
by plouf » Tue Feb 24, 2004 8:08 am
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 ?
Christos
Dreglor
Enthusiast
Posts: 759 Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA
Post
by Dreglor » Tue Feb 24, 2004 8:13 am
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
~Dreglor
GPI
PureBasic Expert
Posts: 1394 Joined: Fri Apr 25, 2003 6:41 pm
Post
by GPI » Tue Feb 24, 2004 2:45 pm
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
Dare2
Moderator
Posts: 3321 Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land
Post
by Dare2 » Tue Feb 24, 2004 4:30 pm
It would be really nice if #FALSE and #TRUE (and logical returns of same) were fixed values, 0 and 1.
techjunkie
Addict
Posts: 1126 Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:
Post
by techjunkie » Tue Feb 24, 2004 6:33 pm
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...
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Dare2
Moderator
Posts: 3321 Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land
Post
by Dare2 » Wed Feb 25, 2004 1:02 am
27 (TRUE)
But it would still be nice ...