AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Brauche dringend Hilfe beim Sortieren

Ein Thema von Thebigx · begonnen am 30. Jun 2008 · letzter Beitrag vom 9. Jul 2008
 
Thebigx

Registriert seit: 30. Jun 2008
7 Beiträge
 
#1

Brauche dringend Hilfe beim Sortieren

  Alt 30. Jun 2008, 20:28
Hallo,

ich bräuchte dringend Hilfe bei einer Aufgabe. Wir sollen Eine Fußballtabelle Sortieren
bloss bin ich beim Sortieren auf Probleme gestoßen.

Hier mal mein Quelltext:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var bs1, bs2, bs3, bs4, bs5, bs6, bs7, bs8, bs9, a, b, c, d, e, f, g, h, i, bt, bat, ct, ht, l1, l2, l3, l4, j, k, l, x, y, z, bayern, Barca, Chel, Hafen, s1, s2, s3, c1, c2, c3, h1, h2, h3 : integer ;

begin
a := StrToInt(edit1.Text);
b := StrToInt(edit2.Text);
c := StrToInt(edit3.Text);
d := StrToInt(edit4.Text);
e := StrToInt(edit5.Text);
f := StrToInt(edit6.Text);
g := StrToInt(edit7.Text);
h := StrToInt(edit8.Text);
i := StrToInt(edit9.Text);
j := StrToInt(edit10.Text);
k := StrToInt(edit11.Text);
l := StrToInt(edit12.Text);



If a > b
then x := 3
else if a = b
then x := 1
else x := 0 ;


If e > f
then y := 3
else if e = f
then y := 1
else y := 0 ;

If i > j
then z := 3
else if i = j
then z := 1
else z := 0 ;
bayern := x + y + z;


If b > a
then s1 := 3
else if a = b
then s1 := 1
else s1 := 0;

If h > g
then s2 := 3
else if h = g
then s2 := 1
else s2 := 0;

If k > l
then s3 := 3
else if k = l
then s3 := 1
else s3 := 0;
Barca:= s1+s2+s3;



If c > d
then c1 := 3
else if c = d
then c1 := 1
else c1 := 0;

If f > e
then c2 := 3
else if e = f
then c2 := 1
else c2 := 0;

If g > h
then c3 := 3
else if g = h
then c3 := 1
else c3 := 0;
chel := c1+c2+c3;


If d > c
then h1 := 3
else if d = c
then h1 := 1
else h1 := 0;

If j > i
then h2 := 3
else if j = i
then h2 := 1
else h2 := 0;

If l > k
then h3 := 3
else if k = l
then h3 := 1
else h3 := 0;

Hafen := h1+h2+h3;

bt := a+e+i;
bat := b+h+k;
ct := c+f+g;
ht := e+j+l;

bs1 := max(Bayern, barca);

ListBox3.items.Add(IntToStr(Bt));
ListBox3.items.Add(IntToStr(Bat));
ListBox3.items.Add(IntToStr(ct));
ListBox3.items.Add(IntToStr(ht));

ListBox2.items.Add(IntToStr(Bayern));
ListBox2.items.Add(IntToStr(Barca));
ListBox2.items.Add(IntToStr(chel));
ListBox2.items.Add(IntToStr(hafen));
Ich weiß ist nicht grad sinnvoll aber mir ist nix anderes zur zeit eingefallen.

Ich wollte fragen wie ich das in einer Listbox absteigend sortieren kann?

über sort macht der das nur aufsteigend

Danke schonmal im Vorraus für eure Hilfe
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:42 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz