Skip to content

Instantly share code, notes, and snippets.

@agoiabel
Last active March 31, 2020 15:22
Show Gist options
  • Save agoiabel/f0d36b6450457bf32dfeeaf5760d06fa to your computer and use it in GitHub Desktop.
Save agoiabel/f0d36b6450457bf32dfeeaf5760d06fa to your computer and use it in GitHub Desktop.
pragma solidity ^0.5.3;
contract ArraySolidity {
/** Visible external */
function functionExternal(uint[] calldata myArg) external returns(uint[] memory) {
uint[] memory newArray = new uint[](10);
newArray[0] = 1;
return newArray;
}
/** Visible public */
function functionPublic(uint[] memory myArg) public returns(uint[] memory) {
uint[] memory newArray = new uint[](10);
newArray[0] = 1;
return newArray;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment