Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $RANDOM ?
- X-seq: zsh-users 12449
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: $RANDOM ?
- Date: Wed, 16 Jan 2008 19:42:24 +0000
- In-reply-to: Message from Atom Smasher <atom@xxxxxxxxxxx> of "Wed, 16 Jan 2008 22:49:12 +1300." <20080116094915.60652.qmail@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author