pragma solidity ^0.4.18; contract example { } // // boolean : true, false // bool b1 = true; // // int : integer // int i1 = 0; // int i2; // // uint : unsigned integer // uint u1 = 0; // // string : similar to bytes // string s1 = "abc"; // // state variable : data permanently stored on the blockchain. // int stateVariable = 0; // function example() public view returns (address) { // // local variable : data that exists only within a function // uint localVariable = 0; // localVariable += 1; // /* // global variable : it is data from a blockchain or contract, // and can be retrieved from anywhere. // */ // return msg.sender; // } // // state variable // int intExample = 0; // /* // example1 is a function to access a state // variable and change its value. // */ // function example1() public { // intExample = intExample + 1; // } // /* // example2 is a function that receives a string // as an argument and returns it back. // */ // function example2(string _string) public pure returns (string) { // return _string; // } // }
0.4.18