![]() |
Problem mit Randomize
Bei mir klappt das irgendwie nicht
Random gibt keinen Wert zurück!!!
Delphi-Quellcode:
procedure GeschwTest;
var i : Integer; Anz_VKopf,Anz_VZeil:Integer; begin Anz_VKopf := StrToInt(FrmMain.EditAnzKopf.text); Randomize; Anz_VZeil := Random(StrToInt(FrmMain.EditAnzZeil.Text)); if (FrmMain.TabVKopf.Active = True) and (FrmMain.TabVZeil.Active = True) then begin for i := 0 to Anz_VKopf do begin end; end; end; |
Re: Problem mit Randomize
Kann es sein, dass die der Compiler die Variable weg-optimiert, weil du sie nicht benutzt? Desweiteren lies mal, was in der Hilfe zu Randomize steht.
|
Re: Problem mit Randomize
Mit z.B.
Delphi-Quellcode:
gehts auch nicht.
RandSeed := 16;
|
Re: Problem mit Randomize
Erstens:
Zitat:
Zweitens: Zitat:
Zitat:
|
Re: Problem mit Randomize
Wie Luckie schon gesagt hat, kommt randomize ins onCreate der Form.
Gruss Häcki :hi: |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:28 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz