Maptitude GISDK Help

SetRandomSeed()

Summary

Seeds the RandomNumber() function.

 

Syntax

SetRandomSeed(integer seed_value)

 

Argument

Contents

seed_value

A seed for the RandomNumber() function

 

Notes

Example

// Use current time in seconds past midnight as the random seed

t = GetDateAndTime() // For example, "Wed Oct 19 10:48:42 1994"

x = ParseString(t, " ") // {"Wed", "Oct", "19", "10:48:42", "1994"}

y = ParseString(x[4], ":") // hh:mm:ss -> {"hh","mm","ss"}

Seconds = s2i(y[1])*3600+s2i(y[2])*60+s2i(y[3]) // Seconds past midnight

SetRandomSeed(Seconds)

 

See Also

Function

Summary

RandomNumber()

Generates a random number between 0.0 and 1.0

RandSamples()

Return an array of random samples of the given type of random distribution and parameters defined in the options array

GetDateAndTime()

Determines the current date and time according to the system clock.

 

 

©2025 Caliper Corporation www.caliper.com