当前位置:网站首页>Basic data types in golang
Basic data types in golang
2022-07-04 09:16:00 【The diligent bird that flies first】
Note: matters needing attention
- Get the length of the object built in len() The length returned by the function can vary according to the byte length of different platforms .
- In practice , Slice or map The number of elements can be used int To express . When it comes to binary transmission 、 When reading and writing the structure description of a file , In order to keep the structure of the file unaffected by the byte length of different compiled target platforms , Do not use int and uint.
- Go Casting integers to Booleans... Is not allowed in the language .
- Boolean cannot participate in numeric operations , It can't be converted with other types .
- Go There are only casts in the language , There is no implicit type conversion . This syntax can only be used when mutual conversion is supported between two types .
- stay Go in , The essence of a character is an integer , When output directly , Is the character corresponding to UTF-8 The code value of the code .
边栏推荐
- Flutter tips: various fancy nesting of listview and pageview
- [untitled] forwarding least square method
- awk从入门到入土(4)用户自定义变量
- Awk from entry to earth (8) array
- What is uid? What is auth? What is a verifier?
- Awk from entry to earth (12) awk can also write scripts to replace the shell
- awk从入门到入土(6)正则匹配
- How to write unit test cases
- 2022-2028 global intelligent interactive tablet industry research and trend analysis report
- DR6018-CP01-wifi6-Qualcomm-IPQ6010-IPQ6018-FAMILY-2T2R-2.5G-ETH-port-CP01-802-11AX-MU-MIMO-OFDMA
猜你喜欢
LeetCode 74. Search 2D matrix
Horizon sunrise X3 PI (I) first boot details
Awk from entry to earth (12) awk can also write scripts to replace the shell
2022-2028 global elastic strain sensor industry research and trend analysis report
HMS core helps baby bus show high-quality children's digital content to global developers
【LeetCode 42】501. Mode in binary search tree
Sequence model
Markdown syntax
After unplugging the network cable, does the original TCP connection still exist?
保姆级JDEC增删改查练习
随机推荐
Markdown syntax
2022-2028 global strain gauge pressure sensor industry research and trend analysis report
Report on the development trend and prospect trend of high purity zinc antimonide market in the world and China Ⓕ 2022 ~ 2027
HMS core helps baby bus show high-quality children's digital content to global developers
swatch
After unplugging the network cable, does the original TCP connection still exist?
Implementation principle of redis string and sorted set
How to write unit test cases
Research and investment strategy report of China's electronic hydrogen peroxide industry (2022 Edition)
165 webmaster online toolbox website source code / hare online tool system v2.2.7 Chinese version
Flutter 小技巧之 ListView 和 PageView 的各种花式嵌套
How to batch change file extensions in win10
【LeetCode 42】501. Mode in binary search tree
26. Delete duplicates in the ordered array (fast and slow pointer de duplication)
awk从入门到入土(15)awk执行外部命令
China electronic grade sulfur trioxide Market Forecast and investment strategy report (2022 Edition)
1211 or chicken and rabbit in the same cage
《网络是怎么样连接的》读书笔记 - WEB服务端请求和响应(四)
Global and Chinese trisodium bicarbonate operation mode and future development forecast report Ⓢ 2022 ~ 2027
Codeforces Round #750 (Div. 2)(A,B,C,D,F1)