cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

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

//Section
// 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 */

Hi,

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.

Thanks!

6 Comments

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

 

M

uday_guntupalli
Level VIII

This is a great suggestion. This is a prominent feature available in Matlab. (https://www.mathworks.com/help/matlab/matlab_prog/run-sections-of-programs.html) . 

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

uday_guntupalli
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.
Ryan_Gilmore
Community Manager
Status changed to: Archived
We are archiving this request. If this is still important please comment with additional details and we will reopen. Thank you!