is there a built in random function?

46 views
Skip to first unread message

Michael Green

unread,
Jan 17, 2026, 9:30:34 AM (yesterday) Jan 17
to Harbour Users
I searched and didn't find a built in random function. Am I missing something? I suppose I  could write my own, but I'd prefer to use a native one.  

miro....@gmail.com

unread,
Jan 17, 2026, 10:01:44 AM (yesterday) Jan 17
to Harbour Users
hbmk2 -find "hb_rand"

Harbour core (installed):
   hb_rand32()
   hb_randInt()
   hb_randNum()
   hb_Random()
   hb_RandomInt()
   hb_RandomIntMax()
   hb_RandomSeed()
   hb_randStr()

n := hb_RandomInt( 1, 20 ) //generates random number between 1 and 20

Michael Green

unread,
10:49 AM (1 minute ago) 10:49 AM
to Harbour Users
Thanks for that. Can anyone direct me to a reference source  for those please? Ta</North of England vernacular>
Reply all
Reply to author
Forward
0 new messages