|
From: Thomas S. <t.s...@fz...> - 2008-03-29 10:38:32
|
> Dear listmembers,
> is there any means to delete a variable you are using in a script?
> Say, you have the variable
> L=<somevalue>
>
> at the beginning of a gnuplot - scriptfile. You reach the end of this file
> and
> you would like to say
>
> unset L (but this definitively does not work)
because 'set L=1' is no valid syntax, 'unset L' doesn't work either,
instead, it should be 'undefine L' or 'delete L' (which are not
existing up to now).
> is there any means to achieve this? The reason why I am asking is the
> feature
> of emacs-gnuplot mode and octave to keep an open gnuplot session. If you
> have
> some condition like
>
> if (exists (L)) <do something>
>
> in your script, this only works the very fist time you source the script,
> because from then on the variable is defined.
>
> Maybe someone has a workaround, I did not find one, maybe there's a way to
> delete the variable and I didn't find either.
there is code ('cleanup_udvlist()') in 'parse.c' which would delete a
user defined variable once the 'udv_undef' element of the variables
structure is set to TRUE.
in principle it should be possible to delete a variable, but only with some
modification of the source code.
--
View this message in context: http://www.nabble.com/Question-on-variables-tp16360322p16368564.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|