Random number generator (device): Difference between revisions
Content added Content deleted
(→Tcl: Added implementation) |
(→{{header|PicoLisp}}: Added PureBasic) |
||
Line 6: | Line 6: | ||
<lang PicoLisp>: (in "/dev/urandom" (rd 4)) |
<lang PicoLisp>: (in "/dev/urandom" (rd 4)) |
||
-> 2917110327</lang> |
-> 2917110327</lang> |
||
=={{header|PureBasic}}== |
|||
PureBasic has the source for the random data is the "/dev/urandom" device on Linux or Mac OSX and the "Microsoft Cryptography API" on Windows. |
|||
<lang PureBasic>If OpenCryptRandom() |
|||
MyRandom = CryptRandom(#MAXLONG) |
|||
CloseCryptRandom() |
|||
EndIf</lang> |
|||
=={{header|Tcl}}== |
=={{header|Tcl}}== |