solidity base

历史

pragma solidity ^0.4.0;


contract Evidence{
    
     event getArrEvent(uint[] cc);
     event getLength(uint vvLength);
     
     function f() {
        //创建一个memory的数组
        uint[] memory a = new uint[](7);
        
        //不能修改长度
        //Error: Expression has to be an lvalue.
        //a.length = 100;
    }
    
    //storage
    uint[] b;
    
    function g(){
        b = new uint[](7);
        //可以修改storage的数组
        b.length = 10;
        b[9] = 100;
    }
    function v()returns (string ,uint){
        uint[3] memory vv = [uint(1),2,3];
        b = vv;
        getLength(b.push(4));
     return ("查看返回参数参数",b.push(4);
    }
  function getArr(){
      getArrEvent(b);
  }
   
}
pragma solidity ^0.4.0;
import "./Exteral0.sol";
import "./Exteral1.sol";
contract Exteral2 {


function useSetName(){

Exteral0 e = new Exteral0();
  
 Exteral0.SetName();



     

}
    function dddd() { 

    }

}

你可能感兴趣的:(solidity base)