Skip to content

Commit 77caa98

Browse files
gaynor@illinois.edugaynor@illinois.edu
authored andcommitted
Mostly changed documentation.
1 parent 5992b02 commit 77caa98

4 files changed

Lines changed: 158 additions & 52 deletions

File tree

.idea/workspace.xml

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ncsa-qdl/src/main/java/edu/uiuc/ncsa/qdl/workspace/WorkspaceCommands.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ protected void showHelp4Help() {
183183
say(HELP_COMMAND + " syntax:");
184184
say(HELP_COMMAND + " - (no arg) print generic help for the workspace.");
185185
say(HELP_COMMAND + " * - print a short summary of help for every user defined function.");
186-
say(HELP_COMMAND + " name - print help. System functions will have a summary printed (read the manual for more).");
186+
say(HELP_COMMAND + " -online - print a list of all online help topics.");
187+
say(HELP_COMMAND + " name - print short help for name. System functions will have a");
188+
say(" summary printed (read the manual for more).");
187189
say(" For user defined function, a summary of all calls with various argument counts will be shown.");
188190
say(HELP_COMMAND + " name arg_count - print out detailed information for the user-defined function and the given number of arguments.");
189191

@@ -2225,7 +2227,17 @@ private int doHelp(InputLine inputLine) {
22252227
}
22262228
return printList(inputLine, treeSet);
22272229
}
2230+
if(name.equals("-online")){
2231+
TreeSet<String> treeSet = new TreeSet<>();
2232+
treeSet.addAll(onlineHelp.keySet());
2233+
if (treeSet.isEmpty()) {
2234+
say("(no online help)");
2235+
return RC_CONTINUE;
2236+
}
2237+
say("Help is available for the following (" + treeSet.size() + " topics):");
2238+
return printList(inputLine, treeSet);
22282239

2240+
}
22292241
if (onlineHelp.containsKey(name)) {
22302242
say(onlineHelp.get(name));
22312243
return RC_CONTINUE;

ncsa-qdl/src/main/resources/func_help.xml

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ mod(a,b) - compute the modulus, i.e., the remainder after long division, of two
121121
numeric_digits(arg) - set the precision to the value of arg, which is a
122122
positive integer.
123123
The result displayed is the old precision.
124+
Note: Precision refers to the total number of digits that are considered
125+
accurate. So if the precision is 5, the number 4321.12345 is actually
126+
only accurate to 4321.1 and anything after that is an artifact of
127+
approximation. QDL will show values as accurately as possible,
128+
so if the value were 1.00000009 then QDL would display 1 as the
129+
value, since up to precision, they are the same.
130+
See the reference manual for a more information.
124131
]]>
125132
</body>
126133
</entry>
@@ -1134,7 +1141,7 @@ E.g.
11341141
Note the trailing | added at the end.
11351142
E.g.
11361143
detokenize([;4]], '|',2)
1137-
'0 1 2 3'
1144+
0|1|2|3
11381145
11391146
omits the trailing |.
11401147
See also: truncate, constants (which contains the option values for reference)
@@ -1734,6 +1741,15 @@ You may use ⟦ (\u27e6) or [| , ⟧ (\u27e7) or |].
17341741
⟦ start;stop;count ⟧
17351742
will create the list with count elements evenly distributed between start and stop,
17361743
inclusive.
1744+
See also: slice
1745+
]]>
1746+
</body>
1747+
</entry>
1748+
<entry id="[|">
1749+
<body>
1750+
<![CDATA[
1751+
Closed slice operator open bracket.
1752+
See ⟦, slice
17371753
]]>
17381754
</body>
17391755
</entry>
@@ -1743,9 +1759,19 @@ inclusive.
17431759
Unicode \u27e7. Part of a closed slice.
17441760
Equivalent to: |]
17451761
Please see help for ⟦
1762+
See also: slice
17461763
]]>
17471764
</body>
17481765
</entry>
1766+
<entry id="|]">
1767+
<body>
1768+
<![CDATA[
1769+
Closed slice operator close bracket.
1770+
See ⟧, slice
1771+
]]>
1772+
</body>
1773+
</entry>
1774+
17491775
<entry id="">
17501776
<body>
17511777
<![CDATA[
@@ -2006,6 +2032,41 @@ This is extremely useful in many places, such as scripts.
20062032
</body>
20072033
</entry>
20082034

2035+
<entry id="slice">
2036+
<body>
2037+
<![CDATA[
2038+
A slice is an list of numbers. There are two main types
2039+
Open slice: [start;stop;step]
2040+
which will produce the list
2041+
[start, start+step, start +2*step, ... ]
2042+
ending when stop < start + n*step.
2043+
If start is omitted, it is assumed to be 0 (zero).
2044+
If step is omitted, it is assumed to be 1.
2045+
E.g. [;5]
2046+
[0,1,2,3,4]
2047+
E.g. using a slice in a loop
2048+
while[for_next(j, 1+2*[;6])][say(j);]
2049+
prints 1, 3, 5, 7, 9, 11
2050+
E.g. [2;5;0.7]
2051+
[2,2.7,3.4,4.1,4.8]
2052+
Note well: in an open slice, you do not necessarily know how
2053+
many elements are in the resulting list. Here there
2054+
are 5.
2055+
2056+
Closed slice [|start;stop;count|]
2057+
This will produce the list from
2058+
[start, ... , stop] (inclusive)
2059+
and will have exactly count element in it.
2060+
If start is omitted, it is assumed to be 0 (zero).
2061+
E.g. [|-pi()/4; pi()/3; 11 |]
2062+
[-0.785398163397447,-0.602138591938043, ... ,1.047197551196593]
2063+
2064+
produces a list of 11 equally spaced numbers from -pi/4 to pi/3,
2065+
including the endpoints.
2066+
]]>
2067+
</body>
2068+
</entry>
2069+
20092070
<!--
20102071
entry template
20112072
-->

0 commit comments

Comments
 (0)