FileIsLineEnding problem

 

I have a .txt file with 2 line

I run the code and FileInLineEnding return false every time.I open the file with notepad++ and i see [CR][LF] caracters on the end of first line.It is a bug ?

int fh=FileOpen("Test.txt",FILE_READ|FILE_WRITE|FILE_TXT);
   //FileWriteString(fh,"abcdef\nabcdef");
   long fs=FileSize(fh);
   Print("FileSize;",fs);
   for (int i=1;i<=fs;i++)
   {
      FileSeek(fh,i,SEEK_SET);
      if (FileIsLineEnding(fh)==true)
      {
         Print("CR pe pozitia ",i);
      } else Print("i=",i);
      if (FileIsEnding(fh)==true) Print("FileEnding");
   }
Get in touch with developers using Service Desk!
  • www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.
 

Build number please

 

MT5 Build 234

MetaEditor Build 222

 

FileIsLineEnding flagged when you read file. Seeking is not reading