This is mostly just a frustration post over the following inconsistency with inserting 'IF' expressions into an 'IF' expression. It is my understanding that programming languages should be nothing if not consistent (and I'm aware of many other JMP inconsistencies -- it's just that this one makes no sense to me at all).
/*
What I want is to generate an expression such as the one below programmatically. There of course is a straight-forward work around, I just don't like dealing with special cases especially when they make no sense.
Expr( If( a, If( b, c) ) )
*/
expr = Expr( If( a ) );
Insert Into( expr, Expr( If( b, c ) ) );
Show( Name Expr( expr ) );
/*
If( a, b, c)
*/
expr = Expr( not an If( a ) );
Insert Into( expr, Expr( If( b, c ) ) );
Show( Name Expr( expr ) );
/*
not an If( a, If( b, c) )
*/
If anyone has any insights, or especially if you know of a way to reliably insert any expression into any other expression (not by using 'Eval Insert' or strings), that would be great! Thanks!
Jordan