From dbc1bc1515727bbaa491c21766320033da1ba261 Mon Sep 17 00:00:00 2001 From: Sabnock <24715302+Sabnock01@users.noreply.github.com> Date: Tue, 29 Nov 2022 17:39:57 -0600 Subject: [PATCH] Array member clarification (#13763) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * clarify array members Co-authored-by: Kamil ƚliwak --- docs/types/reference-types.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/types/reference-types.rst b/docs/types/reference-types.rst index a6b5728c9..6a7667b6b 100644 --- a/docs/types/reference-types.rst +++ b/docs/types/reference-types.rst @@ -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: