Skip to main content
added 12 characters in body
Source Link
Jaime
  • 8.4k
  • 1
  • 12
  • 20

A few things were missing., but mainly, You need to use the keyword contract here is the example using your code:

pragma solidity ^0.4.23;

contract YourContractName {
    
    constructor(){
    }

    function processData(uint num) public pure returns (bool) {

        uint _number = num;
        if(num == _number) {
            return true;
        } else {
            return false;
        }
    }
}

Notice that this will always return true.

Hope it helps

A few things were missing. but mainly, You need to use the keyword contract here is the example using your code:

pragma solidity ^0.4.23;

contract YourContractName {
    
    constructor(){
    }

    function processData(uint num) returns (bool) {

        uint _number = num;
        if(num == _number) {
            return true;
        } else {
            return false;
        }
    }
}

Notice that this will always return true.

Hope it helps

A few things were missing, but mainly, You need to use the keyword contract here is the example using your code:

pragma solidity ^0.4.23;

contract YourContractName {
    
    constructor(){
    }

    function processData(uint num) public pure returns (bool) {

        uint _number = num;
        if(num == _number) {
            return true;
        } else {
            return false;
        }
    }
}

Notice that this will always return true.

Hope it helps

Source Link
Jaime
  • 8.4k
  • 1
  • 12
  • 20

A few things were missing. but mainly, You need to use the keyword contract here is the example using your code:

pragma solidity ^0.4.23;

contract YourContractName {
    
    constructor(){
    }

    function processData(uint num) returns (bool) {

        uint _number = num;
        if(num == _number) {
            return true;
        } else {
            return false;
        }
    }
}

Notice that this will always return true.

Hope it helps