// Indicates the Solidity version miners should run the code with // The ^ sign means it shouldn't run on version 0.5.0 or above pragma solidity ^0.4.16; // Smart Contract Decleration // This creates a new contract named EmptyContract contract BasicContract { // Global Variable Declaration // uint - The type of the declared variable // myInt - the name for the declared variable uint myInt; // Function Decleration // function - The 'function' keyword is used to declare a new function // myFunction - The name for the declared function // uint _someInt - An input the function expects to receive which // will be stored in a uint typed variable named _someVar // // The () should contain a list of all the function required inputs // public - Indecates where the function can be accessed from function set(uint _someInt) public { // Assigns the received input's value as the new // value for the global variable named myInt myInt = _someInt; } // Function Decleration // function - The 'function' keyword is used to declare a new function // myFunction - The name for the declared function // returns (uint) - Indicates the function returns // an output with a type of uint // public - Indecates where the function can be accessed from function get() public returns (uint) { return myInt; } }
0.4.20