{"categories":["lua"],"height":"190","title":" lua \u306e\u914d\u5217\u306e\u30eb\u30fc\u30d7\u306b\u95a2\u3059\u308b\u30e1\u30e2","version":"1.0","type":"rich","url":"https://takuya-1st.hatenablog.jp/entry/2024/01/17/000000","blog_url":"https://takuya-1st.hatenablog.jp/","published":"2024-01-17 00:00:00","description":"\u914d\u5217\u306e\u5b9a\u7fa9\u3068\u30eb\u30fc\u30d7 local t = {} table.insert(t, \"a\") table.insert(t, \"b\") print(t[1]) for key,entry in pairs(t) do print(string.format(\"%s=>%s\", key, entry )) end \u5b9f\u884c\u7d50\u679c a 1=>a 2=>b \u30dd\u30a4\u30f3\u30c8 local x\u3067\u5909\u6570\u5b9a\u7fa9 \u914d\u5217\u306f\u30c6\u30fc\u30d6\u30eb\u3067{}\u3067\u5b9a\u7fa9\u3002php \u306e\u914d\u5217\u304c\u8fd1\u3044 \u6dfb\u5b57\u306f[\uff11]\u304b\u3089 for \u30eb\u30fc\u30d7\u3068 pairs \u3092\u4e00\u7dd2\u306b\u4f7f\u3046 printf \u306e\u304b\u308f\u308a\u306b\u3001string.format \u914d\u5217\u306e\u6dfb\u5b57\u306f\uff11\u304b\u3089\u59cb\u307e\u308a\u307e\u3059\u3002[0]\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002t[\u2026","author_name":"takuya_1st","author_url":"https://blog.hatena.ne.jp/takuya_1st/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F2024%2F01%2F17%2F000000\" title=\" lua \u306e\u914d\u5217\u306e\u30eb\u30fc\u30d7\u306b\u95a2\u3059\u308b\u30e1\u30e2 - \u305d\u308c\u30de\u30b0\u3067\uff01\" 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","provider_url":"https://hatena.blog","blog_title":"\u305d\u308c\u30de\u30b0\u3067\uff01","width":"100%","image_url":null}