RSeed function

Official Content
This documentation is valid for:

Sets the seed used by the Random function in order to generate the random numbers.

Syntax

&Res=RSeed(Seed)

Where:

Seed
    The seed parameter is of the N(10.0) type.

Type Returned:
Numeric

Scope

Objects: Procedure, Transaction, Web Panel, Data Provider
Generators: .NET, .NET Framework, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)

Description

It can be set n times, and will affect the Randoms executed later. The value returned is not determined and it is not useful.

Samples

&var=RSeed(5)
Do While <Condition>
     …
     &SeedNro = Random( ) 
     ...
EndDo

It generates n pseudo-random numbers. Every time the application is run, it generates the same sequence of numbers because the seed always remains the same.

See Also

Random function