util::random (public)

 util::random

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Return a pseudo-random number between 0 and 1. The reason to have this proc is that seeding can be controlled by the user and the generation is independent of Tcl.

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_mail_lite_inbound_procs_check acs_mail_lite_inbound_procs_check (test acs-mail-lite) util::random util::random test_acs_mail_lite_inbound_procs_check->util::random test_parameter__check_procs parameter__check_procs (test acs-tcl) test_parameter__check_procs->util::random util::random_range util::random_range (public) util::random_range->util::random

Testcases:
acs_mail_lite_inbound_procs_check, parameter__check_procs
Source code:
    nsv_set rand seed [expr {([nsv_get rand seed] * [nsv_get rand ia] + [nsv_get rand ic]) % [nsv_get rand im]}]
    return [expr {[nsv_get rand seed]/double([nsv_get rand im])}]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: