* $RANDOM ?
@ 2008-01-16 9:49 ` Atom Smasher
2008-01-16 19:42 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Atom Smasher @ 2008-01-16 9:49 UTC (permalink / raw)
To: zsh-users
from the man page:
The values of RANDOM form an intentionally-repeatable pseudo-random
sequence; subshells that reference RANDOM will result in identical
pseudo-random values unless the value of RANDOM is referenced or seeded in
the parent shell in between subshell invocations.
i'm curious about the "intentionally-repeatable" sequence. where would i
find out more?
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"The nationalist not only does not disapprove of
atrocities committed by his own side, but he has a
remarkable capacity for not even hearing about them."
-- George Orwell
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: $RANDOM ?
2008-01-16 9:49 ` $RANDOM ? Atom Smasher
@ 2008-01-16 19:42 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2008-01-16 19:42 UTC (permalink / raw)
To: zsh-users
Atom Smasher wrote:
> from the man page:
> The values of RANDOM form an intentionally-repeatable pseudo-random
> sequence; subshells that reference RANDOM will result in identical
> pseudo-random values unless the value of RANDOM is referenced or seeded in
> the parent shell in between subshell invocations.
>
> i'm curious about the "intentionally-repeatable" sequence. where would i
> find out more?
It's the call rand() provided by the library and specified by C and
POSIX: http://www.opengroup.org/onlinepubs/009695399/functions/rand.html
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-16 19:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <atom@smasher.org>
2008-01-16 9:49 ` $RANDOM ? Atom Smasher
2008-01-16 19:42 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).