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:
Syntax diagram for function definition
As shown in the preceding syntax diagram, a function can return multiple values using the returns(value0, value1, ... , valueN) syntax.
...