Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: RANDOM docs
- X-seq: zsh-workers 16688
- From: Clint Adams <clint@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: PATCH: RANDOM docs
- Date: Thu, 21 Feb 2002 08:21:56 -0500
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <1020221070933.ZM1882@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20020221041555.GA6556@xxxxxxxx> <1020221070933.ZM1882@xxxxxxxxxxxxxxxxxxxxxxx>
> Not a bug, so definitely shouldn't be in BUGS. The doc for RANDOM could
> make it more explicit that the results are is an intentionally repeatable
> psuedo-random sequence.
Index: Doc/Zsh/params.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/params.yo,v
retrieving revision 1.14
diff -u -r1.14 params.yo
--- Doc/Zsh/params.yo 31 Jan 2002 14:44:15 -0000 1.14
+++ Doc/Zsh/params.yo 21 Feb 2002 13:20:47 -0000
@@ -574,9 +574,14 @@
)
vindex(RANDOM)
item(tt(RANDOM) <S>)(
-A random integer from 0 to 32767, newly generated each time
+A pseudo-random integer from 0 to 32767, newly generated each time
this parameter is referenced. The random number generator
can be seeded by assigning a numeric value to tt(RANDOM).
+
+The values of tt(RANDOM) form an intentionally-repeatable pseudo-random
+sequence; subshells that reference tt(RANDOM) will result
+in identical pseudo-random values unless the value of tt(RANDOM) is
+referenced or seeded in the parent shell in between subshell invocations.
)
vindex(SECONDS)
item(tt(SECONDS) <S>)(
Messages sorted by:
Reverse Date,
Date,
Thread,
Author