srand

<< sqrt | FB 2.5 Language Reference | sright >>
<< sqrt | FB 2.1 Language Reference | sright >>
<< sdow | FB 2.0 Language Reference | 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'

back to top of page
<< sqrt | FB 2.5 Language Reference | sright >>
<< sqrt | FB 2.1 Language Reference | sright >>
<< sdow | FB 2.0 Language Reference | sright >>