Einzelnen Beitrag anzeigen

Chris Stargard

Registriert seit: 30. Sep 2009
Ort: Beelitz
1 Beiträge
 
Delphi 5 Enterprise
 
#1

Hab ein Problem mit meinem "Zahlensortierer"

  Alt 30. Sep 2009, 11:36
Jetzt kommt der Code in Delphi 5
Delphi-Quellcode:
unit Zahlen_christian_pas;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    GroupBox1: TGroupBox;
    Label2: TLabel;
    Edit1: TEdit;
    Label3: TLabel;
    Edit2: TEdit;
    Label4: TLabel;
    Edit3: TEdit;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Edit4: TEdit;
    Edit5: TEdit;
    Edit6: TEdit;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}
  var a,b,c:integer;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  if (a<b) and (a<c) then edit4.text:=inttostr (a);
  if (b<a) and (b<c) then edit4.text:=inttostr (b);
  if (c<a) and (c<b) then edit4.text:=inttostr (c);
  if (a>b) and (a>c) then edit5.text:=inttostr (a);
  if (b>a) and (b>c) then edit5.text:=inttostr (b);
  if (c>a) and (c>b) then edit5.text:=inttostr (c);
end;


end.

Ich weiß einfach nicht wo der Fehler ist. Das Programm soll die 3 Zahlen der der größe nach ordnen und jede im eigenen Fenster anzeigen.

[edit=SirThornberry]schließendes Delphi-Tag gesetzt - Mfg, SirThornberry[/edit]
Angehängte Dateien
Dateityp: dfm zahlen_christian_pas_127.dfm (3,6 KB, 0x aufgerufen)
Dateityp: dcu zahlen_christian_pas_110.dcu (4,3 KB, 0x aufgerufen)
Dateityp: pas zahlen_christian_pas_148.pas (980 Bytes, 1x aufgerufen)
Dateityp: dpr zahlen_christian_dpr_165.dpr (230 Bytes, 0x aufgerufen)
  Mit Zitat antworten Zitat