I've been looking through the code of Etherdice and noticed that some variables are declared like
ParserResult memory result;
and I haven't found the keyword "memory" in any documentation. What I found on here was this explanation:
They are analogous to memory and hard drive storage in a computer. The contract can use any amount of memory (as long as it can pay for it of course) during executing its code, but when execution stops, the entire content of the memory is wiped, and the next execution will start fresh. The storage on the other hand is persisted into the blockchain itself, so the next time the contract executes some code, it has access too all the data it previously stored into its storage area.
Does the "memory" declaration actually make the value be stored in "memory"? Aren't all local variables inside a function stored just in memory and global variables always stored in the blockchain? And what is the relation to this explanation of "Memory" here?