Hallo,
Hier ist etwas seltsam. Floatvariablen sind doch eigentlich für einem Wert
bis zu 4 Milliarden vorgesehen.
Mit Rnd wird in der Floatvariablen aber nur bis ca. 32000 gespeichert.
Ich weiß, dass Rnd nur ganze Zahlen ausgibt, aber es sollte doch trotzdem
funktionieren.
Cls
Declare lb&,z!,x&
lb&=CreateSortedListBox(%hwnd,"",200,40,200,300)
Decimals 1
Randomize
WhileLoop 100
z!=Rnd(20000000.0)
x&=Rnd(20000000)
'z!=1000000000
AddString Format$("00000000",z!)' + "=" + str$(z!)
AddString Format$("00000000",x&)' + "=" + str$(z!)
Wend
MoveListToList(lb&)
SendMessage(lb&,$0186,GetCount(lb&) - 1,0)
Print "Ich bin die größte: " + Str$(Val(GetString$(lb&,GetCount(lb&) - 1)))
WaitInput
Gruß
Jörg
|