Random Generated Strings as codes

Results 1 to 2 of 2

Thread: Random Generated Strings as codes

  1. #1
    Kenny J Guest

    Default Random Generated Strings as codes

    I am currently tying up some loose ends on a project that I have been working on for some time. I have created a code system that is generated using the randomize timer. Included is a short example. However I am noticing that these codes are not as random as I would have hoped. I am seeing many similar patterns of strings in the 6 digit codes that I am creating. Is there a better way to do this? Do I need to "randomize" after every assignment? Any pointers on this subject would be appreciated.<BR><BR>Kenny J<BR><BR>randomize timer<BR>first=int(26*rnd)+65 &#039number that ascii corresponds to A-Z<BR>second1=int(26*rnd)+65 &#039A-Z<BR>third=int(10*rnd)+48 &#0390-9<BR><BR>code=chr(first)&chr(second1)&chr(third)

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Random Generated Strings as codes

    The problem with randomize is that is does not give you diff values each time<BR><BR>the first time it functions the same as the second time with no record of was generated the first time<BR><BR>the less the gap between the first and second numbers the chances of the same # comming up agian is more<BR><BR>each time you want a random number you have to call the randomize function. you MAY get different results

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts