Skip to content

Commit d37ae87

Browse files
authored
Merge pull request #1424 from vim-jp/hh-update-vim9
Update vim9.{txt,jax}
2 parents b5aab43 + b76d116 commit d37ae87

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

doc/vim9.jax

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,10 +1800,10 @@ null_<type> ではなく空コンテナを使用してコンテナ変数をク
18001800
var s2: list<string> = null_list
18011801
echo s1 # 出力: "[]"
18021802
echo s2 # 出力: "[]"
1803-
1803+
18041804
echo s1 + ['a'] # 出力: "['a']"
18051805
echo s2 + ['a'] # 出力: "['a']"
1806-
1806+
18071807
echo s1->add('a') # 出力: "['a']"
18081808
echo s2->add('a') # E1130: Can not add to null list
18091809
<

en/vim9.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,7 @@ level. They cannot be created in a function, also not in a legacy function.
12651265
yet. This will report any errors found during
12661266
compilation.
12671267

1268-
:defc[ompile] MyClass Compile all methods in a class |class-compile|.
1268+
:defc[ompile] MyClass Compile all methods in a class. |class-compile|
12691269

12701270
:defc[ompile] {func}
12711271
:defc[ompile] debug {func}
@@ -1720,8 +1720,8 @@ an example for each category: >
17201720
Vim does not have a familiar null value; it has various null_<type> predefined
17211721
values, for example |null_string|, |null_list|, |null_job|. Primitives do not
17221722
have a null_<type>. The typical use cases for null_<type> are:
1723-
- to `clear a variable` and release its resources;
1724-
- as a `default for a parameter` in a function definition, see |null-compare|.
1723+
- to clear a variable and release its resources;
1724+
- as a default for a parameter in a function definition, see |null-compare|.
17251725

17261726
For a specialized variable, like `job`, null_<type> is used to clear the
17271727
resources. For a container variable, resources can also be cleared by
@@ -1773,7 +1773,7 @@ an empty container, do not use null_<type> in a comparison: >
17731773
F(null_list) # output: "null"
17741774
F([]) # output: "not null, empty"
17751775
F(['']) # output: "not null, not empty"
1776-
The above function takes a `list of strings` and reports on it.
1776+
The above function takes a list of strings and reports on it.
17771777
Change the above function signature to accept different types of arguments: >
17781778
def F(arg: list<any> = null_list) # any type of list
17791779
def F(arg: any = null) # any type
@@ -1791,18 +1791,18 @@ with vim9 null semantics, the programmer may chose to use null_<type> in
17911791
comparisons and/or other situations.
17921792

17931793
Elsewhere in the documentation it says:
1794-
Quite often a null value is handled the same as an
1795-
empty value, but not always
1794+
Quite often a null value is handled the same as an empty value, but
1795+
not always
17961796
Here's an example: >
17971797
vim9script
17981798
var s1: list<string>
17991799
var s2: list<string> = null_list
18001800
echo s1 # output: "[]"
18011801
echo s2 # output: "[]"
1802-
1802+
18031803
echo s1 + ['a'] # output: "['a']"
18041804
echo s2 + ['a'] # output: "['a']"
1805-
1805+
18061806
echo s1->add('a') # output: "['a']"
18071807
echo s2->add('a') # E1130: Can not add to null list
18081808
<

0 commit comments

Comments
 (0)