RT!谢谢·!

解决方案 »

  1.   

    var  StringList: TStrings;
    begin  StringList := TStringList.Create;
    StringList .loadfromfile('c:\123.txt');
    showmessage(StringList[3]);
      

  2.   

    如果每行的长度是一样并且知道这个数值可用
    FileOpen();
    FileSeek();
    FileRead();
    FileClose();
    否则:
    var
      f : TextFile;
      I : Integer;
      vStr, s : String;
    begin
      AssignFile(f, 'd:\j.txt');
      ReSet(f);
      I := 0;
      while not Eof(f) do  
      begin
        Inc(I);
        Readln(f, s);
        if I = 5 then//读取第5行
        begin
           vStr := s;
        end;
      end;
      CloseFile(f);
      Result := vStr;
    end;
      

  3.   

    To: WWWWA(aaaa)
    加个
    StringList.Free就更完美了。