August 2019
Intermediate to advanced
486 pages
13h 52m
English
Solidity functions take arguments and can return multiple return values. The function definitions start with the function keyword. Every function should have its visibility specified. If this is not defined in version 0.4.25, it will default to public visibility. In Solidity version 0.5.0, you must have visibility defined for a function; otherwise, you will get compilation errors.
The syntax that's used to define a function definition is as follows:
function functionName(<parameter types>) {internal|external|public|private} [pure|view|payable] [returns (<return types>)]
The following is the syntax diagram for defining a function:
As shown in the preceding syntax ...