{"id":2979,"date":"2013-08-31T08:22:33","date_gmt":"2013-08-30T23:22:33","guid":{"rendered":"http:\/\/peta.okechan.net\/blog\/?p=2979"},"modified":"2013-08-31T08:22:33","modified_gmt":"2013-08-30T23:22:33","slug":"5-3-for%e3%83%ab%e3%83%bc%e3%83%97%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/peta.okechan.net\/blog\/archives\/2979","title":{"rendered":"5.3. for\u30eb\u30fc\u30d7\u5f0f"},"content":{"rendered":"<p><a href=\"https:\/\/peta.okechan.net\/blog\/archives\/2836\" title=\"LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\">LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u65e5\u672c\u8a9e\u8a33<\/a><br \/>\n\u7b2c5\u7ae0 \u4e07\u83ef\u93e1: \u8a00\u8a9e\u306e\u62e1\u5f35: \u5236\u5fa1\u30d5\u30ed\u30fc<br \/>\n<a href=\"http:\/\/llvm.org\/docs\/tutorial\/LangImpl05.html#for-loop-expression\" target=\"_blank\">\u7b2c3\u7bc0 for\u30eb\u30fc\u30d7\u5f0f<\/a><\/p>\n<p>\u4eca\u3068\u306a\u3063\u3066\u306f\u3001\u57fa\u672c\u7684\u306a\u5236\u5fa1\u30d5\u30ed\u30fc\u69cb\u9020\u3092\u8a00\u8a9e\u306b\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u3092\u6211\u3005\u306f\u77e5\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u3082\u3063\u3068\u30d1\u30ef\u30d5\u30eb\u306a\u3082\u306e\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3092\u6211\u3005\u306f\u6301\u3063\u3066\u3044\u308b\u4e8b\u306b\u306a\u308b\u3002<br \/>\n\u3088\u308a\u30a2\u30b0\u30ec\u30c3\u30b7\u30d6\u306a\u3082\u306e\u3067\u3042\u308bfor\u5f0f\u3092\u8ffd\u52a0\u3057\u3088\u3046\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">extern putchard(char)\r\ndef printstar(n)\r\n  for i = 1, i &lt; n, 1.0 in\r\n    putchard(42);  # ascii 42 = '*'\r\n\r\n# print 100 '*' characters\r\nprintstar(100);<\/pre>\n<p>\u3053\u306e\u5f0f\u306f\u3001\u65b0\u3057\u3044\u5909\u6570\uff08\u3053\u306e\u5834\u5408\u306fi\uff09\u3092\u5b9a\u7fa9\u3057\u3001\u3053\u306e\u5909\u6570\u3092\u3001\u6761\u4ef6\uff08\u3053\u306e\u5834\u5408\u306fi < n\uff09\u304ctrue\u306e\u9593\u3001\u6700\u521d\u306e\u5024\u304b\u3089\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3042\u308b\u30b9\u30c6\u30c3\u30d7\u5024\uff08\u3053\u306e\u5834\u5408\u306f1.0\uff09\u3067\u5897\u52a0\u3055\u305b\u3066\u3044\u304f\u3002\n\u30b9\u30c6\u30c3\u30d7\u5024\u304c\u7701\u7565\u3055\u308c\u305f\u30891.0\u3068\u307f\u306a\u3055\u308c\u308b\u3002\n\u30eb\u30fc\u30d7\u304ctrue\u306e\u9593\u3001\u672c\u4f53\u306e\u5f0f\u304c\u5b9f\u884c\u3055\u308c\u308b\u3002\n\u7279\u306b\u8fd4\u3059\u3079\u304d\u5024\u306f\u306a\u3044\u306e\u3067\u3001\u30eb\u30fc\u30d7\u306f\u5e38\u306b0.0\u3092\u8fd4\u3059\u3088\u3046\u306b\u5b9a\u7fa9\u3059\u308b\u3002\n\u3053\u306e\u5148\u306e\u7ae0\u3067\u5909\u66f4\u53ef\u80fd\u306a\u5909\u6570\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3089\u3001\u3053\u306efor\u30eb\u30fc\u30d7\u306f\u3082\u3063\u3068\u5b9f\u7528\u7684\u306b\u306a\u308b\u3060\u308d\u3046\u3002\n\n\u3053\u308c\u307e\u3067\u3069\u304a\u308a\u3001\u3053\u306efor\u30eb\u30fc\u30d7\u3092\u4e07\u83ef\u93e1\u3067\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u5909\u66f4\u306b\u3064\u3044\u3066\u8003\u3048\u3066\u307f\u3088\u3046\u3002\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p><a href=\"https:\/\/peta.okechan.net\/blog\/archives\/2836\" title=\"LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\">LLVM\u306b\u3088\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u5b9f\u88c5\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u65e5\u672c\u8a9e\u8a33<\/a><br \/>\n\u7b2c5\u7ae0 \u4e07\u83ef\u93e1: \u8a00\u8a9e\u306e\u62e1\u5f35: \u5236\u5fa1\u30d5\u30ed\u30fc<br \/>\n<a href=\"http:\/\/llvm.org\/docs\/tutorial\/LangImpl05.html#for-loop-expression\" target=\"_blank\">\u7b2c3\u7bc0 for\u30eb\u30fc\u30d7\u5f0f<\/a><\/p>\n<p>\u4eca\u3068\u306a\u3063\u3066\u306f\u3001\u57fa\u672c\u7684\u306a\u5236\u5fa1\u30d5\u30ed\u30fc\u69cb\u9020\u3092\u8a00\u8a9e\u306b\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u3092\u6211\u3005\u306f\u77e5\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u3082\u3063\u3068\u30d1\u30ef\u30d5\u30eb\u306a\u3082\u306e\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3092\u6211\u3005\u306f\u6301\u3063\u3066\u3044\u308b\u4e8b\u306b\u306a\u308b\u3002<br \/>\n\u3088\u308a\u30a2\u30b0\u30ec\u30c3\u30b7\u30d6\u306a\u3082\u306e\u3067\u3042\u308bfor\u5f0f\u3092\u8ffd\u52a0\u3057\u3088\u3046\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">extern putchard(char)\r\ndef printstar(n)\r\n  for i = 1, i &lt; n, 1.0 in\r\n    putchard(42);  # ascii 42 = '*'\r\n\r\n# print 100 '*' characters\r\nprintstar(100);<\/pre>\n<p>\u3053\u306e\u5f0f\u306f\u3001\u65b0\u3057\u3044\u5909\u6570\uff08\u3053\u306e\u5834\u5408\u306fi\uff09\u3092\u5b9a\u7fa9\u3057\u3001\u3053\u306e\u5909\u6570\u3092\u3001\u6761\u4ef6\uff08\u3053\u306e\u5834\u5408\u306fi < n\uff09\u304ctrue\u306e\u9593\u3001\u6700\u521d\u306e\u5024\u304b\u3089\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3042\u308b\u30b9\u30c6\u30c3\u30d7\u5024\uff08\u3053\u306e\u5834\u5408\u306f1.0\uff09\u3067\u5897\u52a0\u3055\u305b\u3066\u3044\u304f\u3002\n\u30b9\u30c6\u30c3\u30d7\u5024\u304c\u7701\u7565\u3055\u308c\u305f\u30891.0\u3068\u307f\u306a\u3055\u308c\u308b\u3002\n\u30eb\u30fc\u30d7\u304ctrue\u306e\u9593\u3001\u672c\u4f53\u306e\u5f0f\u304c\u5b9f\u884c\u3055\u308c\u308b\u3002\n\u7279\u306b\u8fd4\u3059\u3079\u304d\u5024\u306f\u306a\u3044\u306e\u3067\u3001\u30eb\u30fc\u30d7\u306f\u5e38\u306b0.0\u3092\u8fd4\u3059\u3088\u3046\u306b\u5b9a\u7fa9\u3059\u308b\u3002\n\u3053\u306e\u5148\u306e\u7ae0\u3067\u5909\u66f4\u53ef\u80fd\u306a\u5909\u6570\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3089\u3001\u3053\u306efor\u30eb\u30fc\u30d7\u306f\u3082\u3063\u3068\u5b9f\u7528\u7684\u306b\u306a\u308b\u3060\u308d\u3046\u3002\n\n\u3053\u308c\u307e\u3067\u3069\u304a\u308a\u3001\u3053\u306efor\u30eb\u30fc\u30d7\u3092\u4e07\u83ef\u93e1\u3067\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u5909\u66f4\u306b\u3064\u3044\u3066\u8003\u3048\u3066\u307f\u3088\u3046\u3002\n<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[466,467],"class_list":["post-2979","post","type-post","status-publish","format-standard","hentry","category-tech","tag-kaleidoscope","tag-llvm"],"_links":{"self":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/2979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/comments?post=2979"}],"version-history":[{"count":0,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/2979\/revisions"}],"wp:attachment":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/media?parent=2979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/categories?post=2979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/tags?post=2979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}