Random number generator (device): Difference between revisions
Content deleted Content added
m Added the Sidef language |
Added EchoLisp |
||
Line 152: | Line 152: | ||
return result; |
return result; |
||
}</lang> |
}</lang> |
||
=={{header|EchoLisp}}== |
|||
No random device provided by the host (browser). But we can use the system timer to get a physical input. |
|||
<lang lisp> |
|||
(random-seed "simon") |
|||
(random (expt 2 32)) → 2275215386 |
|||
(random-seed "simon") |
|||
(random (expt 2 32)) → 2275215386 ;; the same |
|||
(random-seed (current-time-milliseconds )) |
|||
(random (expt 2 32)) → 4061857345 |
|||
(random-seed (current-time-milliseconds )) |
|||
(random (expt 2 32)) → 1322611152 |
|||
</lang> |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |