当前位置:网站首页>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 :
边栏推荐
- Makefile configuration of Hisilicon calling interface
- golang入门:for...range修改切片中元素的值的另类方法
- 数字图像处理实验目录
- Redis expiration policy +conf record
- MarkDown基本语法
- 20220524_ Database process_ Statement retention
- 从底层结构开始学习FPGA----Xilinx ROM IP的定制与测试
- 1px pixel compatibility of mobile terminal, 1px border
- Brief introduction of emotional dialogue recognition and generation
- Introduction to the latest plan of horizon in April 2022
猜你喜欢
随机推荐
Submit code process
Pytorch training CPU usage continues to grow (Bug)
Win11如何开启目视控制?Win11开启目视控制的方法
Troubleshooting the cause of the crash when STM32 serial port dam receives 253 bytes
在SOUI里使用真窗口时使用SOUI的滚动条
Generics and reflection, this is enough
RecyclerView结合ViewBinding的使用
C#中Linq用法汇集
BBR encounters cubic
STM32串口DAM接收253字节就死机原因排查
20220524_ Database process_ Statement retention
Lambda表达式:一篇文章带你通透
PotPlayer设置最小化的快捷键
QT qpprogressbar details
Pandora IOT development board learning (HAL Library) - Experiment 3 key input experiment (learning notes)
Xshell configuration xforward forwarding Firefox browser
Numerical solution of partial differential equations with MATLAB
Win11麦克风测试在哪里?Win11测试麦克风的方法
Simple square wave generating circuit [51 single chip microcomputer and 8253a]
Detailed explanation and application of merging and sorting


![[Yangcheng cup 2020] easyphp](/img/12/da28f738e50e625b0a66a94af3703d.png)







