Autor Beitrag
mick
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 159



BeitragVerfasst: Fr 17.12.04 15:17 
hallo zusammen.

frage:
wie sieht die interne implementierung des random-befehls aus (auch: randomize)? mit anderen worten: wie GENAU wird da die (pseudo-)zufallszahl errechnet? weiss da jmd., wie der code ausschaut?

danke + ciao,
mijozi.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6386
Erhaltene Danke: 146

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 17.12.04 15:19 
Randomize steht in der SYSTEM.PAS von Delphi drin.
mick Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 159



BeitragVerfasst: Fr 17.12.04 15:26 
danke!
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Fr 17.12.04 15:42 
Randomize macht nichts anderes als RandSeed mit der aktuellen Systemzeit zu initialisieren (deswegen sollte man Randomize auch nur ein einziges mal aufrufen). Random berechnet dann mit einem bestimmten Algorithmus aufbauend auf dem Wert von RandSeed die Zufallszahlen...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
mick Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 159



BeitragVerfasst: Fr 17.12.04 15:56 
und diesen algo wuerde ich mir gerne genauer ansehen. habe auf anhieb random nciht gefunden in der datei, nur randomize. muss nochmals spaeter genauer nachsehen.
wie genau wird die systemzeit da eigentlich genommen? millisekunden?

ciao,
mijozi.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Fr 17.12.04 16:00 
mick hat folgendes geschrieben:
wie genau wird die systemzeit da eigentlich genommen? millisekunden?

Genau, die Anzahl der Millisekunden seit Mitternacht...

Wegen Random.. such nach "_RandInt", das ist die eigentliche Prozedur von Random (Compiler-Magic)...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
mick Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 159



BeitragVerfasst: Fr 17.12.04 18:25 
merci beaucoup, "motzi"!

ciao,
mijozi.