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.
ローカルスコープで変数を表示する値を取得するにはどうすればよいですか? 例えば:
a:2; func:{ a:1; value "a" }
2 を返します
value常にグローバル スコープで動作します。
value
これが本当に必要な場合は、ワークスペース変数を使用すること.a.b:1もできます。
.a.b:1
「値」の代わりに他の関数を使用できます。1 つのオプションは「eval」関数です。
q)a:2; q) func:{ a:1; eval a} q) func[] q) 1