{"blog_title":"eiji8pou's diary","url":"https://eiji8pou.hatenadiary.com/entry/20090823/1250982326","categories":["Lua"],"published":"2009-08-23 08:05:26","author_name":"eiji8pou","image_url":null,"author_url":"https://blog.hatena.ne.jp/eiji8pou/","width":"100%","height":"190","title":"\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u3092\u5168\u90e8\u3076\u3061\u307e\u3051\u308b\u69cb\u6587","version":"1.0","description":"Lua \u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\u3088\u308a\u3002 local t = {apples=\"\u6797\u6a8e\", banana=\"\u30d0\u30ca\u30ca\", grapes=\"\u30b0\u30ec\u30fc\u30d7\"} \u3053\u3046\u3044\u3046\u30c6\u30fc\u30d6\u30ebt\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3001\u305d\u306e\u4e2d\u8eab\u3092\u5168\u90e8\u51fa\u3059\u306b\u306f\u3002 \u305d\u306e\uff11\uff1a\u57fa\u672c for k, v in pairs(t) do hoge(k, v) end for\u3068pairs\u3092\u4f7f\u3063\u305f\u3054\u304f\u666e\u901a\u306e\u3084\u308a\u65b9\u3002 \u305d\u306e\uff12\uff1a\u5fdc\u7528 k, v = next(t) while k do hoge(k, v); k, v = next(t, k) end \u66f8\u304d\u63db\u3048\u3002next\u3092\u4f7f\u3046\u5229\u70b9\u306f\u3001\u305f\u3068\u3048\u3070\u30c6\u30ad\u30b9\u30c8\u3092\u6539\u884c\u3067\u533a\u5207\u3063\u3066\u30c6\u30fc\u30d6\u30eb\u306b\u3057\u305f\u7269\u3067\u3001\u8907\u6570\u306e\u884c\u3067\u3072\u3068\u3064\u306e\u30c7\u30fc\u30bf\u3092\u69cb\u6210\u3059\u308b\u5834\u5408\u306a\u3069\u306b\u3044\u3051\u2026","blog_url":"https://eiji8pou.hatenadiary.com/","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Feiji8pou.hatenadiary.com%2Fentry%2F20090823%2F1250982326\" title=\"\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u3092\u5168\u90e8\u3076\u3061\u307e\u3051\u308b\u69cb\u6587 - eiji8pou&#39;s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","type":"rich"}