`clear variable` does not work ?
oxy
oxyopes at googlemail.com
Wed Jan 30 06:44:52 CST 2008
Hi friends,
i cannot clear a global variable with `clear` as in the example bellow:
%------------ start octave code -------------------
global x=[1 2 3];
function mmm
global x
printf("the value of x is %d \n", x)
clear x; global x
endfunction
mmm
clear x; global x % clears x outside mmm
x(1)=2;
mmm
%----------- end octave code -----------------
The second run of mmm should show only x(1),
since the others were cleared. But no, they aren't cleared.
The manual doesnt mention that. Any tip?
Thanks in advance ...
PS: i posted this question few weeks ago.
It is normally accepted to repeat a question once :-)
More information about the Help-octave
mailing list