其基本类型为几种大小的字符、整数和浮点数类型。
The fundamental types are characters, and integers and floating point Numbers of several sizes.
如果我想要得到真正的除法答案,我需要把他们之中的一个,变为浮点数类型。
If I wanted to get full, real division, I should make one of them a float.
像C语言一样,Go提供了一系列的基本类型,常见的布尔,整数和浮点数类型都具备。
Like C, Go offers a handful of primitive types. The usual Boolean, integer and floating-point types are available.
The reason I want to point this out to you is, if we go back up to the kinds of data objects we started with, floats, ints, strings, they actually behave the same way.
我要为大家指出这一点的原因是,如果我们想一下以前讲过的,数据类型的种类,浮点数,整数,字符串,它们实际上有相同的行为方式。
If I wanted to get full, real division, I should make one of them a float.
如果我想要得到真正的除法答案,我需要把他们之中的一个,变为浮点数类型。
Now, this is not the nicest way to do it but it'll work. I can look at the type of the value of base and compare it to the type of an actual float and see, are they the same?
这不是最好的办法但它确实有用,我可以得到底的值的类型然后,和一个真的浮点数的类型比比,看他们是不是一样?
应用推荐