Einzelnen Beitrag anzeigen

karim2008

Registriert seit: 28. Nov 2007
30 Beiträge
 

wie soll die schleife geschrieben werden??

  Alt 29. Nov 2007, 13:51
Delphi-Quellcode:
unit analyserMW;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Menus,
  engine, faults, StdCtrls, ExtCtrls, ComCtrls, ToolWin;

type
  TForm1 = class(TForm)
    MainMenu1: TMainMenu;
    File1: TMenuItem;
    SetFileBase1: TMenuItem;
    Colors1: TMenuItem;
    Analyse1: TMenuItem;
    Panel1: TPanel;
    ListBox1: TListBox;
    Label1: TLabel;
    Panel2: TPanel;
    ListBox2: TListBox;
    Label2: TLabel;
    Panel3: TPanel;
    Panel4: TPanel;
    Panel5: TPanel;
    Panel6: TPanel;
    ListBox3: TListBox;
    StatusBar1: TStatusBar;
    PaintBox1: TPaintBox;
    Label3: TLabel;
    Panel7: TPanel;
    PaintBox2: TPaintBox;
    procedure SetFileBase1Click(Sender: TObject);
    procedure Colors1Click(Sender: TObject);
    procedure Analyse1Click(Sender: TObject);
    procedure ListBox1Click(Sender: TObject);
    procedure ListBox3Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure PaintBox1Paint(Sender: TObject);
    procedure PaintBox2Paint(Sender: TObject);
  private
    { Private declarations } 
    dhh, dhc: integer;
    hindex: array[0..6] of byte;
    cfn: string;
    procedure readfile(s: string);
  public
    { Public declarations } 
  end;

var
  Form1: TForm1;

implementation

uses fileselector;

{$R *.dfm} 

procedure TForm1.SetFileBase1Click(Sender: TObject);
begin
  if filelist.showmodal = mrok then begin;
  end;
end;

procedure TForm1.Colors1Click(Sender: TObject);
begin
  if colorcode.showmodal= mrok then begin;
  end;
end;

procedure tform1.readfile;
var f: textfile; st: string; c: char;
begin;
  assignfile(f,s);

  reset(f);
  while not eof(f) do begin;

    readln(f,st);
    ps.parseline(st);
  end;
  closefile(f);
end;

procedure TForm1.Analyse1Click(Sender: TObject);
var i,n:integer; s: string;
begin
  n:= filelist.nfiles;
  ps.reset;
  setlength(operations, n);
  filenumber:=0;
  if n>0 then for i:=0 to n-1 do begin;
    if filelist.isfile(i,s) then begin;
      statusbar1.Panels[0].Text:=extractfilename(s);
      statusbar1.repaint;
      cfn:=s;
      readfile(s);
      operations[filenumber]:=chip[0].nfl;
      inc(filenumber);
      statusbar1.Panels[1].Text:=ps.device;
      statusbar1.repaint;
    end else begin; {its a comment} 

    end;
  end;
  listbox1.clear;
  for i:=0 to 255 do begin;
    if i=52 then begin;
      s:='q';
    end;
    chip[i].countfaults;
    with chip[i] do begin;
      if (nfaults+ npersistantfaults = 0) then listbox1.items.add(format('%3d '+#9+'%6d',[i, nfaults + npersistantfaults]))
      else listbox1.items.add(format('%3d '+#9+'%6d'+#9+' (%d)',[i, nfaults + npersistantfaults, firstfile]))
    end;
  end;
so das programm ist noch nicht fertig!ich brauch hier eine schleife damit ich die daten auf ACII format bekommen kann!ich hab bis jetzt noch kein plan kann mir jemand helfen????

[edit=Sharky]Delphi-Tags gesetzt. Mfg, Sharky[/edit]
[edit=SirThornberry]Titel auf Wunsch Mehrerer grammatikalisch korrigiert - Mfg, SirThornberry[/edit]
  Mit Zitat antworten Zitat