@@ -1265,7 +1265,7 @@ level. They cannot be created in a function, also not in a legacy function.
1265
1265
yet. This will report any errors found during
1266
1266
compilation.
1267
1267
1268
- :defc[ompile] MyClass Compile all methods in a class | class-compile | .
1268
+ :defc[ompile] MyClass Compile all methods in a class. | class-compile |
1269
1269
1270
1270
:defc[ompile] {func}
1271
1271
:defc[ompile] debug {func}
@@ -1720,8 +1720,8 @@ an example for each category: >
1720
1720
Vim does not have a familiar null value; it has various null_<type> predefined
1721
1721
values, for example | null_string | , | null_list | , | null_job | . Primitives do not
1722
1722
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 | .
1725
1725
1726
1726
For a specialized variable, like `job` , null_<type> is used to clear the
1727
1727
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: >
1773
1773
F(null_list) # output: "null"
1774
1774
F([]) # output: "not null, empty"
1775
1775
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.
1777
1777
Change the above function signature to accept different types of arguments: >
1778
1778
def F(arg: list<any> = null_list) # any type of list
1779
1779
def F(arg: any = null) # any type
@@ -1791,18 +1791,18 @@ with vim9 null semantics, the programmer may chose to use null_<type> in
1791
1791
comparisons and/or other situations.
1792
1792
1793
1793
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
1796
1796
Here's an example: >
1797
1797
vim9script
1798
1798
var s1: list<string>
1799
1799
var s2: list<string> = null_list
1800
1800
echo s1 # output: "[]"
1801
1801
echo s2 # output: "[]"
1802
-
1802
+
1803
1803
echo s1 + ['a'] # output: "['a']"
1804
1804
echo s2 + ['a'] # output: "['a']"
1805
-
1805
+
1806
1806
echo s1->add('a') # output: "['a']"
1807
1807
echo s2->add('a') # E1130: Can not add to null list
1808
1808
<
0 commit comments