-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于第六讲 #688
Comments
这里的确表达有误,应该改为文档相应的部分 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. 欢迎提pr。 |
I will fix it. |
@flandre-crimson 大佬 问题已经修复 有空可以关闭一下issue 谢谢 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
📝 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: