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

placeholder for the last returned value

In Mathematica, one can use "%" as a placeholder for the last returned value.

hogi_0-1668342422218.png

 

Is there something similar in JMP?

Then one could use the fact that a reference to an object is returned by the function which creates the object.

Could help during debugging:

Run single lines of the original code, add some test code and get a quick reference to a created object via the placeholder.

 

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Graph Builder(
	Size( 437, 413 ),
	Graph Spacing( 4 ),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
);
// during debugging:
gb = %;(gb << XPath( "//AxisBox" )) << select;

// or even better: gb << get XML(); New Window("xml", %)

 

3 REPLIES 3
Craige_Hales
Super User

Re: placeholder for the last returned value

No, there is no way to retrieve the value. You could move the "gb =" to just before the "dt<<GraphBuilder" to capture it.

 

Craige
hogi
Level XII

Re: placeholder for the last returned value

I posted a wish :
https://community.jmp.com/t5/JMP-Wish-List/JSL-debugging-placeholder-for-last-returned-value/idi-p/5...

and added another example in the code above.

 

Let's see if other users are also interested ...

sure: If you had this comfort in Mathematica, you kind of miss it in JMP.
Could be that you don't miss it if you didn't have it

 

pauldeen
Level VI

Re: placeholder for the last returned value

Interesting idea, I kudo'd your wish list item.

I usually work around the absence of this by nesting more things into each other...but it can become difficult to read:

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt << Graph Builder(
	Size( 437, 413 ),
	Graph Spacing( 4 ),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
);
CapturedXML = gb << XPath( "//AxisBox" )[1] << get xml; //Like so