April 19, 2024, 10:57:52 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Random DLL

Started by GWS, February 25, 2008, 12:11:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GWS

Hi,

Here are two little programs for random numbers.

CBasic has the 'Rnd' function to give random numbers in the range 0.0 to 1.0

There are two other functions in this DLL:

Rn(low, high) - gives a random number between the integer low and high values, from a uniform distribution.

Rnorm(low, high) - gives a random number between the integer low and high values, from a Normal distribution.

[Note: the low and high values are Integer values]

The zip file contains two CB test programs, the 'rand' DLL, and 'randdll.txt' which is the EB code used to create the DLL.

Copy the DLL into the CBasic folder.

I can find uses for these functions myself, but I'd be interested in your views. ;D

all the best, :)

Graham

Tomorrow may be too late ..