mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
docs: Newly allocated arrays are initialized with default values
This commit is contained in:
parent
259bf3f23a
commit
797554668c
@ -197,6 +197,9 @@ the ``.push`` member functions are not available).
|
|||||||
You either have to calculate the required size in advance
|
You either have to calculate the required size in advance
|
||||||
or create a new memory array and copy every element.
|
or create a new memory array and copy every element.
|
||||||
|
|
||||||
|
As all variables in Solidity, the elements of newly allocated arrays are always initialized
|
||||||
|
with the :ref:`default value<default-value>`.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
|
Loading…
Reference in New Issue
Block a user