mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			718 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			718 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract C {
 | 
						|
    function f() public returns (uint) {
 | 
						|
        return 2;
 | 
						|
    }
 | 
						|
    function g(uint x, uint y) public returns (uint) {
 | 
						|
        return x - y;
 | 
						|
    }
 | 
						|
    function h() public payable returns (uint) {
 | 
						|
        return f();
 | 
						|
    }
 | 
						|
    function i(bytes32 b) public returns (bytes32) {
 | 
						|
        return b;
 | 
						|
    }
 | 
						|
    function j(bool b) public returns (bool) {
 | 
						|
        return !b;
 | 
						|
    }
 | 
						|
    function k(bytes32 b) public returns (bytes32) {
 | 
						|
        return b;
 | 
						|
    }
 | 
						|
    function s() public returns (uint256) {
 | 
						|
        return msg.data.length;
 | 
						|
    }
 | 
						|
}
 | 
						|
// ----
 | 
						|
// f() -> 2
 | 
						|
// g(uint256,uint256): 1, -2 -> 3
 | 
						|
// h(), 1 ether -> 2
 | 
						|
// i() -> FAILURE
 | 
						|
// j(bool): true -> false
 | 
						|
// k(bytes32): 0x31 -> 0x31
 | 
						|
// s(): hex"4200ef" -> 7
 |