aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-01-13 02:01:35 +0800
committerchriseth <c@ethdev.com>2016-01-13 02:01:35 +0800
commit02c1aacd25652d39678005294ecbb6180a283134 (patch)
treeddf0a97043f479851c86341c5157cedde12921e0 /docs
parentcff368fb7c4d39b8610cec8c42b1652c42971e3e (diff)
parentc45593a44480f846302fdb652e23bd47988fba84 (diff)
downloaddexon-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.rst4
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();