I executed a call checkConstant("ein schnitzel") on the following contract, and it worked. Obviously, type coercion but the documentation doesn't tell. How does this happen in detail?

contract X{
uint a=12+1 ether;

function checkConstant(uint conversionRate) constant returns(uint integer, uint decimal){

    integer= a / conversionRate;
    decimal= a % conversionRate;



uint256 integer: 3401924395
uint256 decimal: 243843967
  • What generates the 'output' you quoted? Clearly not just the code you pasted. – Nick Johnson Sep 13 '16 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.