CRYPTO NEWS

Zipmex gradually resuming Z Wallet withdrawals, says debt moratorium is not bankruptcy

The Asian cryptocurrency exchange was impacted by the Celsius and Babel Finance defaults but is working with investors to resolve the situation.

Parameter function in Solidity

I am a newbie in Solidity. Below is the snippet of code I came across :- pragma solidity ^0.4.0; contract C { //1 function f(uint len) { // value passed to len = 7 //2 uint[] memory a = new uint[](7); //3 bytes memory b = new bytes(len); //4 // Here we have a.length ==::Listen

I am a newbie in Solidity. Below is the snippet of code I came across :-

pragma solidity ^0.4.0; contract C {                                           //1     function f(uint len) {                 // value passed to len = 7          //2          uint[] memory a = new uint[](7);                                       //3         bytes memory b = new bytes(len);                                       //4     // Here we have a.length == 7 and b.length == len a[6] = 8;                     // 5     } } 

I am unable to understand why (7) is written after new uint[] in RHS of line 3. Moreover bytes is a data type of fixed length i.e bytes1 , then how did they created a new instance of it with length equal to len . At last what is meant by this b.length == len a[6] = 8 in line 5 .

Zipmex gradually resuming Z Wallet withdrawals, says debt moratorium is not bankruptcy

Shopping cart
There are no products in the cart!
Continue shopping
0