Disclaimer:
This will be a fairly lengthy post and took a fair bit time to write. It will also be a bit unstructured as I added more things when they came to my mind while writing it. These are all my own (strong) opinions based on my few years (4) of JMP usage. I have also a list of issues with JMP's Online Help page, but I try to avoid most of that feedback here.
JMP Scripting Index is great (and necessary) help when writing JMP Scripts. I even use it as general search for JMP features. I will divide this post to couple of different sections and might make Wish List item(s) based on the discussion here.
Scripting Index, JMP Help, Scripting Guide and JSL Syntax Reference
Which documentation should I rely on? All of these provide different/same information in different/same format. Also sometimes they have conflicting information (see Items() below for example). I would like JSL Syntax Reference and Scripting Index to have the same information. For example currently Scripting Index is lacking arguments and return information and you have to decrypt them from description.
Also the experience of using JMP Help online version's search is quite bad. Only reliable way to use it I have found, is to either first find the function/feature from Scripting Index and hope you have working Help button or in some cases Google Search with "jmp help search term" but this isn't too reliable. Searching the information from .pdf versions of Scripting Guide and JSL Syntax Reference is usually faster than just relying on online help pages search. If I for example try to find Remove From function by using JMP Help's search, it won't even be on the list.
Also I haven't really used JMP17's Search feature, but I think it isn't made for JSL purposes as it is context related.
Links for some of the documentation:
Scripting Guide (online), Scripting Guide (pdf)
JSL Syntax Reference (online), JSL Syntax Reference (pdf)
Scripting Index format
Is it really necessary to read "Description" to understand all the parameters and what is returned? Could they be added as their own bolded parts in similar manner as Version Added in JMP17?
Below is exceptional Paint example with Returns added (with missing words "a list"), in best case also Arguments should be there (and maybe even throws).
JMP parameter list description/format
Is there anything like this for JSL Parameter List (Visual Basic) as in is JSL parameter list syntax explained anywhere? When I started scripting I was fairly confused by some of these (also I would like to use same format when I write my own Custom Functions). For example what do |, <>, =, and so on mean? My guesses: | -> or, <> -> optional parameter, = -> default value.
How does user know what should be written out in the function call? How does user know default parameter values WITHOUT reading description every time. Below are some quick examples I know of:
Contains():
pos = Contains(x, item, <start=1>)
Parameter naming is definitely not the best here (x?) but otherwise it is quite ok. Default value for start
is defined here but how does user know if start
should be written out or not? Can it be skipped because it is written using = instead of () (which would make it a function?)?
Items():
wl = Items(<[first last]>, s, <delim>, <Include Boundary Delimiters(0|1)>);
Default value for delim? Should Include Boundary Delimiters
be written out or not? What does it default to? What does [first last]
mean? It is not explained in the documentation (which documentation I should use...?) Items(string, <delimiter>, <Include Boundary Delimiters(Boolean)>) it is even missing from Syntax Reference but found from Scripting Index.
Is it being removed in future version of JMP (so I don't want to use it) because it is missing from documentation? Was it added recently so some documentation is just out of date (so I can use but, I just have no idea what it does without trying it out).
Hex():
h = Hex(value, <"integer">|<encoding="utf-8">|<Base(number)>,<Pad To(number>));
Default values? Why I don't have to write out encoding
, but I have to write out Base
and Pad To
(at least based on Scripting Index example). Can I see this from brackets () after the parameter?
And there are many many more similar examples in Scripting Index.
Scripting documentation issue reporting
How should I report possible issues within Scripting Index (and other documentation)? Creating Wish List items or sending support tickets is out of question for this. I don't want to spam hundreds of messages to either place just to get some typo's fixed.
Quick example by using Remove From(), for starters the descriptions are different in Scripting Index and JSL Syntax Reference and JSL Syntax provides more information what the function does but lacks examples. Also the function descriptions are different in Scripting Index vs JSL Syntax Reference... and the functions should behave differently based on this?
Remove From( x, <i>, <n=1> ) vs Remove From(source, position, <n>),
First is saying that i and n are optional, but for some reason i has no default value (it seems to be -1).
Second one says that second argument is mandatory and n is optional with no default value.
Scripting Index (Remove From isn't supposed to return anything based on this?)
Online Syntax Reference has wrong information on Returns (it does return the removed items and modifies source in place).
-Jarmo