Skip to content

Instantly share code, notes, and snippets.

@agoiabel
Created March 31, 2020 14:05
Show Gist options
  • Save agoiabel/9a1f81490f14c457063246c3f4f95f3e to your computer and use it in GitHub Desktop.
Save agoiabel/9a1f81490f14c457063246c3f4f95f3e to your computer and use it in GitHub Desktop.
pragma solidity ^0.5.3;
contract MemoryArray {
/**
* These are temporary arrays and only exists when you are executing a function
* Must have a fixed size and must be declared inside a function
* You cannot run a for loop in a memory array
*/
function memoryArray() public {
uint[] memory newArray = new uint[](10);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment