From 0599a14954aa0c22c992ae4585010a97cce63ca1 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Thu, 24 Nov 2016 12:22:57 +0100 Subject: docs: cross-reference returning multiple values --- docs/control-structures.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/control-structures.rst') diff --git a/docs/control-structures.rst b/docs/control-structures.rst index 015e5526..4879a10e 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -42,6 +42,9 @@ write:: } The names of output parameters can be omitted. +The output values can also be specified using ``return`` statements. +The ``return`` statements are also capable of returning multiple +values, see :ref:`multi-return`. Return parameters are initialized to zero; if they are not explicitly set, they stay to be zero. @@ -66,6 +69,8 @@ Note that there is no type conversion from non-boolean to boolean types as there is in C and JavaScript, so ``if (1) { ... }`` is *not* valid Solidity. +.. _multi-return: + Returning Multiple Values ------------------------- -- cgit