mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Move FAQ point to input and output parameters and polish surrounding text
Update docs/control-structures.rst Co-Authored-By: ChrisChinchilla <chriswhward@gmail.com> Remove line with no further details. Fix tabs Remove FAQ item
This commit is contained in:
parent
2e861bf1a0
commit
58181e8df9
@ -30,6 +30,16 @@ with two integers, you would use something like::
|
|||||||
|
|
||||||
Function parameters can be used as any other local variable and they can also be assigned to.
|
Function parameters can be used as any other local variable and they can also be assigned to.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
An :ref:`external function<external-function-calls>` cannot accept a
|
||||||
|
multi-dimensional array as an input
|
||||||
|
parameter. This functionality is possible if you enable the new
|
||||||
|
experimental ``ABIEncoderV2`` feature by adding ``pragma experimental ABIEncoderV2;`` to your source file.
|
||||||
|
|
||||||
|
An :ref:`internal function<external-function-calls>` can accept a
|
||||||
|
multi-dimensional array without enabling the feature.
|
||||||
|
|
||||||
.. index:: return array, return string, array, string, array of strings, dynamic array, variably sized array, return struct, struct
|
.. index:: return array, return string, array, string, array of strings, dynamic array, variably sized array, return struct, struct
|
||||||
|
|
||||||
Return Variables
|
Return Variables
|
||||||
@ -56,7 +66,7 @@ two integers passed as function parameters, then you use something like::
|
|||||||
|
|
||||||
The names of return variables can be omitted.
|
The names of return variables can be omitted.
|
||||||
Return variables can be used as any other local variable and they
|
Return variables can be used as any other local variable and they
|
||||||
are zero-initialized. If they are not explicitly
|
are initialized with their :ref:`default value <default-value>` and have that value unless explicitly set.
|
||||||
set, they stay zero value.
|
set, they stay zero value.
|
||||||
|
|
||||||
You can either explicitly assign to return variables and
|
You can either explicitly assign to return variables and
|
||||||
@ -122,6 +132,8 @@ the same as the number of return types.
|
|||||||
Function Calls
|
Function Calls
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
.. _internal-function-calls:
|
||||||
|
|
||||||
Internal Function Calls
|
Internal Function Calls
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
@ -143,6 +155,8 @@ contract can be called internally.
|
|||||||
You should still avoid excessive recursion, as every internal function call
|
You should still avoid excessive recursion, as every internal function call
|
||||||
uses up at least one stack slot and there are at most 1024 slots available.
|
uses up at least one stack slot and there are at most 1024 slots available.
|
||||||
|
|
||||||
|
.. _external-function-calls:
|
||||||
|
|
||||||
External Function Calls
|
External Function Calls
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
@ -307,11 +307,6 @@ to create an independent copy of the storage value in memory.
|
|||||||
On the other hand, ``h(x)`` successfully modifies ``x`` because only
|
On the other hand, ``h(x)`` successfully modifies ``x`` because only
|
||||||
a reference and not a copy is passed.
|
a reference and not a copy is passed.
|
||||||
|
|
||||||
Is it possible to return an array of strings (``string[]``) from a Solidity function?
|
|
||||||
=====================================================================================
|
|
||||||
|
|
||||||
Only when ``pragma experimental "ABIEncoderV2";`` is used.
|
|
||||||
|
|
||||||
What does the following strange check do in the Custom Token contract?
|
What does the following strange check do in the Custom Token contract?
|
||||||
======================================================================
|
======================================================================
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user