diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-08-24 16:48:05 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-08-24 17:02:05 -0400 |
commit | 1dc088ea7dff8921d5580078f31a3a660ee16dc0 (patch) | |
tree | 9b7d45b5757c28db187d38e08da88ee79440eb2f /runtime | |
parent | 01b5499eea24961f0163b0ca3728c649aad53bbf (diff) | |
download | rneovim-1dc088ea7dff8921d5580078f31a3a660ee16dc0.tar.gz rneovim-1dc088ea7dff8921d5580078f31a3a660ee16dc0.tar.bz2 rneovim-1dc088ea7dff8921d5580078f31a3a660ee16dc0.zip |
vim-patch:8.1.1111: it is not easy to check for infinity
Problem: It is not easy to check for infinity.
Solution: Add isinf(). (Ozaki Kiichi, closes vim/vim#3787)
https://github.com/vim/vim/commit/fda1bff39f89775b20a2d88ef3903656d52f66ad
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 811dbad559..eac1493a7a 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2189,6 +2189,8 @@ insert({list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}] invert({expr}) Number bitwise invert isdirectory({directory}) Number |TRUE| if {directory} is a directory +isinf({expr}) Number determine if {expr} is infinity value + (positive or negative) islocked({expr}) Number |TRUE| if {expr} is locked isnan({expr}) Number |TRUE| if {expr} is NaN id({expr}) String identifier of the container @@ -5285,6 +5287,14 @@ isdirectory({directory}) *isdirectory()* exist, or isn't a directory, the result is |FALSE|. {directory} is any expression, which is used as a String. +isinf({expr}) *isinf()* + Return 1 if {expr} is a positive infinity, or -1 a negative + infinity, otherwise 0. > + :echo isinf(1.0 / 0.0) +< 1 > + :echo isinf(-1.0 / 0.0) +< -1 + islocked({expr}) *islocked()* *E786* The result is a Number, which is |TRUE| when {expr} is the name of a locked variable. |