mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update frequently-asked-questions.rst
This commit is contained in:
parent
fad2d4df22
commit
543cc33681
@ -188,10 +188,19 @@ How do you represent double/float in Solidity?
|
||||
|
||||
This is not yet possible.
|
||||
|
||||
Is it possible to in-line initialize an array like so: string32[] myarray = ["a", "b"];
|
||||
Is it possible to in-line initialize an array like so: string[] myarray = ["a", "b"];
|
||||
=======================================================================================
|
||||
|
||||
This is not yet possible.
|
||||
Yes. However it should be noted that this currently only works with statically sized memory arrays. You can even create an inline memory
|
||||
array in the return statement. Pretty cool, huh?
|
||||
|
||||
Example::
|
||||
contract C {
|
||||
function f() returns (uint) {
|
||||
string[4] memory AdaArr = ["This", "is", "an", "array"];
|
||||
return ([1, 2, 3, 4][2]);
|
||||
}
|
||||
}
|
||||
|
||||
What are events and why do we need them?
|
||||
========================================
|
||||
|
Loading…
Reference in New Issue
Block a user