以太坊智能合约之solidity语言

memeory 是值传递,storage是值引用,相当于指针;字符串修改需要先改为字节数组,然后修改特定的字节;

function modify (string storage name )internal

{

bytes(name)[0]='L';

}

constant 代表只读,如果函数不写入数据就可以再函数后面加入constant;selfdestruct是析构函数,用以去除销毁某个值

猜你喜欢

转载自blog.csdn.net/qq_37706228/article/details/81077725