Skip to content
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

go阅读基础数据类型,复合数据类型,函数,方法这四章的学习笔记 | haogui #15

Open
whg001 opened this issue Nov 28, 2021 · 0 comments

Comments

@whg001
Copy link
Owner

whg001 commented Nov 28, 2021

https://whg001.github.io/post/go-yue-du-ji-chu-shu-ju-lei-xing-fu-he-shu-ju-lei-xing-han-shu-fang-fa-zhe-si-zhang-de-xue-xi-bi-ji/

数据类型
在Go语言中,%取模运算符的符号和被取模数的符号总是一致的,因此-5%3和-5%-3结果都是-2。除法运算符/的行为则依赖于操作数是否全为整数,比如5.0/4.0的结果是1.25,但是5/4的结果是1,因为整数除法会向着0方向截断...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant