有关Go语言的几个问题

I have a few questions about the Go programming language:

  1. How is the addition of int and float variables implemented in the language?
  2. is there a diffrence between the last question and the addition of int and float literals (for instance 3+2.1)?
  3. What are all the sequencers in the Go language?
  1. There aren't implicit type conversions; you will have to explicitly decide which sort of addition you want and convert one or both operands to the relevant type.
  2. You could answer this by simple experimentation.

    package main
    import "fmt"
    func main() {
        var i int = 3 + 2
        var f float = 3 + 2.1
        fmt.Printf("%d %f
    ", i, f)
    }
    

    If you try replacing the 2 with 2.1, the code does not compile.

  3. What do you mean by 'sequencers'?

For the answers to your questions read The Go Programming Language Specification.

For example, for the first two questions start by reading the sections on Numeric types, Arithmetic operators, and Conversions.

For the third question, start by reading the Statements sections and the section on Handling panics.

After close examination and help from colleagues I found an answer to the third question: Sequencers are a construct that varies the normal flow of control. particularly in go the sequencers are:

  1. goto
  2. Break
  3. continue
  4. return
  5. fallthrough
  6. go
  7. defer
  8. and panic (exception). Thanks all for the help.