当前位置:网站首页>Go common compilation fails
Go common compilation fails
2022-07-02 06:55:00 【kq1983】
Example
1. Different types
var a int16 = 10;
var b int32 = 10;
if(a==b) { // Compile not pass
}
- 1.
- 2.
- 3.
- 4.
- 5.
2. Out of range
var c int8;
if(c==128) { // Transboundary Maximum 127
}
- 1.
- 2.
- 3.
- 4.
3. Add up 、 reduce 、 ride 、 except
var a1 int32 = 10;
var a2 int64 = 20;
var a3 int64 ;
a3 = a1+a2; // Different types
- 1.
- 2.
- 3.
- 4.
- 5.
invisible
if a:=18; a< 20 {
fmt.Printf(" a <20 \n")
}else{
fmt.Printf(" a >=20 \n")
}
// a The scope of if-else In block The following compilation fails
fmt.Printf(" a.value=%d \n",a)
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
边栏推荐
- JS delete the last bit of the string
- The use of regular expressions in JS
- DeprecationWarning: . ix is deprecated. Please use. loc for label based indexing or. iloc for positi
- SQLI-LABS通关(less15-less17)
- Pytest (3) parameterize
- PgSQL learning notes
- sqli-labs通关汇总-page4
- UEditor .Net版本任意文件上传漏洞复现
- Warp matrix functions in CUDA
- js判断数组中对象是否存在某个值
猜你喜欢
uniapp引入本地字体
Stack (linear structure)
蚂蚁集团g6初探
sqli-labs通关汇总-page2
No process runs when querying GPU, but the video memory is occupied
Cve-2015-1635 (ms15-034) Remote Code Execution Vulnerability recurrence
The win10 network icon disappears, and the network icon turns gray. Open the network and set the flash back to solve the problem
CVE-2015-1635(MS15-034 )遠程代碼執行漏洞複現
SQLI-LABS通关(less1)
ZZQ的博客目录--更新于20210601
随机推荐
The use of regular expressions in JS
Browser scrolling for more implementations
No process runs when querying GPU, but the video memory is occupied
Blog directory of zzq -- updated on 20210601
SQLI-LABS通关(less15-less17)
Dynamic global memory allocation and operation in CUDA
Recursion (maze problem, Queen 8 problem)
In depth study of JVM bottom layer (IV): class file structure
There is no way to drag the win10 desktop icon (you can select it, open it, delete it, create it, etc., but you can't drag it)
js判断对象是否为空
js中map和forEach的用法
PHP Session原理简析
JS to determine whether there is a value in the object in the array
Promise中有resolve和无resolve的代码执行顺序
Vscode installation, latex environment, parameter configuration, common problem solving
Solution to the black screen of win computer screenshot
A preliminary study on ant group G6
MySQL index
Self study table Au
Stack (linear structure)