views:

7

answers:

1

greetings and apologies if this is a repost (i searched this site, and i believe its not a repost, though)

I work with scilab, but during a project, scilab has to deal with a large number of variables. I was wondering if i can do the following

var_list = who_user();
for _var_ = var_list do
  if _var_ is global then
    writetofile(human_readablefile, _var_)
  end
end
clear()

of course this is a pseudocode, and i have a few questions before i implement it.

  1. I can not get var_list = who_user() working. so i believe the function does not return anything. I am reluctant to hack into the code of the "who_user" macro itself. Is there any other way to get the list of user variables in another varibale?

  2. Is there a way to find the global variables out of them?

  3. If not, then what are some memory manageement techniques in scilab?

Thanks a million for your time and help