[master] d45e8a4ea Improve docs
Federico G. Schwindt
fgsch at lodoss.net
Sun Dec 2 20:23:08 UTC 2018
commit d45e8a4ea980fb8c7acc004111a5d05620023074
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Sun Dec 2 20:19:22 2018 +0000
Improve docs
Partially addresses #2846. I've avoided mentioning NULL on purpose as
it's not really meaningful nor accessible from VCL. ymmv.
diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index 84aadafb4..fbd9cde3f 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -93,7 +93,7 @@ Booleans can be either ``true`` or ``false``. In addition, in a boolean
context some data types will evaluate to ``true`` or ``false`` depending on
their value.
-String types will evaluate to ``false`` if they are empty; backend types
+String types will evaluate to ``false`` if they are not set; backend types
will evaluate to ``false`` if they don't have a backend assigned; integer
types will evaluate to ``false`` if their value is zero; duration types
will evaluate to ``false`` if their value is equal or less than zero.
@@ -138,18 +138,20 @@ include a fractional part, e.g. ``1.5s``. The supported units are:
``y``
years
+In string context they return a string with their value rounded to
+3 decimal places and excluding the unit, e.g. ``1.500``.
+
Integers
~~~~~~~~
Certain fields are integers, used as expected. In string context they
-return a string.
+return a string, e.g. ``1234``.
Real numbers
~~~~~~~~~~~~
-VCL understands real numbers. As with integers, when used in a string
-context they will return a string.
-
+VCL understands real numbers. In string context they return a string
+with their value rounded to 3 decimal places, e.g. ``3.142``.
Regular Expressions
-------------------
More information about the varnish-commit
mailing list