Download MetaTrader 5

Error on FileSeek

To add comments, please log in or register
Bogdan Alin Baltatu
2479
Bogdan Alin Baltatu  

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  
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
13441
Rashid Umarov  
Thank you for your message, we are going to check it.

To add comments, please log in or register