August 2018
Intermediate to advanced
404 pages
11h 19m
English
contract Test { function functionName() { // Do something }}
Create another function to accept input parameters. These parameters can be declared just like variables. The following example accepts two parameters of type uint:
contract Test { function add(uint _a, uint _b) public { // Do something }}
contract Test { function add(uint _a, uint _b) public pure returns (uint sum) { sum = _a + _b; } }