Choose Language Hide Translation Bar
Highlighted
Stokes
Level III

Why Expr() not working occasionally?

Hi, I am using Expr() function to quote a long jsl time to time, some time it works, some time it doesn't work.

 

For instance,

I set a VG plot as below,

 

VG= Expr(New Window( "Variability Chart",
V List Box(
Variability Chart(....)));

 

When I run

VG;

It is not working or responding.

Is there any rule of Expr() ?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
gzmorgan0
Super User

Re: Why Expr() not working occasionally?

@Stokes ,

 

I expect you have syntax errors.

 

Note I like to make a reference to the expression (vgExpr) and create a handle/reference to the report (VG).

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );


vgExpr = Expr( New Window("Variability Chart",
	   VListBox(
	   	  VG = Variability Chart(
			Y( :height, :weight ),
			X( :age, :sex )
		)//end Var Chart
	) //end VListBox 	
  )  //end new window
 ); //end Expr
 
 vgExpr;
 
 VG << 	Std Dev Chart( 0 );
 report(VG[1])[FrameBox(1)] << {Row Legend(
				sex,
				Color( 1 ),
				Color Theme( "JMP Default" ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)};
 report(VG[2])[FrameBox(1)] << {Row Legend(
				sex,
				Color( 1 ),
				Color Theme( "JMP Default" ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)};

View solution in original post

2 REPLIES 2
Highlighted
gzmorgan0
Super User

Re: Why Expr() not working occasionally?

@Stokes ,

 

I expect you have syntax errors.

 

Note I like to make a reference to the expression (vgExpr) and create a handle/reference to the report (VG).

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );


vgExpr = Expr( New Window("Variability Chart",
	   VListBox(
	   	  VG = Variability Chart(
			Y( :height, :weight ),
			X( :age, :sex )
		)//end Var Chart
	) //end VListBox 	
  )  //end new window
 ); //end Expr
 
 vgExpr;
 
 VG << 	Std Dev Chart( 0 );
 report(VG[1])[FrameBox(1)] << {Row Legend(
				sex,
				Color( 1 ),
				Color Theme( "JMP Default" ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)};
 report(VG[2])[FrameBox(1)] << {Row Legend(
				sex,
				Color( 1 ),
				Color Theme( "JMP Default" ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)};

View solution in original post

Highlighted
Stokes
Level III

Re: Why Expr() not working occasionally?

THanks for the help.

Yes, it seems to be a syntax issue.

I compared your jsl and find below is the problem.

 

Is there a rule of sequence? Such that, the vgExpr = Expr(...) has to be run first, then the vgExpr will work.

 

I usually put the vgExpr = Expr(...) at the bottom of the jsl, then it will not work if I use the vgExpr before the definition part.

Article Labels