Android Question rnd with or without rndseed?

sorex

Expert
Licensed User
Longtime User
Hello,

I was using some rnd() code today and when I out put the result to the log I seem to get always the same result (running in that genyemu tho, didn't test on real hardware yet)

Do I need to call a randomizer first like in languages as vbscript/asp/... to make sure my values are unique on each run?

And is this rndseed() the randomizer I need ?
 

sorex

Expert
Licensed User
Longtime User
problem solved

BUT

I would still like to have an answer on that seeding question.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
the "help":
upload_2014-8-14_10-31-52.png


So, to debug your app you could use a fix Seed to obtain the same results each time. When you are sure that your code works well, you should remove the RndSeed statement so you'll get different series.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
I saw that Luca, but I thought it might have been a typo and might been "it allows you to NOT get the same results"
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
indeed, thanks to Erel for including so much info in the ide for the commands. In some other IDEs there's nothing at all besides code completion.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
My compliments to Erel are always many and justified.

The "Intellisense" is the greatest invention since the Copy&Paste, the Undo and the woman :D but it is not an invention of Erel, as you certainly know.

(So it is clear that my compliments to Erel are sincere, I do not like the toadies. - I have learned now this word: toadies :D)
 
Upvote 0
Top