Sample code for 30+ languages & platforms
Xojo Plugin

Generating Random Integer in Range

See more PRNG Examples

Demonstrates how to generate random integers in a specified range.

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim success As Boolean
success = False

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

success = False

Dim fortuna As New Chilkat.Prng

// Generate random integers between 12 and 24 inclusive
Dim i As Int32
For i = 0 To 100
    System.DebugLog(Str(fortuna.RandomInt(12,24)))
Next