I would like to enter something like the following pseudocode in PD:
if ($f1<$f3) {
  output (0);
} else {
  if($f1-$f3<=$f2) {
    output (($f1-$f3)/$f2);
  } else {
    output(1.0);
  }
}
So, I've tried to enter this expr if construction:
[ expr if ($f1<$f3, 0, if( ($f1-$f3<=$f2, ($f1-$f3)/$f2, 1.0) )) ]
However, PD will not accept this, and it returns:
expr: syntax error: illegal comma
,
(
$f1 
-
$f3 
) 
/
$f2 
,
1.000000 
expr: syntax error
 expr if ($f1<$f3 , 0 , if( ($f1-$f3<=$f2 , ($f1-$f3)/$f2 , 1.0) ))
... couldn't create
Is there a syntax where I can use nested "if"s in an [expr] object?
 
					 
									