|
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 |
Haskell > 基本型とリテラル
value.hs
|
|
$ runghc value.hs
True
100
1.0
'A'
"string"
[1,2,3]
("apple",300)
$
True
100
1.0
'A'
"string"
[1,2,3]
("apple",300)
$
| Bool | - | Bool型(TrueまたはFalse) |
| Char | - | Char型(Unicode) |
| String | - | 文字列型(Char型のリスト) |
| Int | - | 整数型(32bit機の場合4Byte) |
| Integer | - | 整数型(制限なし) |
| Float | - | 単精度浮動小数点数型 |
| Double | - | 倍精度浮動小数点数型 |
| [a] | - | リスト型 |
| (a,b) | - | タプル型(2要素以上であること) |
| () | - | ユニット型(0要素のタプル) |
* 確認環境 Debian Linux(Wheezy)