turnps / ethereum

0 stars 0 forks source link

solidity #1

Open turnps opened 6 years ago

turnps commented 6 years ago

pragma solidity ^0.4.0; contract TEST {

uint public x;
mapping(uint => string) public mp;
function setmp(){
    mp[123] = "hello mp";
}
function setx(uint a, uint b) returns(uint){
    x = plus(a,b);
    return x;
}
function plus(uint a, uint b) returns(uint){
    return a+b;
}
function RT()returns(uint, string){
    return(123,"hello world");
}

}

mbnsrwr commented 6 years ago

pragma solidity ^0.4.23; contract TEST {

uint public x; mapping(uint => string) public mp; function setmp() public { mp[123] = "hello mp"; } function setx(uint a, uint b) public returns(uint) { x = plus(a,b); return x; } function plus(uint a, uint b)public pure returns(uint) { return a+b; } function RT() public pure returns (uint, string){ return(123,"hello world"); } }