1. 程式人生 > >ethereum(以太坊)(五)--Bool

ethereum(以太坊)(五)--Bool

-- there urn als const ant num pan bsp

pragma solidity ^0.4.0;

contract Bool{
    uint num1 = 100;
    uint num2 = 200;
    bool _c = true;
    
    // && ==
    function yuf() constant returns(bool){
        return num1 == num2 && _c; //false
    }
    
    // || !=
    function huof() constant returns(bool){
        return num1 != num2 || _c; //
true } }

ethereum(以太坊)(五)--Bool