mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
Doc updates for #960
This commit is contained in:
parent
6dde90a5ef
commit
529f559422
5 changed files with 30 additions and 25 deletions
|
|
@ -139,9 +139,9 @@ x[4], x[5]]`.
|
|||
|
||||
## Out-of-bounds indexing
|
||||
|
||||
Somewhat imitating Python, out-of-bounds index accesses are
|
||||
[absent](reference-main-null-data.md), but out-of-bounds slice accesses result
|
||||
in trimming the indices, resulting in a short array or even the empty array:
|
||||
Out-of-bounds index accesses are [absent](reference-main-null-data.md), but out-of-bounds slice
|
||||
accesses result in trimming the indices, resulting in a short array or even the empty array. (This
|
||||
behavior intentionally imitates Python.)
|
||||
|
||||
<pre class="pre-highlight-in-pair">
|
||||
<b>mlr -n put '</b>
|
||||
|
|
|
|||
|
|
@ -94,9 +94,9 @@ GENMD-EOF
|
|||
|
||||
## Out-of-bounds indexing
|
||||
|
||||
Somewhat imitating Python, out-of-bounds index accesses are
|
||||
[absent](reference-main-null-data.md), but out-of-bounds slice accesses result
|
||||
in trimming the indices, resulting in a short array or even the empty array:
|
||||
Out-of-bounds index accesses are [absent](reference-main-null-data.md), but out-of-bounds slice
|
||||
accesses result in trimming the indices, resulting in a short array or even the empty array. (This
|
||||
behavior intentionally imitates Python.)
|
||||
|
||||
GENMD-RUN-COMMAND
|
||||
mlr -n put '
|
||||
|
|
|
|||
|
|
@ -122,9 +122,9 @@ bcd
|
|||
|
||||
## Out-of-bounds indexing
|
||||
|
||||
Somewhat imitating Python, out-of-bounds index accesses are
|
||||
[errors](reference-main-data-types.md), but out-of-bounds slice accesses result
|
||||
in trimming the indices, resulting in a short string or even the empty string:
|
||||
Out-of-bounds index accesses are [errors](reference-main-data-types.md), but out-of-bounds slice
|
||||
accesses result in trimming the indices, resulting in a short string or even the empty string.
|
||||
(This behavior intentionally imitates Python.)
|
||||
|
||||
<pre class="pre-highlight-in-pair">
|
||||
<b>mlr -n put '</b>
|
||||
|
|
@ -132,7 +132,7 @@ in trimming the indices, resulting in a short string or even the empty string:
|
|||
<b> x = "abcde";</b>
|
||||
<b> print x[1];</b>
|
||||
<b> print x[5];</b>
|
||||
<b> print x[6]; # absent</b>
|
||||
<b> print x[6];</b>
|
||||
<b> }</b>
|
||||
<b>'</b>
|
||||
</pre>
|
||||
|
|
@ -146,16 +146,16 @@ e
|
|||
<b>mlr -n put '</b>
|
||||
<b> end {</b>
|
||||
<b> x = "abcde";</b>
|
||||
<b> print x[1:2];</b>
|
||||
<b> print x[1:6];</b>
|
||||
<b> print x[10:20];</b>
|
||||
<b> print "\"" . x[1:2] . "\"";</b>
|
||||
<b> print "\"" . x[1:6] . "\"";</b>
|
||||
<b> print "\"" . x[10:20] . "\"";</b>
|
||||
<b> }</b>
|
||||
<b>'</b>
|
||||
</pre>
|
||||
<pre class="pre-non-highlight-in-pair">
|
||||
ab
|
||||
abcde
|
||||
|
||||
"ab"
|
||||
"abcde"
|
||||
""
|
||||
</pre>
|
||||
|
||||
## Escape sequences for string literals
|
||||
|
|
|
|||
|
|
@ -80,9 +80,9 @@ GENMD-EOF
|
|||
|
||||
## Out-of-bounds indexing
|
||||
|
||||
Somewhat imitating Python, out-of-bounds index accesses are
|
||||
[errors](reference-main-data-types.md), but out-of-bounds slice accesses result
|
||||
in trimming the indices, resulting in a short string or even the empty string:
|
||||
Out-of-bounds index accesses are [errors](reference-main-data-types.md), but out-of-bounds slice
|
||||
accesses result in trimming the indices, resulting in a short string or even the empty string.
|
||||
(This behavior intentionally imitates Python.)
|
||||
|
||||
GENMD-RUN-COMMAND
|
||||
mlr -n put '
|
||||
|
|
@ -90,7 +90,7 @@ mlr -n put '
|
|||
x = "abcde";
|
||||
print x[1];
|
||||
print x[5];
|
||||
print x[6]; # absent
|
||||
print x[6];
|
||||
}
|
||||
'
|
||||
GENMD-EOF
|
||||
|
|
@ -99,9 +99,9 @@ GENMD-RUN-COMMAND
|
|||
mlr -n put '
|
||||
end {
|
||||
x = "abcde";
|
||||
print x[1:2];
|
||||
print x[1:6];
|
||||
print x[10:20];
|
||||
print "\"" . x[1:2] . "\"";
|
||||
print "\"" . x[1:6] . "\"";
|
||||
print "\"" . x[10:20] . "\"";
|
||||
}
|
||||
'
|
||||
GENMD-EOF
|
||||
|
|
|
|||
9
todo.txt
9
todo.txt
|
|
@ -8,8 +8,13 @@ RELEASES
|
|||
? ??? for doc-string contents search -- ? & mlr help namegoeshere foo ...
|
||||
|
||||
o several needs-doc issues
|
||||
https://github.com/johnkerl/miller/issues?q=is%3Aissue+is%3Aopen+label%3Aneeds-documentation
|
||||
echo "a=14°20" | mlr put '$out=sub($a,"^([0-9]+)°([0-9]+)$","\1\2")'
|
||||
i https://github.com/johnkerl/miller/issues?q=is%3Aissue+is%3Aopen+label%3Aneeds-documentation
|
||||
- 908
|
||||
funct
|
||||
https://miller.readthedocs.io/en/latest/reference-main-data-types/
|
||||
https://miller.readthedocs.io/en/latest/reference-dsl-variables/#type-declarations-for-local-variables-function-parameter-and-function-return-values
|
||||
:context
|
||||
https://github.com/johnkerl/miller/issues/908#issuecomment-1032573038 NFR
|
||||
|
||||
k strptime/882
|
||||
k fmtifnum, & recursive fmtnum/fmtifnum
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue