mirror of
https://github.com/zoriya/vim.git
synced 2026-06-08 13:56:27 +00:00
Update runtime files
This commit is contained in:
@@ -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}]]) *range()*
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user