> 1 + (SysRandom(0) % 6);

See:

http://www.escribe.com/computing/pcpqa/index.html?by=OneThread&t=SysRandom%2
0and%20sysRandomMax

for why this is slightly more likely to produce 1 and 2 than 3, 4, 5, or 6.
-
Danny

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to