How can one delete all variables currently in memory in KDB/q?
Instead of listing variables manually (I have many of them) like so:
delete a,b,c from `.
I would like to do something like these (the commands below do not work):
delete (system "v") from `.
{delete x from `.} each system "v"
Thank you for your help!
CodePudding user response:
You can use functional form to accomplish this:
q)a:1
q)b:2
q){![`.;();0b;enlist x]}@'system"v"
`.`.
q)a
'a
[0] a
CodePudding user response:
Simple solution:
delete from `.