Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.


edited September 25 in SRP Utilities
I have installed OI9.4.6 on a 64Bit laptop running Windows Vista (Dont ask!!)

When executing this code:

SRP_Math("RANDOM", NumberRange<1>, NumberRange<2>, 0)

I get this error message:

"procedure entry point K32GetProcessMemoryInfo could not be located in the dynamic link library KERNEL32.DLL"

Is there a way around this. Does OI9 have a random number generator or is the a coding solution.

Need to be able to set a non zero from number



  • Will the Rnd function serve your needs?

    Unfortunately, older (and unsupported) versions of Windows are missing key functions that many of our products need.
  • edited September 25
    Can you check me on this 'formulae'

    NumberFrom = 1001
    NumberTo = 3456
    Result = Rnd(NumberTo-(NumberFrom-1))+NumberFrom
  • Curious - I'm finding different behaviour between OI9 and OI10, and the help is not accurate in both places!?

    In OI9, this expression returns random numbers between 1001 and 3457 - implying that RND(n) is inclusive of n. This is as documented in the Revelation online help for RND. Although presumably this help is for OI10.

    However in OI10, this expression returns random numbers between 1001 and 3456 - implying that RND(n) is exclusive of n, but as documented for OI9

    Do you get similar results?
  • I didn't test, I just assumed as documented in OI9 as per your srp link.

    How did you test?
  • Very quick and dirty program ;)
    n = 9999999 f = 0; t = 499 min = (f+t)/2; max = min InitRnd time() For i = 1 to n r = rnd( t-(f-1))+f If r < min then min = r If r > max then max = r Next n Return min: '-': max
  • Same as you in OI9.

    InitRnd Time(): Date()

    n = 9999999

    NumberFrom = 1001
    NumberTo = 3456
    Min = NumberTo
    Max = NumberFrom

    For i = 1 to n

    R = Rnd(NumberTo-(NumberFrom-1))+NumberFrom
    If r < min then min = r
    If r > max then max = r
    Next n

    Return min: '-': max

    When Min=1001 , max= 3457
  • Ok, need

  • Or for portability (unless this is an OI10 bug that gets fixed), possibly
    rndRange = NumberTo - NumberFrom If isEngine64() then rndRange += 1 R = Rnd( rndRange) + NumberFrom
Sign In or Register to comment.