I would like to use [expr] for an "if, then, else" statement:
If $f3 > 0, then $f1 + $f2, else $f1 - $f2
In the help for [expr], I see the following:
[expr $f1; if ($f1 > 0, $f1 * 2, 0); if ($f1 <= 0, $f1 / 2, 0)]
So I try:
[expr $f1, $f2, $f3; if ($f3 > 0, $f1 + $f2, 0); if ($f3 < 0, $f1 - $f2, 0)]
but it doesn't create. I also tried without the final ",0" in each statement, and also this way:
[expr $f1, $f2, $f3; if ($f3 > 0, $f1 + $f2, $f1 - $f2)]
Can someone explain to me the proper syntax for this?
D.
ps... gotta love the fact I can copy/paste text in and out of objects etc these days!