Skip to content

Commit 8f855ab

Browse files
committed
Update builtin.{txt,jax}
1 parent 9c7ffc3 commit 8f855ab

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

doc/builtin.jax

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Mar 23
1+
*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Mar 29
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -2276,8 +2276,8 @@ empty({expr}) *empty()*
22762276
- ジョブ |Job| は開始に失敗したときは空である。
22772277
- チャネル |Channel| は閉じられていると空である。
22782278
- |Blob| はその長さが0のときは空である。
2279-
- |Object| はオブジェクトの組み込みメソッド
2280-
|empty()| (存在する場合) が真を返すとき空である。
2279+
- |Object| はオブジェクトの empty() メソッドが (もし存在し) 真
2280+
を返すとき空である。|object-empty()|
22812281

22822282
長いリストに対しては長さを0と比較するよりこちらの方がずっと高
22832283
速である。
@@ -5407,9 +5407,9 @@ len({expr}) 結果は数値で、引数{expr}の長さ。{expr}が文字列ま
54075407
{expr}がリスト |List| のときは要素数を返す。
54085408
{expr}が |Blob| の場合、バイト数を返す。
54095409
{expr}が辞書 |Dictionary| のときは要素数を返す。
5410-
{expr}が |Object| のときは、オブジェクトの |len()| メソッドを
5411-
(存在する場合) 呼び出して長さを取得する。それ以外のときはゼロ
5412-
を返す
5410+
{expr}が |Object| のときは、オブジェクトの len() メソッドを
5411+
(存在する場合) 呼び出して長さを取得する (|object-len()|)。それ
5412+
以外のときはゼロを返す
54135413

54145414
|method| としても使用できる: >
54155415
mylist->len()
@@ -9373,14 +9373,16 @@ string({expr}) {expr}を文字列に変換して返す。{expr}が数値、浮
93739373
辞書 {key: value, key: value}
93749374
クラス クラス SomeName
93759375
オブジェクト オブジェクト SomeName {lnum: 1, col: 3}
9376+
列挙型 enum EnumName
9377+
列挙値 enum name.value {name: str, ordinal: nr}
93769378

93779379
リスト |List| や辞書 |Dictionary| に循環参照がある場合、それら
93789380
は "[...]" や "{...}" に置き換えられる。その結果に対して eval()
93799381
を使用すると失敗する。
93809382

9381-
オブジェクトに対しては、|string()| メソッドを呼び出してオブジェ
9383+
オブジェクトに対しては、string() メソッドを呼び出してオブジェ
93829384
クトのテキスト表現を取得する。メソッドが存在しない場合は、デ
9383-
フォルトの表現が用いられる。
9385+
フォルトの表現が用いられる。|object-string()|
93849386

93859387
|method| としても使用できる: >
93869388
mylist->string()
@@ -10207,6 +10209,8 @@ type({expr}) {expr}の型を示す数値を返す。
1020710209
クラス: 12 |v:t_class|
1020810210
オブジェクト: 13 |v:t_object|
1020910211
型エイリアス: 14 |v:t_typealias|
10212+
列挙型: 15 |v:t_enum|
10213+
列挙値: 16 |v:t_enumvalue|
1021010214
後方互換性のためには、次のような使い方ができる: >
1021110215
:if type(myvar) == type(0)
1021210216
:if type(myvar) == type("")

en/builtin.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 23
1+
*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 29
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2265,8 +2265,8 @@ empty({expr}) *empty()*
22652265
- A |Job| is empty when it failed to start.
22662266
- A |Channel| is empty when it is closed.
22672267
- A |Blob| is empty when its length is zero.
2268-
- An |Object| is empty, when the |empty()| builtin method in
2269-
the object (if present) returns true.
2268+
- An |Object| is empty, when the empty() method in the object
2269+
(if present) returns true. |object-empty()|
22702270

22712271
For a long |List| this is much faster than comparing the
22722272
length with zero.
@@ -5485,9 +5485,9 @@ len({expr}) The result is a Number, which is the length of the argument.
54855485
When {expr} is a |Blob| the number of bytes is returned.
54865486
When {expr} is a |Dictionary| the number of entries in the
54875487
|Dictionary| is returned.
5488-
When {expr} is an |Object|, invokes the |len()| method in the
5489-
object (if present) to get the length. Otherwise returns
5490-
zero.
5488+
When {expr} is an |Object|, invokes the len() method in the
5489+
object (if present) to get the length (|object-len()|).
5490+
Otherwise returns zero.
54915491

54925492
Can also be used as a |method|: >
54935493
mylist->len()
@@ -9598,14 +9598,16 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
95989598
Dictionary {key: value, key: value}
95999599
Class class SomeName
96009600
Object object of SomeName {lnum: 1, col: 3}
9601+
Enum enum EnumName
9602+
EnumValue enum name.value {name: str, ordinal: nr}
96019603

96029604
When a |List| or |Dictionary| has a recursive reference it is
96039605
replaced by "[...]" or "{...}". Using eval() on the result
96049606
will then fail.
96059607

9606-
For an object, invokes the |string()| method to get a textual
9608+
For an object, invokes the string() method to get a textual
96079609
representation of the object. If the method is not present,
9608-
then the default representation is used.
9610+
then the default representation is used. |object-string()|
96099611

96109612
Can also be used as a |method|: >
96119613
mylist->string()
@@ -10461,6 +10463,8 @@ type({expr}) The result is a Number representing the type of {expr}.
1046110463
Class: 12 |v:t_class|
1046210464
Object: 13 |v:t_object|
1046310465
Typealias: 14 |v:t_typealias|
10466+
Enum: 15 |v:t_enum|
10467+
EnumValue: 16 |v:t_enumvalue|
1046410468
For backward compatibility, this method can be used: >
1046510469
:if type(myvar) == type(0)
1046610470
:if type(myvar) == type("")

0 commit comments

Comments
 (0)