Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
1b80bb85
Commit
1b80bb85
authored
Mar 14, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document "math first, then string conversion"
parent
fca8307d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
upgrading-5.1.rst
doc/sphinx/whats-new/upgrading-5.1.rst
+7
-4
No files found.
doc/sphinx/whats-new/upgrading-5.1.rst
View file @
1b80bb85
...
...
@@ -97,7 +97,10 @@ To summarize:
* If both operands of ``+`` or ``-`` are one of BYTES, DURATION, INT
or REAL, then the result has the same data type, with the obvious
numeric interpretation.
numeric interpretation. If such an expression is evaluated in a
context that expects a STRING (for example for assignment to a
header), then the arithmetic is done first, and the result it
converted to a STRING.
* INTs and REALs can be added or subtracted to yield a REAL.
...
...
@@ -106,9 +109,9 @@ To summarize:
* No other combinations of operand types are legal with ``-``.
*
If an expression with ``+`` is evaluated in a context where a STRING
is expected, then for all other combinations of operand data types,
the operands are
converted to STRINGs and concatenated.
*
When a ``+`` expression is evaluated in a STRING context, then for
all other combinations of operand data types, the operands are
converted to STRINGs and concatenated.
* If a STRING is not expected for the ``+`` expression, then no other
combination of data types is legal.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment