JMP helps the user to "trace" errors in JSL code: It doesn't indicate the line of code where the error "happens".
It tries to find out where the actual error is in the code and shows this line.
In the below example, the error message just shows up if line 6 is uncommented --> error "happens" in line 6.
But the erroneous code (Graph Bulder without "i") is in line 4.
And JMP, indeed mentions line 4 -> amazing! very helpful
Often it's great that JMP does this first step of error tracing automatically.
But sometimes it's misleading (wrong).
An example:
With it's functionality to trace errors back to where the variable was defined, JMP asks the user to fix the code in line 2.
With too much trust in what JMP is saying, it will take a while to find out that the error is actually in line 12 - definitely doesn't make sense to run a line just with a command which just a GraphBuilder object understands.
Just imagine how complicate it can get if the error is less obvious than this one here - if JMP tells you the wrong line of code and you don't have any clue in which line of code it actually happened ...
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
myVariables = Expr(Variables( X( :height ), Y( :weight ) ));
//myVariables = Insert(Expr(myVariables), Expr(Overlay(:sex)));
Substitute(Expr( Graph Builder(
Variables( X( :height ), Y( :weight ) ),
Name Expr(myVariables))),"hallo","hello")