A boolean type represents the set of Boolean truth values denoted by the predeclared constants true and false. The predeclared boolean type is bool; it is a defined type.
ブール型は、事前に宣言された定数trueおよびfalseで示されるブール真理値のセットを表します。事前に宣言されたブール型はboolです。定義された型です。(by Google Translated.)
A string type represents the set of string values. A string value is a (possibly empty) sequence of bytes. The number of bytes is called the length of the string and is never negative. Strings are immutable: once created, it is impossible to change the contents of a string. The predeclared string type is string; it is a defined type.
The length of a string s can be discovered using the built-in function len. The length is a compile-time constant if the string is a constant. A string’s bytes can be accessed by integer indices 0 through len(s)-1. It is illegal to take the address of such an element; if s[i] is the i’th byte of a string, &s[i] is invalid.
文字列の長さsは、組み込み関数lenを使用して検出できます。文字列が定数の場合、長さはコンパイル時定数です。文字列のバイトには、0からlen(s)-1までの整数インデックスでアクセスできます。そのような要素のアドレスを取ることは違法です。 s [i]が文字列のi番目のバイトである場合、&s [i]は無効です。(by Google Translated.)
uint8 the set of all unsigned 8-bit integers (0 to 255)uint16 the set of all unsigned 16-bit integers (0 to 65535)uint32 the set of all unsigned 32-bit integers (0 to 4294967295)uint64 the set of all unsigned 64-bit integers (0 to 18446744073709551615)int8 the set of all signed 8-bit integers (-128 to 127)int16 the set of all signed 16-bit integers (-32768 to 32767)int32 the set of all signed 32-bit integers (-2147483648 to 2147483647)int64 the set of all signed 64-bit integers (-9223372036854775808 to 9223372036854775807)float32 the set of all IEEE-75432-bit floating-point numbersfloat64 the set of all IEEE-75464-bit floating-point numberscomplex64 the set of all complex numbers with float32 real and imaginary partscomplex128 the set of all complex numbers with float64 real and imaginary partsbyte alias foruint8rune alias forint32
コメント