The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
The "Random" Random Function |
Post Reply |
Author | ||
kbdav
Newbie Joined: July 12 2016 Status: Offline Points: 23 |
Post Options
Thanks(0)
Posted: December 05 2017 at 8:34am |
|
Can someone explain to me how this happens:
I set myVal equal to a random Integer between 0 and 3 by
and somehow the result in some cases is equal to 4... Try this code:
Tell me how many 2's popup? --------------- I know, I am old school using AccuTerm 2K2. But I'm not in charge of buying the software here.
|
||
PSchellenbach
Admin Group Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
|
|
Hi Keith -
Looks like there is a bug in the Random() function in the VBA scripting engine that AccuTerm uses. It looks like Random() returns a Long between Min and Max+1, instead of between Min and Max. Thanks, Pete |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |