diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-12-06 18:20:10 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-12-06 18:20:10 +0000 |
commit | 86b4816766d976a7ecd4403eca1f8bf6b4105800 (patch) | |
tree | c638eb1843971d9f57efec56e8ba445209f1e10e /runtime/doc/eval.txt | |
parent | 5e0c004f0cef949d0933d2bfaa8fd0e86d675846 (diff) | |
download | vim-git-86b4816766d976a7ecd4403eca1f8bf6b4105800.tar.gz |
Update runtime files
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index c22b3d032..b2863d02f 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.0. Last change: 2022 Nov 22 +*eval.txt* For Vim version 9.0. Last change: 2022 Dec 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -633,6 +633,10 @@ This removes all entries from "dict" with a value not matching 'x'. This can also be used to remove all entries: > call filter(dict, 0) +In some situations it is not allowed to remove or add entries to a Dictionary. +Especially when iterating over all the entries. You will get *E1313* or +another error in that case. + Dictionary function ~ *Dictionary-function* *self* *E725* *E862* @@ -646,7 +650,8 @@ special way with a dictionary. Example: > This is like a method in object oriented programming. The entry in the Dictionary is a |Funcref|. The local variable "self" refers to the dictionary -the function was invoked from. +the function was invoked from. When using |Vim9| script you can use classes +and objects, see `:class`. It is also possible to add a function without the "dict" attribute as a Funcref to a Dictionary, but the "self" variable is not available then. |