From: jaynews@ntlworld.com   
      
    wrote in message   
   news:1175898592.919670.15630@b75g2000hsg.googlegroups.com...   
      
   > Hello,   
   > the file is just an ASCII file with different data cards. I am   
   > searching for those lines starting with the word GRID.   
   > For example   
      
   > GRID 23.5 25.3 54.7   
      
   [Untested]   
      
   var   
    F : Textfile;   
    Line : string;   
    D1,D2,   
    D3 : Double;   
   begin   
    while not Eof(F) do   
    begin   
    Read(F, Line);   
    if Line = 'Grid' then   
    ReadLn(F, D1, D2, D3);   
    else   
    ReadLn(F);   
    end;   
   end;   
      
   This will only work with space (#32) separated fields. there may be a simple   
   way to change the field separator in Delphi though.   
      
   Jay   
      
   --   
      
   Jason Burgon - author of Graphic Vision   
   http://homepage.ntlworld.com/gvision   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|