Page 1 of 1

Error in Help/ReadFile()

Posted: Sat Nov 19, 2005 6:05 pm
by utopiomania
Just spent some time on this, the sample is from ReadFile() in Help:

Code: Select all

  If ReadFile(0,"Text.txt")   ; if the file could be read, we continue...
    While Eof(0) <> 0         ; loop as long the 'end of file' isn't reached
      Debug ReadString()      ; display line by line in the debug window
    Wend
    CloseFile(0)              ; close the previously opened file
  Else
    MessageRequester("Information","Couldn't open the file!")
  EndIf
The test should be:

Code: Select all

    While Eof(0) = 0

Posted: Sat Nov 19, 2005 6:53 pm
by Pupil

Posted: Sat Nov 19, 2005 7:10 pm
by Trond
This has already been fixed two times.

Posted: Sat Nov 19, 2005 7:47 pm
by utopiomania
Maybe it's unfixed again. I have the latest version (PureBasic_3_94_(ayay50).exe), and the Help is still wrong.

Posted: Sat Nov 19, 2005 8:30 pm
by Trond
It has been fixed two times in the latest version of the help file and the fixed version hasn't been published yet.

Edit: by the way, the ayay50 thing is randomly generated to prevent link leaching to unregistred users.

Posted: Sat Nov 19, 2005 8:31 pm
by Andre
The fix was done after the release of v3.94. So sorry.

Correct example is already in the online-help on www.PureArea.net :D

Posted: Sat Nov 19, 2005 11:19 pm
by utopiomania
Thanks! :)