Choose Language Hide Translation Bar

Allow a "key string" to create a section within a JSL code

// this part is section 1
any script = {1,2,3}
/* if I am on this section, only this piece fo code would be executed */ //Section // this part is section 2 another piece of code << get me a break into sections' command!
/* if I am on this section, only this piece fo code would be executed */


I frequently use JSL to automate data processing and reporting and it would handy if there would be a "key string" for example "//Section" that would allow me to break a code in different parts.

What is the benefit? If we are allowed to create this "sections" (or "cells" if you prefer that name), it would be much easier to execute parts of a code during the code development and/or testing, or I only want to run a specific section for reason X. This section break would avoid the annoying task of highlighting the part of the code I want to run. That would also mean that a command to only run the "current section"  is needed.


Tracking Number:

Defect ID:


If I understand what you are describing - you can do this by highlighting the section of code you want to isolate and then run the script using the normal means (CTRL-R, The run script button, The enter key on the numeric keypad).  JMP will only run the highlighted code.  The debugger also has the ability to control code execution (the "step" buttons).  


For isolating bits of code that you want to execute during runtime, functions and expressions are your best bet - particularly if you want to reuse the same bit of code over and over or create dynamic code.


- just some thoughts



Level VIII

This is a great suggestion. This is a prominent feature available in Matlab. ( . 

@uday_guntupalli, most of the features in that article appear to be available in the JSL debugger.  

Level VIII

@MikeD_Anderson , 
     Can these features be extended to Script Editor as well ? 

No idea. But if you’re testing you’re code you can launch the debugger easily enough from the script editor.