[Gambas-user] Am I doing something wrong?

A Person kztyrvlq at ...966...
Wed Jun 29 17:46:37 CEST 2005


Wednesday, 29 June 2005

Good Day All . . .

I created a random character generator for passwords using Randomize and 
Rnd but I am getting some strange returns.

It is not unusual to get double (almost every result) and triple 
(occasionally) returns in the randomly generated password. Returns such 
as (for example) "nn", "FF", "44", and "LLL". A password may look like 
"5HH7cmmU".

To combat this I created a loop that says loop until this character is 
different from the last with a Randomize in the loop.

This solves the problem but it takes away from the randomised aspect of 
the program.

My guess is that the speed of my machine loops through Gambas's random 
generator so fast that double hits may occur. My guess only.

Any better work arounds?

Thanks.

Paul




More information about the User mailing list