You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example below, the type of [1, 2, 3] is uint8[3] memory, because the type of each of these constants is uint8. If you want the result to be a uint[3] memory type, you need to convert the first element to uint.
📝 Details(细节)
原文:因为在Solidity中,如果一个值没有指定type的话,默认就是最小单位的该type,这里 uint 的默认最小单位类型就是uint8。
勘误:unit的默认类型应该是uint256。int的默认类型是int256。
🔢 Reference(参考)
参考:https://docs.soliditylang.org/zh/latest/types.html#integers
ps.确认需要修复的话,可以提任务给我。
The text was updated successfully, but these errors were encountered: