diff --git a/docs/control-structures.rst b/docs/control-structures.rst index 525ae5113..8169fb514 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -196,6 +196,7 @@ can still return a value to the caller by use of the ``return`` statement. } .. index:: ! literal suffix; suffix call syntax +.. _function-calls-suffix-calls: Suffix Calls ------------ @@ -231,6 +232,15 @@ first in order to obtain the two input values. See the section on :ref:`calling suffix functions` for more information on the limitations of this call syntax. +.. note:: + Suffix calls should not be confused with the application of :ref:`denomination suffixes`, + which use the same syntax, but simply modify the literal without an actual function call. + + There is only a limited number of denominations and their names cannot be used for literal + suffixes. + The only exceptions are ``finney`` and ``szabo``, which used to be denominations, but were + deprecated, and are now usable as identifiers. + .. index:: ! new, contracts;creating diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst index 936fb1b3b..139f6576e 100644 --- a/docs/units-and-global-variables.rst +++ b/docs/units-and-global-variables.rst @@ -5,12 +5,21 @@ Units and Globally Available Variables ************************************** +Solidity defines several *denominations*, which can be applied as suffixes to +:ref:`rational number literals` to modify the value while still keeping it a literal. + +.. note:: + Denominations should not be confused with :ref:`literal suffixes`, which use + the same syntax, but can be defined by the user and result in a + :ref:`function call`. + .. index:: ! wei, ! finney, ! szabo, ! gwei, ! ether, ! denomination;ether Ether Units =========== -A literal number can take a suffix of ``wei``, ``gwei`` or ``ether`` to specify a subdenomination of Ether, where Ether numbers without a postfix are assumed to be Wei. +A literal number can take a suffix of ``wei``, ``gwei`` or ``ether`` to specify a sub-denomination of +Ether, where Ether numbers without a postfix are assumed to be Wei. .. code-block:: solidity :force: @@ -19,7 +28,7 @@ A literal number can take a suffix of ``wei``, ``gwei`` or ``ether`` to specify assert(1 gwei == 1e9); assert(1 ether == 1e18); -The only effect of the subdenomination suffix is a multiplication by a power of ten. +The only effect of the sub-denomination suffix is a multiplication by a power of ten. .. note:: The denominations ``finney`` and ``szabo`` have been removed in version 0.7.0.