|
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 |
D言語 > 基本型とリテラル
value.d
|
|
$ gdc value.d
$ ./a.out
true, 100, 1.000000, 10, A, string, 20
12345678, 10, 10, 32, 32
$
$ ./a.out
true, 100, 1.000000, 10, A, string, 20
12345678, 10, 10, 32, 32
$
| byte / ubyte | 1Byte | -128〜127 / 0〜255 |
| short / ushort | 2Byte | -32768〜32767 / 0〜65535 |
| int / uint | 4Byte | -2147483648〜2147483647 / 0〜4294967295 |
| long / ulong | 4Byte | -2147483648〜2147483647 / 0〜4294967295 |
| float / double | 4/8Byte | 浮動小数点数(有効桁数7桁 / 有効桁数16桁) |
| real | ハード依存 | |
| ifloat / idouble | float /double の虚数型 | |
| ireal | real の虚数型 | |
| cfloat | 2つのfloatで表現された複素数 | |
| cdouble | double の複素数 | |
| creal | real の複素数 | |
| char/wchar/dchar | 符号なし 8/16/32 bit | UTF-8/16/32文字 |
| [] | - | 配列 |
* 確認環境 Debian Linux(Wheezy)