diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-01 18:17:26 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-01 18:17:26 +0200 |
commit | 22fcfad29276bd5f317faf516637dcd491b96a12 (patch) | |
tree | 5787f5e2134b066406fd0d222c4f2f0d18e28024 /runtime | |
parent | 8767f52fbfd4f053ce00a978227c95f1d7d323fe (diff) | |
download | vim-git-22fcfad29276bd5f317faf516637dcd491b96a12.tar.gz |
patch 7.4.1976v7.4.1976
Problem: Number variables are not 64 bits while they could be.
Solution: Add the num64 feature. (Ken Takata)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 25 | ||||
-rw-r--r-- | runtime/doc/various.txt | 1 |
2 files changed, 20 insertions, 6 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 4d9df8936..8be5ee49a 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.4. Last change: 2016 Jun 06 +*eval.txt* For Vim version 7.4. Last change: 2016 Jul 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -40,6 +40,8 @@ done, the features in this document are not available. See |+eval| and There are nine types of variables: Number A 32 or 64 bit signed number. |expr-number| *Number* + 64-bit Number is available only when compiled with the + |+num64| feature. Examples: -123 0x10 0177 Float A floating point number. |floating-point-format| *Float* @@ -888,6 +890,11 @@ When dividing a Number by zero the result depends on the value: <0 / 0 = -0x7fffffff (like negative infinity) (before Vim 7.2 it was always 0x7fffffff) +When 64-bit Number support is enabled: + 0 / 0 = -0x8000000000000000 (like NaN for Float) + >0 / 0 = 0x7fffffffffffffff (like positive infinity) + <0 / 0 = -0x7fffffffffffffff (like negative infinity) + When the righthand side of '%' is zero, the result is 0. None of these work for |Funcref|s. @@ -3566,17 +3573,19 @@ float2nr({expr}) *float2nr()* decimal point. {expr} must evaluate to a |Float| or a Number. When the value of {expr} is out of range for a |Number| the - result is truncated to 0x7fffffff or -0x7fffffff. NaN results - in -0x80000000. + result is truncated to 0x7fffffff or -0x7fffffff (or when + 64-bit Number support is enabled, 0x7fffffffffffffff or + -0x7fffffffffffffff. NaN results in -0x80000000 (or when + 64-bit Number support is enabled, -0x8000000000000000). Examples: > echo float2nr(3.95) < 3 > echo float2nr(-23.45) < -23 > echo float2nr(1.0e100) -< 2147483647 > +< 2147483647 (or 9223372036854775807) > echo float2nr(-1.0e150) -< -2147483647 > +< -2147483647 (or -9223372036854775807) > echo float2nr(1.0e-100) < 0 {only available when compiled with the |+float| feature} @@ -7655,7 +7664,10 @@ winwidth({nr}) *winwidth()* :if winwidth(0) <= 50 : exe "normal 50\<C-W>|" :endif -< +< For getting the terminal or screen size, see the 'columns' + option. + + wordcount() *wordcount()* The result is a dictionary of byte/chars/word statistics for the current buffer. This is the same info as provided by @@ -7842,6 +7854,7 @@ multi_lang Compiled with support for multiple languages. mzscheme Compiled with MzScheme interface |mzscheme|. netbeans_enabled Compiled with support for |netbeans| and connected. netbeans_intg Compiled with support for |netbeans|. +num64 Compiled with 64-bit |Number| support. ole Compiled with OLE automation support for Win32. os2 OS/2 version of Vim. packages Compiled with |packages| support. diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 067ae6e6f..31f1a1bd7 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -390,6 +390,7 @@ N *+multi_lang* non-English language support |multi-lang| m *+mzscheme* Mzscheme interface |mzscheme| m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn| m *+netbeans_intg* |netbeans| + *+num64* 64-bit Number support |Number| m *+ole* Win32 GUI only: |ole-interface| N *+packages* Loading |packages| N *+path_extra* Up/downwards search in 'path' and 'tags' |