wipe command and Clearing variables

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
kesavapraba
Posts: 46
Joined: Mon Jan 22, 2018 1:38 am

wipe command and Clearing variables

Post by kesavapraba »

Dear Community
Is there any single command available in OpenSees to clear all variables which are defined previously? I know 'wipe' can clear memory and 'unset' command will delete variable. But, any other single command which can clear all variables? Like 'clearvars' in MATLAB. The problem is that, for example,i did the following script in OpenSees terminal:

set a 10;
10
puts $a;
10
wipe;
puts $a
10

The last puts command displays the variable value as 10. It means that the 'a' still exist in memory, right? I just need your help in getting any command which can clear off all. Thanks
Jhno
Posts: 214
Joined: Sat May 05, 2012 2:55 pm
Location: Laval

Re: wipe command and Clearing variables

Post by Jhno »

I am afraid not. See the discussion here about the same question and solution. In your case, keeping track of your variable in a list then using a loop with unset would appears the best approach.
http://computer-programming-forum.com/5 ... 071742.htm
GL
kesavapraba
Posts: 46
Joined: Mon Jan 22, 2018 1:38 am

Re: wipe command and Clearing variables

Post by kesavapraba »

Thanks a lot Mr. Jhno..It was useful.
Post Reply