Array member clarification (#13763)

* clarify array members

Co-authored-by: Kamil Śliwak <cameel2@gmail.com>
This commit is contained in:
Sabnock 2022-11-29 17:39:57 -06:00 committed by GitHub
parent d2dd84ad4b
commit dbc1bc1515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,9 +133,13 @@ It is possible to mark state variable arrays ``public`` and have Solidity create
The numeric index becomes a required parameter for the getter.
Accessing an array past its end causes a failing assertion. Methods ``.push()`` and ``.push(value)`` can be used
to append a new element at the end of the array, where ``.push()`` appends a zero-initialized element and returns
to append a new element at the end of a dynamically-sized array, where ``.push()`` appends a zero-initialized element and returns
a reference to it.
.. note::
Dynamically-sized arrays can only be resized in storage.
In memory, such arrays can be of arbitrary size but the size cannot be changed once an array is allocated.
.. index:: ! string, ! bytes
.. _strings: