Hi,
Andreas Granig wrote:
Hi,
Attached is a patch to allow evaluation of "+" and "-" operators in
set(...) when writing dsm files.
It's quite simple, but works fine with things like set($foo=$foo-1) or
set($foo=$bar+3) etc. It doesn't support multiple operators like
set($foo=$bar-3+17) at the moment though. Hope it's still useful. For me
for example, it allows to create "loops" with a configurable number of
iterations.
thanks! I have added it (plus checking for empty string - e.g. set(a=4+).
One problem is though, how to prevent this evaluation from happening -
if you really want to have the string "3+4" in the variable - with
your patch, you can't (with the 'set' function at least). so I am
wondering whether it is not better to add some eval() function. Also,
there is some (minor) performance penalty involved when you need to
search all strings for '+' or '-' in every "set".
Stefan
Andreas
------------------------------------------------------------------------
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev
--
Stefan Sayer
VoIP Services Consulting and Development
Warschauer Str. 24
10243 Berlin
tel:+491621366449
sip:[email protected]
email/xmpp:[email protected]
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev