Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
テーブル内のテーブルであるデータを取得するにはどうすればよいですか?つまり、次のようになります。
t = { {a, b, c}, {d, e, f} };
このコード行を書くと:
print( t[1] )
結果は次のようになります->>>{a、b、c}
しかし
文字「a」だけを印刷するにはどうすればよいですか?使用せずipairsに私は意味のようなものを使用する方法はありますt[1]か?
ipairs
t[1]
試しましたt[1][1]か?これにより、取得したテーブルの最初のインデックスが取得されますt[1]
t[1][1]