{"id":193,"date":"2017-05-28T01:57:59","date_gmt":"2017-05-27T16:57:59","guid":{"rendered":"https:\/\/do-gugan.com\/swift\/?p=193"},"modified":"2019-12-27T04:06:18","modified_gmt":"2019-12-26T19:06:18","slug":"%e9%96%a2%e6%95%b0-3-%e9%9b%86%e3%82%81%e3%81%a6%e3%80%81%e5%88%87%e3%82%8a%e6%9b%bf%e3%81%88%e3%81%a6%e3%80%81%e7%b9%b0%e3%82%8a%e8%bf%94%e3%81%99","status":"publish","type":"post","link":"https:\/\/do-gugan.com\/swift\/?p=193","title":{"rendered":"\u95a2\u6570 3. \u96c6\u3081\u3066\u3001\u5207\u308a\u66ff\u3048\u3066\u3001\u7e70\u308a\u8fd4\u3059"},"content":{"rendered":"<p>\u307e\u305a\u3001\u3053\u306e\u30b9\u30c6\u30fc\u30b8\u3092\u30d0\u30a4\u30c8\u541b\u304c\u30af\u30ea\u30a2\u3059\u308b\u624b\u9806\u3092\u3058\u3063\u304f\u308a\u8003\u3048\u307e\u3057\u3087\u3046\u3002\u56db\u89d2\u5f62\u306e\u30b9\u30c6\u30fc\u30b8\u3067\u305d\u308c\u305e\u308c\u306e\u8fba\u306e\u4e2d\u5fc3\u8fba\u308a\u306b\u5b9d\u77f3\u3068\u9589\u30b9\u30a4\u30c3\u30c1\u304c \u3042\u308b\u3068\u3044\u3046\u6cd5\u5247\u304c\u898b\u3048\u3066\u304f\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u306e\u5171\u901a\u90e8\u5206\u3092\u95a2\u6570\u306b\u3059\u308b\u3068\u3057\u305f\u3089\u3001<\/p>\n<pre class=\"lang:swift decode:true \">func genAndSwitch {\n    collectGem()   \/\/\u5b9d\u77f3\u3092\u53d6\u3063\u3066\u3001\n    moveForward()  \/\/\u4e00\u6b69\u9032\u307f\u3001\n    toggleSwitch() \/\/\u30b9\u30a4\u30c3\u30c1\u3092\u64cd\u4f5c\u3059\u308b\n}\n<\/pre>\n<p>\u306e\u3088\u3046\u306a\u95a2\u6570\u304c\u4f5c\u308c\u308b\u3067\u3057\u3087\u3046\u304b\u3002\u3055\u3089\u306b\u305d\u306e\u524d\u5f8c\u3082\u6bce\u56de\u540c\u3058\u30b3\u30de\u30f3\u30c9\u304c\u9023\u7d9a\u3057\u3066\u305f\u308a\u3059\u308b\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3053\u306e\u30b9\u30c6\u30fc\u30b8\u306f\u6b63\u65b9\u5f62\u3067\u306f\u306a\u3044\u306e\u3067\u3001\u77ed\u8fba\u90e8\u5206\u3068\u9577\u8fba\u90e8\u5206\u3067\u5c11\u3057\u3060\u3051\u51e6\u7406\u304c\u9055\u3063\u3066\u304d\u307e\u3059\u3002\u5b9d\u77f3\u3068\u30b9\u30a4\u30c3\u30c1\u306e\u524d\u5f8c\u3069\u3053\u307e\u3067\u3092\u95a2\u6570\u306b\u5165\u308c\u3066\u3001\u3069\u306e\u90e8\u5206\u306f\u672c\u7de8\u90e8\u5206\u3067\u500b\u5225\u306b\u30b3\u30de\u30f3\u30c9\u3092\u66f8\u304f\u304b\u898b\u6975\u3081\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3053\u3093\u306a\u89e3\u304d\u65b9\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:swift decode:true \">\/\/\u540c\u3058\u51e6\u7406\u5185\u5bb9\u3092pattern1\u3068\u3044\u3046\u540d\u524d\u3067\u95a2\u6570\u306b\u4ed5\u7acb\u3066\u308b\nfunc pattern1() {\n    moveForward()\n    collectGem()\n    moveForward()\n    toggleSwitch()\n    moveForward()\n}\n\n\/\/\u3053\u3053\u304b\u3089\u304c\u672c\u7de8\npattern1() \/\/\u4f5c\u3063\u305f\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\nturnLeft()\npattern1() \/\/\u4f5c\u3063\u305f\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\nmoveForward()\nturnLeft()\npattern1() \/\/\u4f5c\u3063\u305f\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\nturnLeft()\npattern1() \/\/\u4f5c\u3063\u305f\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\n<\/pre>\n<script type=\"text\/javascript\">amzn_assoc_ad_type =\"responsive_search_widget\"; amzn_assoc_tracking_id =\"doguganprojec-22\"; amzn_assoc_marketplace =\"amazon\"; amzn_assoc_region =\"JP\"; amzn_assoc_placement =\"\"; amzn_assoc_search_type = \"search_widget\";amzn_assoc_width =\"500\"; amzn_assoc_height =\"400\"; amzn_assoc_default_search_category =\"\"; amzn_assoc_default_search_key =\"iPad\";amzn_assoc_theme =\"light\"; amzn_assoc_bg_color =\"FFFFFF\"; <\/script><script src=\"\/\/z-fe.amazon-adsystem.com\/widgets\/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1&Marketplace=JP\"><\/script>","protected":false},"excerpt":{"rendered":"<p>\u307e\u305a\u3001\u3053\u306e\u30b9\u30c6\u30fc\u30b8\u3092\u30d0\u30a4\u30c8\u541b\u304c\u30af\u30ea\u30a2\u3059\u308b\u624b\u9806\u3092\u3058\u3063\u304f\u308a\u8003\u3048\u307e\u3057\u3087\u3046\u3002\u56db\u89d2\u5f62\u306e\u30b9\u30c6\u30fc\u30b8\u3067\u305d\u308c\u305e\u308c\u306e\u8fba\u306e\u4e2d\u5fc3\u8fba\u308a\u306b\u5b9d\u77f3\u3068\u9589\u30b9\u30a4\u30c3\u30c1\u304c \u3042\u308b\u3068\u3044\u3046\u6cd5\u5247\u304c\u898b\u3048\u3066\u304f\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u306e\u5171\u901a\u90e8\u5206\u3092\u95a2\u6570\u306b\u3059\u308b\u3068\u3057\u305f\u3089\u3001 func gen &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/do-gugan.com\/swift\/?p=193\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u95a2\u6570 3. \u96c6\u3081\u3066\u3001\u5207\u308a\u66ff\u3048\u3066\u3001\u7e70\u308a\u8fd4\u3059&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,2,6],"tags":[],"class_list":["post-193","post","type-post","status-publish","format-standard","hentry","category-swift51","category-learncode1","category-function"],"_links":{"self":[{"href":"https:\/\/do-gugan.com\/swift\/index.php?rest_route=\/wp\/v2\/posts\/193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/do-gugan.com\/swift\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/do-gugan.com\/swift\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/do-gugan.com\/swift\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/do-gugan.com\/swift\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=193"}],"version-history":[{"count":4,"href":"https:\/\/do-gugan.com\/swift\/index.php?rest_route=\/wp\/v2\/posts\/193\/revisions"}],"predecessor-version":[{"id":514,"href":"https:\/\/do-gugan.com\/swift\/index.php?rest_route=\/wp\/v2\/posts\/193\/revisions\/514"}],"wp:attachment":[{"href":"https:\/\/do-gugan.com\/swift\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/do-gugan.com\/swift\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/do-gugan.com\/swift\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}