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.
Luaのオブジェクト参照で変数を使用することは可能ですか? たとえば、a.Value は文字列で、a.Value = "b" です。abcd または a.(a.Value).cd にアクセスしたいのですが、どうすればよいですか?
構文a.bは、実際には の省略形ですa["b"]。必要なことを行うには、次のように、を取り除き、"b"代わりに変数を使用します。
a.b
a["b"]
"b"
a[a.Value].c.d