diff runtime/doc/eval.txt @ 18719:99586852c2db

Update runtime files Commit: https://github.com/vim/vim/commit/0c0734d527a132edfb4089be48486586424b3f41 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 26 21:44:46 2019 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 Nov 2019 21:45:05 +0100
parents 128662297ddf
children 2513e666aa82
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*	For Vim version 8.1.  Last change: 2019 Nov 24
+*eval.txt*	For Vim version 8.1.  Last change: 2019 Nov 25
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -7642,16 +7642,17 @@ range({expr} [, {max} [, {stride}]])				
 
 rand([{expr}])						*rand()*
 		Return a pseudo-random Number generated with an xorshift
-		algorithm using seed {expr}.  {expr} can be initialized by
-		|srand()| and will be updated by rand().
-		If {expr} is omitted, an internal seed value is used and
-		updated.
+		algorithm using seed {expr}.  The returned number is 32 bits,
+		also on 64 bits systems, for consistency.
+		{expr} can be initialized by |srand()| and will be updated by
+		rand().  If {expr} is omitted, an internal seed value is used
+		and updated.
 
 		Examples: >
 			:echo rand()
 			:let seed = srand()
 			:echo rand(seed)
-			:echo rand(seed)
+			:echo rand(seed) % 16  " random number 0 - 15
 <
 							*readdir()*
 readdir({directory} [, {expr}])
@@ -9149,7 +9150,8 @@ sqrt({expr})						*sqrt()*
 srand([{expr}])						*srand()*
 		Initialize seed used by |rand()|:
 		- If {expr} is not given, seed values are initialized by
-		  time(NULL) a.k.a. epoch time.
+		  time(NULL) a.k.a. epoch time.  This only has second
+		  accuracy.
 		- If {expr} is given, return seed values which x element is
 		  {expr}.  This is useful for testing or when a predictable
 		  sequence is expected.