Einzelnen Beitrag anzeigen

DenSchub

Registriert seit: 4. Jun 2006
Ort: Balingen
209 Beiträge
 
#1

Caption zuweisung abkürzen

  Alt 1. Jul 2007, 18:48
Hallo.

Ich habe mal ne Frage. In einem Programm muss ich 20 Zufallszahlen erstellen und sie einem Label zuweisen.
Also habe ich es einfach so gemacht:
Delphi-Quellcode:
  Label1.Caption := IntToStr(Random(10000000000));
  Label2.Caption := IntToStr(Random(10000000000));
  Label3.Caption := IntToStr(Random(10000000000));
  Label4.Caption := IntToStr(Random(10000000000));
  Label5.Caption := IntToStr(Random(10000000000));
  Label6.Caption := IntToStr(Random(10000000000));
  Label7.Caption := IntToStr(Random(10000000000));
  Label8.Caption := IntToStr(Random(10000000000));
  Label9.Caption := IntToStr(Random(10000000000));
  Label10.Caption := IntToStr(Random(10000000000));
  Label11.Caption := IntToStr(Random(10000000000));
  Label12.Caption := IntToStr(Random(10000000000));
  Label13.Caption := IntToStr(Random(10000000000));
  Label14.Caption := IntToStr(Random(10000000000));
  Label15.Caption := IntToStr(Random(10000000000));
  Label16.Caption := IntToStr(Random(10000000000));
  Label17.Caption := IntToStr(Random(10000000000));
  Label18.Caption := IntToStr(Random(10000000000));
  Label19.Caption := IntToStr(Random(10000000000));
  Label20.Caption := IntToStr(Random(10000000000));
Geht das auch kürzer?

Dennis
Dennis Schubert
Ground Zero is nichts gegen mein Schreibtisch.
  Mit Zitat antworten Zitat