diff runtime/doc/eval.txt @ 10038:7cf4e210cf3c v7.4.2291

commit https://github.com/vim/vim/commit/04186095346daa60e82e981dad114de2b641d672 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 29 21:55:35 2016 +0200 patch 7.4.2291 Problem: printf() handles floats wrong when there is a sign. Solution: Fix placing the sign. Add tests. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Mon, 29 Aug 2016 22:00:07 +0200
parents 018fead968c1
children 43efa4f5a8ea
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*	For Vim version 7.4.  Last change: 2016 Aug 28
+*eval.txt*	For Vim version 7.4.  Last change: 2016 Aug 29
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -643,7 +643,7 @@ 2. Expression syntax					*expression-syn
 
 Expression syntax summary, from least to most significant:
 
-|expr1| expr2 ? expr1 : expr1	if-then-else
+|expr1|   expr2 ? expr1 : expr1	if-then-else
 
 |expr2|	expr3 || expr3 ..	logical OR
 
@@ -736,7 +736,9 @@ use in a variable such as "a:1".
 expr2 and expr3						*expr2* *expr3*
 ---------------
 
-					*expr-barbar* *expr-&&*
+expr3 || expr3 ..	logical OR		*expr-barbar*
+expr4 && expr4 ..	logical AND		*expr-&&*
+
 The "||" and "&&" operators take one argument on each side.  The arguments
 are (converted to) Numbers.  The result is:
 
@@ -1981,7 +1983,7 @@ assert_notmatch({pat}, {text} [, {msg}])
 assert_true({actual} [, {msg}])          none  assert {actual} is true
 asin({expr})			Float	arc sine of {expr}
 atan({expr})			Float	arc tangent of {expr}
-atan2({expr}, {expr})		Float	arc tangent of {expr1} / {expr2}
+atan2({expr1}, {expr2})		Float	arc tangent of {expr1} / {expr2}
 browse({save}, {title}, {initdir}, {default})
 				String	put up a file requester
 browsedir({title}, {initdir})	String	put up a directory requester
@@ -5905,9 +5907,10 @@ printf({fmt}, {expr1} ...)				*printf()*
 		  %X	hex number using upper case letters
 		  %o	octal number
 		  %08b	binary number padded with zeros to at least 8 chars
-		  %f	floating point number in the form 123.456
-		  %e	floating point number in the form 1.234e3
-		  %E	floating point number in the form 1.234E3
+		  %f	floating point number as 12.23, inf, -inf or nan
+		  %F	floating point number as 12.23, INF, -INF or NAN
+		  %e	floating point number as 1.23e3, inf, -inf or nan
+		  %E	floating point number as 1.23E3, INF, -INF or NAN
 		  %g	floating point number, as %f or %e depending on value
 		  %G	floating point number, as %f or %E depending on value
 		  %%	the % character itself
@@ -6039,8 +6042,9 @@ printf({fmt}, {expr1} ...)				*printf()*
 			digits after the decimal point.  When the precision is
 			zero the decimal point is omitted.  When the precision
 			is not specified 6 is used.  A really big number
-			(out of range or dividing by zero) results in "inf".
-			"0.0 / 0.0" results in "nan".
+			(out of range or dividing by zero) results in "inf"
+                        or "-inf" with %f (INF or -INF with %F).
+                        "0.0 / 0.0" results in "nan" with %f (NAN with %F).
 			Example: >
 				echo printf("%.2f", 12.115)
 <				12.12
@@ -7507,7 +7511,7 @@ system({expr} [, {input}])				*system()*
 
 		Pipes are not used, the 'shelltemp' option is not used.
 
-		When prepended by |:silent| the shell will not be set to
+		When prepended by |:silent| the terminal will not be set to
 		cooked mode.  This is meant to be used for commands that do
 		not need the user to type.  It avoids stray characters showing
 		up on the screen which require |CTRL-L| to remove. >