cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar

Style Tips for Scripts

Started ‎11-08-2022 by
Modified ‎11-08-2022 by
View Fullscreen Exit Fullscreen

So, although your scripts follow a strict syntax, there's no strict style imposed by JMP in the scripting language. Remember that JMP ignores whitespaces and letter case. So, style, then, is important for legibility. Let's take a look at an example. The script shown here follows the syntax rules and will run correctly. But the style -- or lack of style -- make it difficult to read and understand. The same script can be formatted differently according to some style conventions so that it is much more legible. And of course these changes don't affect the way that the script runs. This course uses a style with the following characteristics: capitalize the first letter of built-in names use lowercase for the first letter of names defined by users indent lines to clarify nested options and messages and use spaces around words and operators for legibility. Many of these conventions are applied when you have JMP reformat your script, either using the right-click menu in the script, the toolbar button, or the keyboard shortcut, Ctrl+M. But, you can also develop a different style that works for you. The important thing is to use whatever style you choose consistently.