cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
ErraticAttack
Level VI

JMP Expr() weirdness, can anyone explain?

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
10 REPLIES 10
hogi
Level XII

Re: JMP Expr() weirdness, can anyone explain?


@hogi wrote:

Concerning "solutions" for Insert Into with the special case of 2x the same type of expression:

  • Maybe there is a hidden option: flatten(0|1)?

 

 

Doesn't seem so ...
Here is the wish to get such an option: Insert Into: Flatten(0|1)