当前位置:网站首页>Go basic anonymous variable
Go basic anonymous variable
2022-07-02 23:14:00 【Yi Yue Wang Chao】
go Anonymous variables are often used in ,go What are anonymous variables in , What's the usage? ?
Code :
package main import "fmt" func GetData() (int, int) { return 100, 200 } func main(){ a, _ := GetData() _, b := GetData() //c := GetData() // Report errors :assignment mismatch: 1 variable but GetData returns 2 values fmt.Println(a, b) }
Running results :
边栏推荐
- CDN 加速,需要域名先备案
- 程序员版本的八荣八耻~
- 高数有多难?AI 卷到数学圈,高数考试正确率 81%!
- Construction of Hisilicon 3559 universal platform: rotation operation on the captured YUV image
- Lambda表达式:一篇文章带你通透
- China Academy of information technology, Tsinghua University, Tencent security, cloud native security, industry university research and use strong alliance!
- QT qpprogressbar details
- golang中new与make的区别
- AES高級加密協議的動機闡述
- 密码技术---密钥和SSL/TLS
猜你喜欢
[adjustment] postgraduate enrollment of Northeast Petroleum University in 2022 (including adjustment)
实现BottomNavigationView和Navigation联动
golang入门:for...range修改切片中元素的值的另类方法
Lambda表达式:一篇文章带你通透
从底层结构开始学习FPGA----Xilinx ROM IP的定制与测试
景联文科技低价策略帮助AI企业降低模型训练成本
Mask R-CNN
Tiktok actual combat ~ number of likes pop-up box
数字图像处理实验目录
Chow-Liu Tree
随机推荐
Distributed monitoring system ZABBIX
Successfully changed Splunk default URL root path
Detailed explanation and application of merging and sorting
Arduino - 字符判断函数
Jericho's thimble reaction when directly touching the prototype is abnormal [chapter]
Construction of Hisilicon 3559 universal platform: draw a frame on the captured YUV image
Value sequence < detailed explanation of daily question >
STM32串口DAM接收253字节就死机原因排查
密码技术---密钥和SSL/TLS
Typical case of data annotation: how does jinglianwen technology help enterprises build data solutions
程序员版本的八荣八耻~
景联文科技低价策略帮助AI企业降低模型训练成本
ping域名报错unknown host,nslookup/systemd-resolve可以正常解析,ping公网地址通怎么解决?
C#中Linq用法汇集
[redis notes] compressed list (ziplist)
Talk about memory model and memory order
购买完域名之后能干什么事儿?
Ping domain name error unknown host, NSLOOKUP / system d-resolve can be resolved normally, how to Ping the public network address?
Call vs2015 with MATLAB to compile vs Project
Why does RTOS system use MPU?