diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2020-12-02 18:37:18 +0000 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-09-15 22:30:31 +0100 |
commit | c57132ec2a9c16facff7858c8610c3206398fe7e (patch) | |
tree | 922b9534d9798ff4c57417aeeb1f9de4fc82f8e9 /runtime | |
parent | 6a02ccc2226ab427d7e6243a5b6d3e424557b0fd (diff) | |
download | rneovim-c57132ec2a9c16facff7858c8610c3206398fe7e.tar.gz rneovim-c57132ec2a9c16facff7858c8610c3206398fe7e.tar.bz2 rneovim-c57132ec2a9c16facff7858c8610c3206398fe7e.zip |
vim-patch:8.1.0793: incorrect error messages for functions that take a Blob
Problem: Incorrect error messages for functions that now take a Blob
argument.
Solution: Adjust the error messages. (Dominique Pelle, closes vim/vim#3846)
https://github.com/vim/vim/commit/0d17f0d1c09fa6db306336695ba646c21ea24909
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 2efd7077d9..1a9fc02a9b 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -14,7 +14,7 @@ Using expressions is introduced in chapter 41 of the user manual |usr_41.txt|. 1. Variables *variables* 1.1 Variable types ~ - *E712* + *E712* *E896* *E897* *E898* There are seven types of variables: *Number* *Integer* @@ -610,6 +610,9 @@ Blob creation ~ A Blob can be created with a |blob-literal|: > :let b = 0zFF00ED015DAF +Dots can be inserted between bytes (pair of hex characters) for readability, +they don't change the value: > + :let b = 0zFF00.ED01.5DAF A blob can be read from a file with |readfile()| passing the {type} argument set to "B", for example: > @@ -3805,8 +3808,8 @@ escape({string}, {chars}) *escape()* *eval()* eval({string}) Evaluate {string} and return the result. Especially useful to turn the result of |string()| back into the original value. - This works for Numbers, Floats, Strings and composites of - them. Also works for |Funcref|s that refer to existing + This works for Numbers, Floats, Strings, Blobs and composites + of them. Also works for |Funcref|s that refer to existing functions. Can also be used as a |method|: > @@ -5957,8 +5960,13 @@ items({dict}) *items()* Return a |List| with all the key-value pairs of {dict}. Each |List| item is a list with two items: the key of a {dict} entry and the value of this entry. The |List| is in arbitrary - order. - Can also be used as a |method|: > + order. Also see |keys()| and |values()|. + Example: > + for [key, value] in items(mydict) + echo key . ': ' . value + endfor + +< Can also be used as a |method|: > mydict->items() isnan({expr}) *isnan()* @@ -6129,7 +6137,8 @@ json_encode({expr}) *json_encode()* keys({dict}) *keys()* Return a |List| with all the keys of {dict}. The |List| is in - arbitrary order. + arbitrary order. Also see |items()| and |values()|. + Can also be used as a |method|: > mydict->keys() @@ -8970,14 +8979,15 @@ stridx({haystack}, {needle} [, {start}]) *stridx()* *string()* string({expr}) Return {expr} converted to a String. If {expr} is a Number, - Float, String or a composition of them, then the result can be - parsed back with |eval()|. + Float, String, Blob or a composition of them, then the result + can be parsed back with |eval()|. {expr} type result ~ String 'string' Number 123 Float 123.123456 or 1.123456e8 or `str2float('inf')` Funcref `function('name')` + Blob 0z00112233.44556677.8899 List [item, item] Dictionary {key: value, key: value} Note that in String values the ' character is doubled. @@ -9735,7 +9745,7 @@ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882* values({dict}) *values()* Return a |List| with all the values of {dict}. The |List| is - in arbitrary order. + in arbitrary order. Also see |items()| and |keys()|. Can also be used as a |method|: > mydict->values() |