Skip to content

Commit cdf48de

Browse files
author
Leo
authored
Merge pull request #12837 from aathan/patch-2
Rephrase comment about arrays of arrays in code example.
2 parents e27cb02 + f1a5bc7 commit cdf48de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/types/reference-types.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,10 @@ Array Members
379379
uint[2**20] aLotOfIntegers;
380380
// Note that the following is not a pair of dynamic arrays but a
381381
// dynamic array of pairs (i.e. of fixed size arrays of length two).
382-
// Because of that, T[] is always a dynamic array of T, even if T
383-
// itself is an array.
382+
// In Solidity, T[k] and T[] are always arrays with elements of type T,
383+
// even if T itself is an array.
384+
// Because of that, bool[2][] is a dynamic array of elements
385+
// that are bool[2]. This is different from other languages, like C.
384386
// Data location for all state variables is storage.
385387
bool[2][] pairsOfFlags;
386388

0 commit comments

Comments
 (0)