solidity/test/libsolidity/semanticTests/enums/using_enums.sol
2020-03-19 14:42:25 +01:00

17 lines
302 B
Solidity

contract test {
enum ActionChoices {GoLeft, GoRight, GoStraight, Sit}
constructor() public {
choices = ActionChoices.GoStraight;
}
function getChoice() public returns (uint256 d) {
d = uint256(choices);
}
ActionChoices choices;
}
// ----
// getChoice() -> 2