contract {} is for wrapping ethereum contract.
uint is no plus/minus integer.
struct {} is for wrapping multiple-attribute data. E.g.,
struct Zombie {
string name;
uint dna;
}
private public should be put after function name. E.g.,
function _createZombie (string _name, uint _age) private {
}
- to return data of a function, use
returns and follow with (type). E.g.,
function _generateRandomDna(string _str) private view returns (uint) {
}
- Declare a variable with a type before the variable. E.g.,
uint age
- Declare a function with
function keyword. Parameter variable should start with _ E.g.,
function createZombie (string _name, uint _age) {
}
- Convention for private function is to name function with _ E.g.,
function _createZombie (string _name, uint _age) private {
}