╩αΩ ²Ω±∩ε≡≥Φ≡εΓα≥ⁿ ≥αßδΦ÷≤ ßατ√ Σαφφ√⌡ Γ ASCII-⌠αΘδ?



procedure TMyTable.ExportToASCII;

var
  I: Integer;
  Dlg: TSaveDialog;
  ASCIIFile: TextFile;
  Res: Boolean;

begin
  if Active then
    if (FieldCount > 0) and (RecordCount > 0) then
      begin
        Dlg := TSaveDialog.Create(Application);
        Dlg.FileName := FASCIIFileName;
        Dlg.Filter := 'ASCII-Fiels (*.asc)|*.asc';
        Dlg.Options := Dlg.Options+[ofPathMustExist, 
          ofOverwritePrompt, ofHideReadOnly];
        Dlg.Title := '▌Ω±∩ε≡Φ≥≡εΓα≥ⁿ Σαφφ√σ Γ ASCII-⌠αΘδ';
        try
          Res := Dlg.Execute;
          if Res then
            FASCIIFileName := Dlg.FileName;
        finally
          Dlg.Free;
        end;
        if Res then
          begin
            AssignFile(ASCIIFile, FASCIIFileName);
            Rewrite(ASCIIFile);
            First;
            if FASCIIFieldNames then
              begin
                for I := 0 to FieldCount-1 do
                  begin
                    Write(ASCIIFile, Fields[I].FieldName);
                    if I <> FieldCount-1 then
                      Write(ASCIIFile, FASCIISeparator);
                  end;
                Write(ASCIIFile, #13#10);
              end;
            while not EOF do
              begin
                for I := 0 to FieldCount-1 do
                  begin
                    Write(ASCIIFile, Fields[I].Text);
                    if I <> FieldCount-1 then
                      Write(ASCIIFile, FASCIISeparator);
                  end;
                Next;
                if not EOF then
                  Write(ASCIIFile, #13#10);
              end;
            CloseFile(ASCIIFile);
            if IOResult <> 0 then
              MessageDlg('╬°ΦßΩα ∩≡Φ ±ετΣαφΦΦ ΦδΦ ∩σ≡σ∩Φ±√ΓαφΦΦ '+
                'Γ ASCII-⌠αΘδ', mtError, [mbOK], 0);
          end;
      end
    else
      MessageDlg('═σ≥ Σαφφ√⌡ Σδ  ²Ω±∩ε≡≥Φ≡εΓαφΦ .',
        mtInformation, [mbOK], 0)
  else
    MessageDlg('╥αßδΦ÷α Σεδµφα ß√≥ⁿ ε≥Ω≡√≥εΘ, ≈≥εß√ Σαφφ√σ '+
      '∞εµφε ß√δε ²Ω±∩ε≡≥Φ≡εΓα≥ⁿ Γ ASCII-⌠ε≡∞α≥.', mtError,
      [mbOK], 0);
end;




╤εΓσ≥√ φα≈Φφα■∙Φ∞