updated random number generator module

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
Jerry Messina
Swordfish Developer
Posts: 1473
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

updated random number generator module

Post by Jerry Messina » Tue Apr 11, 2023 3:18 pm

I created an updated version of David Eather's PseudoRandomNumberGenerator. See PseudoRandomNumberGeneratorV2

This is a single file implementation (no copying/renaming/changing code) that supports byte, word, longword, and floats.
You simply select the data type of interest using #option RAND_T before including the module file.

I also added an overloaded Get RND() function that lets you get a random number in a range of (lower, upper) values, ie b = GetRND(1, 10)

Post Reply