reorganize examples into folder

This commit is contained in:
Manuel Araoz
2016-08-16 12:26:25 -03:00
parent 30c0600ac1
commit 71295a12a9
7 changed files with 3 additions and 3 deletions

View File

@ -0,0 +1,15 @@
// UNSAFE CODE, DO NOT USE!
contract BadFailEarly {
uint constant DEFAULT_SALARY = 50000;
mapping(string => uint) nameToSalary;
function getSalary(string name) constant returns (uint) {
if (bytes(name).length != 0 && nameToSalary[name] != 0) {
return nameToSalary[name];
} else {
return DEFAULT_SALARY;
}
}
}