|
Simple Sand Samples |
説明のないとってもシンプルなサンプルプログラム集
| COBOL | awk | C言語 | D言語 | GO言語 | Lua | Vim |
| bash | Perl | Gauche | Clojure | CLISP | EmacsLisp | VimScript |
| tcsh | Ruby | Groovy | Java | C# | VBScript | JavaScript |
| Io言語 | Python | Erlang | Scala | VB.NET | Excel/VBA | PHP |
| Tcl | Haskell | OCaml | PowerShell | Windows | Unix/Linux |
GO言語 > 基本型とリテラル
value.go
|
|
$ gccgo value.go
$ ./a.out
true, 100, 1.000000, string, 2
$
$ ./a.out
true, 100, 1.000000, string, 2
$
| uint8 1Byte | 0 〜 255 |
| uint16 2Byte | 0 〜 65535 |
| uint32 4Byte | 0 〜 4294967295 |
| uint64 8Byte | 0 〜 18446744073709551615 |
| int8 1Byte | -128 〜 127 |
| int16 2Byte | -32768 〜 32767 |
| int32 4Byte | -2147483648 〜 2147483647 |
| int64 8Byte | -9223372036854775808 〜 9223372036854775807 |
| float32 4Byte | 32bit浮動小数点数 |
| float64 8Byte | 64bit浮動小数点数 |
| complex64 | float32の複素数 |
| complex128 | float64の複素数 |
| byte | uint8のエイリアス |
| rune | int32のエイリアス |
| string | 文字列 |
| [] | 配列 |
* 確認環境 Debian Linux(Wheezy)