您好,登錄后才能下訂單哦!
有byte bytes1 bytes2 … bytes32
特殊的有byte == bytes1
后面的數(shù)字代表占了多少字節(jié)。1個字節(jié)在內(nèi)存中占了8位
固定字節(jié)數(shù)組不能修改長度和內(nèi)容
16進制中的1個數(shù)字代表占了4位。
1 | bytes1 public num1 = 0x6a; //轉換為10進制:106 |
1 | function getlength() view public returns(uint,uint,uint){ |
不同類型的字節(jié)也可以比較大小
1 | function test1() public view returns(bool){ |
1 | // 0110 1010 |
1 | pragma solidity ^0.4.23; |
本文鏈接: https://dreamerjonson.com/2018/11/14/solidity-9/
版權聲明: 本博客所有文章除特別聲明外,均采用 CC BY 4.0 CN協(xié)議 許可協(xié)議。轉載請注明出處!
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。