2014-06-01から1ヶ月間の記事一覧
目次> 定数 letを使う let myConstant = 42 数値の場合、カンマの代わりに _ を区切り文字として入れてやることができる。 見やすい! let count = 3_000_000_000_000 変数 varを使う var myVariable = 42 myVariable = 50 letだと変更不可 let myConstant =…
目次 ログ 四則演算 変数・定数 配列 辞書 ループ 条件分岐 if switch 関数 プリミティブ 列挙 クロージャー クラス 継承 初期化 解放 プロパティ メソッド サブスクリプト 自動参照カウント(Automatic Reference Counting) オプショナル(Optional) パターン…
目次> これが基本か println("Hello, world") これでもいいのか NSLog("A switch changed its value: \(aSwitch).")