I am a beginner trying to run the following code on remix.ethereum.org
pragma solidity ^0.4.19;
function processData(uint num) returns (bool) {
uint _number = num;
if(num == _number)
{
return true;
}
else
{
return false;
}
}
But i am getting the Error
browser/code1.sol:2:1: ParserError: Expected pragma, import directive or contract/interface/library definition.
function processData(uint num) returns (bool) {
^
How can i get past this Error?
Secondly, even if I ignore the above Error, the code is expected to have one of the following Errors that I want to catch but apparently the code seems to not have any of the following Errors. Do you agree?
- Unmatched Recursion
- Missing parenthesis
- Incompatible types
- Wrong typecasting
- Undeclared variable or function
- Missing semicolon
- Wrong Use of if conditional