aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/select.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-08 16:14:51 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-01-08 16:18:16 -0500
commitc5eef0418df2ae6a97c54839fa010ff60d96f78b (patch)
tree7ad892f4d416cfcf380e3a26164df4d240a82037 /docs/doc/select.html
parentded5581732544165dbb14fb2481ab3855104c638 (diff)
Add error messages to generated markdown docs with β€’CurrentError (fixes #22)
Diffstat (limited to 'docs/doc/select.html')
-rw-r--r--docs/doc/select.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/doc/select.html b/docs/doc/select.html
index 919a80c0..aaa36cc3 100644
--- a/docs/doc/select.html
+++ b/docs/doc/select.html
@@ -64,7 +64,7 @@
"two"
<span class='Number'>0</span> <span class='Function'>⊏</span> <span class='Function'>&lt;</span><span class='Number'>5</span> <span class='Comment'># No first axis to select from
-</span>ERROR
+</span><span class='Error'>Error: ⊏: 𝕩 cannot be a unit</span>
</pre>
<p>As a major cell of <code><span class='Value'>𝕩</span></code>, the result has rank one less than it and its shape is <code><span class='Number'>1</span><span class='Function'>↓≒</span><span class='Value'>𝕩</span></code>. <code><span class='Value'>𝕩</span></code> must have rank one or more.</p>
<p>The index <code><span class='Value'>𝕨</span></code> has to be an integer less than <code><span class='Function'>β‰ </span><span class='Value'>𝕩</span></code>. It can be negative, in which case it must be greater than or equal to <code><span class='Function'>-β‰ </span><span class='Value'>𝕩</span></code>. Negative indices select from the end of <code><span class='Value'>𝕩</span></code>, in that <code><span class='Number'>Β―1</span></code> indicates the last major cell and <code><span class='Function'>-β‰ </span><span class='Value'>𝕩</span></code> indicates the first. If <code><span class='Function'>β‰ </span><span class='Value'>𝕩</span></code> is 0, then no index is valid.</p>
@@ -74,7 +74,7 @@
β”˜
<span class='Number'>0</span> <span class='Function'>⊏</span> <span class='String'>&quot;&quot;</span>
-ERROR
+<span class='Error'>Error: ⊏: Indexing out-of-bounds (𝕨≑0, 0≑≠𝕩)</span>
</pre>
<p>The monadic case First Cell (<code><span class='Function'>⊏</span><span class='Value'>𝕩</span></code>) is identical to <code><span class='Number'>0</span><span class='Function'>⊏</span><span class='Value'>𝕩</span></code>. It has the same restrictions: <code><span class='Value'>𝕩</span></code> must have rank 1 or more, and length 1 or more.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqPICJhYmMiCgriio8gImFiYyLiiY0iZGVmIgoK4oqPIOKJjSAiYWJjIgoK4oqPICdhJw==">↗️</a><pre> <span class='Function'>⊏</span> <span class='String'>&quot;abc&quot;</span>
@@ -89,7 +89,7 @@ ERROR
"abc"
<span class='Function'>⊏</span> <span class='String'>'a'</span>
-ERROR
+<span class='Error'>Error: ⊏: Argument cannot be an atom</span>
</pre>
<h2 id="first-axis-selection"><a class="header" href="#first-axis-selection">First-axis selection</a></h2>
<p>If <code><span class='Value'>𝕨</span></code> is an array of numbers (including any empty array), then each number indicates a major cell of <code><span class='Value'>𝕩</span></code>. In the simplest case, a list of numbers gives a result with the same rank as <code><span class='Value'>𝕩</span></code> but maybe not the same length.</p>