>>>Hi,
>>>
>>>Here is an example and the results with question inline:
>>>
>>>
>>>SET DECIMALS TO 6
>>>ldBaseDate = {^1900-01-01}
>>>ldCurrDate = DATE()
>>>RAND(ldCurrDate - ldBaseDate)
>>
>>I see you've solved your original problem. I'm just wondering why you're seeing RAND() this way. Is there some
>reason RAND(-1) won't work for you?
>>
>>Tamar
>
>I use this "RAND(()" approach to generate the same key/code on my computer and the customer computer. The customer does not know that I use this routine and thinks that it is completely random. Once I tell them to enter the returned "code/key" the program verifies it (using the same code I use on my PC) and can perform a procedure that should only be performed under "my supervision." I hope my explanation is clear.
A year ago I would have told you this could be broken by the next version of Fox... if it decides to change the randomizer's algorithm. You should be safe from that kind of surprise now... unless, in the background, rand() is just a wrapper around some API call, which may change at random (don't hang the pun, pardon it) with any version or SP of Windowses. Which we don't know... so I'd rather have a sys(2007) of something based on the dates - it would still look random, but wouldn't be.