Merge pull request #345 from VoR0220/develop

Inline Arrays
This commit is contained in:
chriseth
2016-01-12 19:01:35 +01:00
5 changed files with 294 additions and 31 deletions
+3 -1
View File
@@ -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();