Download MetaTrader 5

Error on FileSeek

To add comments, please log in or register
Bogdan Alin Baltatu
2927
Bogdan Alin Baltatu 2009.12.23 23:07 

Run this code and look at log.

void OnStart()
  {
   int fh=FileOpen("Test.txt",FILE_READ|FILE_WRITE|FILE_TXT);
   FileWriteString(fh,"abcdef",6);
   Print(FileTell(fh));
   FileSeek(fh,-1,SEEK_SET);
   Print("GLE",GetLastError());
   Print(FileTell(fh));
  }
Paul
784
Paul 2009.12.24 00:33  
dudufx  :

Run this code and look at log.



FileSeek(fh,-1,SEEK_SET)  sets the pointer to one before the beginning of the file, so results would be expected to be undefined

Rashid Umarov
Admin
11994
Rashid Umarov 2009.12.24 09:32  
Thank you for your message, we are going to check it.

To add comments, please log in or register