Firebird Documentation IndexFirebird 2.5 Language Ref. UpdateExternal functions (UDFs) → srand
Firebird Home Firebird Home Prev: sqrtFirebird Documentation IndexUp: External functions (UDFs)Next: sright

srand

Library: ib_udf

Added in: 2.0

Description: Seeds the random number generator with the current time in seconds and then returns the first number. Multiple srand() calls within the same second will return the same value. This is exactly how rand() behaved before Firebird 2.0.

Result type: DOUBLE PRECISION

Syntax: 

srand ()

Declaration: 

DECLARE EXTERNAL FUNCTION srand
   RETURNS DOUBLE PRECISION BY VALUE
   ENTRY_POINT 'IB_UDF_srand' MODULE_NAME 'ib_udf'
Prev: sqrtFirebird Documentation IndexUp: External functions (UDFs)Next: sright
Firebird Documentation IndexFirebird 2.5 Language Ref. UpdateExternal functions (UDFs) → srand