diff options
author | chriseth <c@ethdev.com> | 2016-01-13 02:01:35 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-01-13 02:01:35 +0800 |
commit | 02c1aacd25652d39678005294ecbb6180a283134 (patch) | |
tree | ddf0a97043f479851c86341c5157cedde12921e0 /docs | |
parent | cff368fb7c4d39b8610cec8c42b1652c42971e3e (diff) | |
parent | c45593a44480f846302fdb652e23bd47988fba84 (diff) | |
download | dexon-solidity-02c1aacd25652d39678005294ecbb6180a283134.tar.gz dexon-solidity-02c1aacd25652d39678005294ecbb6180a283134.tar.zst dexon-solidity-02c1aacd25652d39678005294ecbb6180a283134.zip |
Merge pull request #345 from VoR0220/develop
Inline Arrays
Diffstat (limited to 'docs')
-rw-r--r-- | docs/frequently-asked-questions.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst index cf037131..f87b785d 100644 --- a/docs/frequently-asked-questions.rst +++ b/docs/frequently-asked-questions.rst @@ -317,7 +317,8 @@ by `msg.data`. Can state variables be initialized in-line? =========================================== -Yes, this is possible for most types (even for structs), but not for arrays. +Yes, this is possible for all types (even for structs). However, for arrays it +should be noted that you must declare them as static memory arrays. Examples:: @@ -325,6 +326,7 @@ Examples:: struct S { uint a; uint b; } S public x = S(1, 2); string name = "Ada"; + string[4] memory AdaArr = ["This", "is", "an", "array"]; } contract D { C c = new C(); |