August 2018
Intermediate to advanced
404 pages
11h 19m
English
pragma solidity ^0.4.23;contract test { function isValid(uint input) public pure returns (bool) { if (input > 10) { return true; } else { return false; } }}
Solidity doesn't support type conversion from Boolean to non-Boolean types as in other languages like JavaScript. So, if(1) { } is not a valid condition in solidity.
pragma solidity ^0.4.23;contract test { function ...