Original link: https://v3u.cn/a_id_224
The book is connected to the last chapter. The first program of Golang 1.18 runs like a melodious flute, marking the official start of the Golang giant ship of concurrent programming. So, on this giant ship, what should we do first? Of course, you need to understand the most basic syntax, that is, the declaration and use of basic variables. What is the difference between the declaration of variables and the use of variables? is the name of the memory address after the specific data is stored in memory. To put it bluntly, it is the house number in memory. There are many ways to declare variables in golang. They are relatively strict: packagemain//declare the main package importf “fmt”//import the fmt package, you need to use funcmain(){ //Declare main main function entry//Declare variable varnameintname=1f.Println(name…
This article is reprinted from: https://v3u.cn/a_id_224
This site is for inclusion only, and the copyright belongs to the original author.