Skip to content

Commit 85c581e

Browse files
committed
Build Joe7M's changes.
1 parent 58918e8 commit 85c581e

16 files changed

Lines changed: 100 additions & 75 deletions

File tree

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ <h3 id="smallbasic-version-0.12.10-has-been-released">SmallBASIC version 0.12.10
199199
<p><a href="/posts/2017-24-12-1.html">Read more</a></p>
200200
</div>
201201
<div class="pagefooter">
202-
This page was last edited on Wed, 18 Oct 2023 15:34:02 +0200
202+
This page was last edited on Mon, 23 Oct 2023 08:50:31 +1030
203203
|
204204
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
205205
processed with

reference/589.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,23 @@ <h4>SmallBASIC</h4>
6565
</div>
6666
<div class="article">
6767
<h1>DIRWALK</h1>
68-
<blockquote>DIRWALK directory [, wildcards] [USE ]</blockquote>
68+
<blockquote>DIRWALK dir [, wildcards] [USE f(x)]</blockquote>
6969
<div class="siteSub">
7070
<p>
7171
<a href="/">Home</a> &gt;
7272
<a href="/pages/reference.html">Reference</a> &gt;
7373
<a href="/pages/file.html">File</a>
7474
</p>
7575
</div>
76-
<p>Walk through the specified directories. The user-defined function must returns zero to stop the process. The user defined function takes <code>x</code> as a parameter. <code>x</code> contains information about the current file.</p>
77-
<h2 id="example-1-print-all-files">Example 1: Print all files</h2>
76+
<p>Walk through the specified directory <code>dir</code> and its subdirectories. The user defined function <code>f(x)</code> takes <code>x</code> as a parameter. <code>x</code> contains information about the current file. <code>f(x)</code> must return zero to stop the process. <code>wildcards</code> can be used to filter the files.</p>
77+
<h3 id="example-1-print-all-files">Example 1: Print all files</h3>
7878
<div class="sourceCode" id="cb1"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="kw">FUNC </span>PRNF(x)</span>
7979
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a> ? x</span>
8080
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a> PRNF=<span class="dt">TRUE</span></span>
8181
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><span class="kw">END</span></span>
8282
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a></span>
8383
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a><span class="fu">DIRWALK</span> <span class="st">&quot;.&quot;</span> <span class="kw">USE</span> PRNF(x)</span></code></pre></div>
84-
<h2 id="example-2-create-a-list-of-all-files">Example 2: Create a list of all files</h2>
84+
<h3 id="example-2-create-a-list-of-all-files">Example 2: Create a list of all files</h3>
8585
<div class="sourceCode" id="cb2"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="kw">FUNC </span>ListFiles(x)</span>
8686
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a> FileList &lt;&lt; x</span>
8787
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true"></a> <span class="kw">return</span> <span class="dt">true</span></span>
@@ -92,7 +92,7 @@ <h2 id="example-2-create-a-list-of-all-files">Example 2: Create a list of all fi
9292
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true"></a><span class="kw">for </span>n <span class="kw">in</span> FileList</span>
9393
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true"></a> <span class="kw">print</span> n.path, n.name</span>
9494
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true"></a><span class="kw">next</span></span></code></pre></div>
95-
<h2 id="example-3-search-for-a-certain-file-using-wildcards">Example 3: Search for a certain file using wildcards</h2>
95+
<h3 id="example-3-search-for-a-certain-file-using-wildcards">Example 3: Search for a certain file using wildcards</h3>
9696
<div class="sourceCode" id="cb3"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="kw">FUNC </span>ListFiles(x)</span>
9797
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true"></a> FileList &lt;&lt; x</span>
9898
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true"></a> <span class="kw">return</span> <span class="dt">true</span></span>
@@ -103,7 +103,7 @@ <h2 id="example-3-search-for-a-certain-file-using-wildcards">Example 3: Search f
103103
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true"></a><span class="kw">for </span>n <span class="kw">in</span> FileList</span>
104104
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true"></a> <span class="kw">print</span> n.path</span>
105105
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true"></a><span class="kw">next</span></span></code></pre></div>
106-
<h2 id="example-4-search-a-certain-file-using-user-defined-function">Example 4: Search a certain file using user defined function</h2>
106+
<h3 id="example-4-search-a-certain-file-using-user-defined-function">Example 4: Search a certain file using user defined function</h3>
107107
<div class="sourceCode" id="cb4"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true"></a><span class="kw">func </span>SearchFile(x)</span>
108108
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true"></a> <span class="kw">if(</span>x.name == <span class="st">&quot;scratch.bas&quot;</span>)</span>
109109
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true"></a> path = x.path</span>
@@ -116,7 +116,7 @@ <h2 id="example-4-search-a-certain-file-using-user-defined-function">Example 4:
116116
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true"></a><span class="fu">DIRWALK</span> <span class="st">&quot;.&quot;</span> <span class="kw">USE</span> SearchFile(x)</span>
117117
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true"></a></span>
118118
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true"></a><span class="kw">print</span> path</span></code></pre></div>
119-
<h2 id="example-5-using-wilcards">Example 5: Using wilcards</h2>
119+
<h3 id="example-5-using-wilcards">Example 5: Using wilcards</h3>
120120
<div class="sourceCode" id="cb5"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a><span class="kw">FUNC </span>ListFiles(x)</span>
121121
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a> FileList &lt;&lt; x</span>
122122
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true"></a> <span class="kw">return</span> <span class="dt">true</span></span>
@@ -127,7 +127,7 @@ <h2 id="example-5-using-wilcards">Example 5: Using wilcards</h2>
127127
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true"></a><span class="kw">for </span>n <span class="kw">in</span> FileList</span>
128128
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true"></a> <span class="kw">print</span> n.path, n.name</span>
129129
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true"></a><span class="kw">next</span></span></code></pre></div>
130-
<h2 id="example-6-file-list-utility">Example 6: File list utility</h2>
130+
<h3 id="example-6-file-list-utility">Example 6: File list utility</h3>
131131
<div class="sourceCode" id="cb6"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a></span>
132132
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true"></a><span class="co">&#39; Note: this demo is also a useful utility (version 2)</span></span>
133133
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true"></a></span>
@@ -300,7 +300,7 @@ <h2 id="example-6-file-list-utility">Example 6: File list utility</h2>
300300
</div>
301301
</div>
302302
<div class="pagefooter">
303-
This page was last edited on Thu, 26 Jan 2023 23:05:33 +0100
303+
This page was last edited on Mon, 23 Oct 2023 15:43:28 +0200
304304
|
305305
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
306306
processed with

reference/615.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ <h1>DRAW</h1>
7373
<a href="/pages/graphics.html">Graphics</a>
7474
</p>
7575
</div>
76-
<p>Draw lines as specified by the given CommandString. The CommandString is created using commands from the Graphics Definition Language. The start point for drawing can be defined using the PSET command. COLOR can be used to change the color of the lines.</p>
77-
<h2 id="graphics-definition-language">Graphics Definition Language</h2>
76+
<p>Draw lines as specified by the given <code>CommandString</code>. The <code>CommandString</code> is created using commands from the Graphics Definition Language. The start point for drawing can be defined using the PSET command. COLOR can be used to change the color of the lines.</p>
77+
<h3 id="graphics-definition-language">Graphics Definition Language</h3>
7878
<p>In the movement instructions below, n specifies a distance to move in pixel.</p>
7979
<table>
8080
<colgroup>
@@ -134,7 +134,7 @@ <h2 id="graphics-definition-language">Graphics Definition Language</h2>
134134
</tr>
135135
</tbody>
136136
</table>
137-
<h2 id="example-1-lets-draw-a-house">Example 1: Let’s draw a house</h2>
137+
<h3 id="example-1-lets-draw-a-house">Example 1: Let’s draw a house</h3>
138138
<div class="sourceCode" id="cb1"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="fu">COLOR</span> <span class="dv">9</span></span>
139139
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="fu">PSET</span> <span class="dv">80</span>,<span class="dv">80</span></span>
140140
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a><span class="fu">DRAW</span> <span class="st">&quot;R50D70L25U25L15D25NR15&quot;</span> <span class="co">&#39; House part 1</span></span>
@@ -227,7 +227,7 @@ <h2 id="example-1-lets-draw-a-house">Example 1: Let’s draw a house</h2>
227227
</div>
228228
</div>
229229
<div class="pagefooter">
230-
This page was last edited on Sat, 28 Jan 2023 22:11:09 +0100
230+
This page was last edited on Mon, 23 Oct 2023 15:52:24 +0200
231231
|
232232
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
233233
processed with

reference/617.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ <h3 id="save-command">Save command</h3>
155155
<p>The save command saves the image data into the given file handle, file name or array</p>
156156
<div class="sourceCode" id="cb11"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true"></a><span class="dt">dim</span> png</span>
157157
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true"></a>i.save(png)</span></code></pre></div>
158-
<h3 id="clip-command-console-version-only">Clip command (console version only)</h3>
159-
<p>Reduces the size of the image.</p>
160-
<div class="sourceCode" id="cb12"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true"></a>png.clip(<span class="fu">left</span>, top, <span class="fu">right</span>, bottom)</span></code></pre></div>
158+
<h3 id="clip-command">Clip command</h3>
159+
<p>Clips the image. Next draw or show command will display only this part of the image. On the same image a new clip can be set.</p>
160+
<div class="sourceCode" id="cb12"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true"></a>i.clip(<span class="fu">left</span>, top, width, height)</span></code></pre></div>
161161
<h3 id="filter-command-console-version-only">Filter command (console version only)</h3>
162162
<p>Calls the supplied callback function on each pixel</p>
163163
<div class="sourceCode" id="cb13"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true"></a><span class="kw">func </span>colorToAlpha(x)</span>
@@ -904,7 +904,7 @@ <h3 id="console-version-example">Console version example</h3>
904904
</div>
905905
</div>
906906
<div class="pagefooter">
907-
This page was last edited on Tue, 12 Sep 2023 19:20:08 +0930
907+
This page was last edited on Mon, 6 Nov 2023 21:11:57 +0100
908908
|
909909
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
910910
processed with

reference/642.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ <h1>DO</h1>
7474
</p>
7575
</div>
7676
<p>This keyword is used to declare single-line commands. It can be used with WHILE and FOR-family commands.</p>
77-
<h2 id="example-1">Example 1</h2>
77+
<h3 id="example-1">Example 1</h3>
7878
<div class="sourceCode" id="cb1"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="kw">For </span>i = <span class="dv">1</span> <span class="kw">to</span> <span class="dv">10</span> <span class="kw">do</span> <span class="kw">print</span> i </span></code></pre></div>
79-
<h2 id="example-2">Example 2</h2>
79+
<h3 id="example-2">Example 2</h3>
8080
<div class="sourceCode" id="cb2"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="kw">FOR </span>f <span class="kw">IN</span> <span class="fu">files</span>(<span class="st">&quot;*.txt&quot;</span>) <span class="kw">DO</span> <span class="kw">PRINT</span> f</span></code></pre></div>
81-
<h2 id="example-3">Example 3</h2>
81+
<h3 id="example-3">Example 3</h3>
8282
<div class="sourceCode" id="cb3"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="kw">While(</span>i &lt; <span class="dv">10</span>) <span class="kw">do</span> i++</span></code></pre></div>
8383
<div class="lavenderBox">
8484
<div class="header">Code samples using DO</div>
@@ -203,7 +203,7 @@ <h2 id="example-3">Example 3</h2>
203203
</div>
204204
</div>
205205
<div class="pagefooter">
206-
This page was last edited on Fri, 27 Jan 2023 22:22:54 +0100
206+
This page was last edited on Mon, 23 Oct 2023 15:50:09 +0200
207207
|
208208
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
209209
processed with

reference/694.html

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,17 @@ <h1>DIFFEQN</h1>
7474
</p>
7575
</div>
7676
<p>Solving first-order differential equations using Runge-Kutta method.</p>
77-
<p>dy/dx = f(y,x) with start condition: y(x = x0) = y0</p>
78-
<p>x0,y0 = initial x,y<br />
79-
xf = final x<br />
80-
errcode = 0 for success; otherwise calculation error<br />
81-
yf = result</p>
77+
<ul>
78+
<li><code>expr</code> : f(y,x) = dy/dx with start condition: y(x = x0) = y0</li>
79+
<li><code>x0</code>, <code>y0</code> : initial x, y<br />
80+
</li>
81+
<li><code>xf</code> : final x</li>
82+
<li><code>yf</code> : result</li>
83+
<li><code>maxseq</code> : equivalent to precision</li>
84+
<li><code>maxerr</code> : maximum allowed error</li>
85+
<li><code>errcode</code> : 0 for success; otherwise calculation error</li>
86+
</ul>
87+
<h3 id="example-1">Example 1</h3>
8288
<div class="sourceCode" id="cb1"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="co">&#39; Solving dy/dx = 7*y^2 * x^3 with start condition y(2) = 3 </span></span>
8389
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a></span>
8490
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a><span class="kw">def</span> f1(x,y) = <span class="dv">7</span>*y^<span class="dv">2</span> * x^<span class="dv">3</span></span>
@@ -103,6 +109,7 @@ <h1>DIFFEQN</h1>
103109
<span id="cb1-22"><a href="#cb1-22" aria-hidden="true"></a> <span class="kw">print</span> <span class="st">&quot;Error solving equation&quot;</span></span>
104110
<span id="cb1-23"><a href="#cb1-23" aria-hidden="true"></a> <span class="kw">print</span> <span class="st">&quot;Increasing maxseg might help&quot;</span></span>
105111
<span id="cb1-24"><a href="#cb1-24" aria-hidden="true"></a><span class="kw">endif</span></span></code></pre></div>
112+
<h3 id="example-2">Example 2</h3>
106113
<div class="sourceCode" id="cb2"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="co">&#39; Defining the differential equation for a stiffness system</span></span>
107114
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a></span>
108115
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true"></a><span class="kw">def</span> f2(y,t) = <span class="dv">-1000</span>*y + <span class="dv">3000</span> - <span class="dv">2000</span> * <span class="fu">exp</span>(-t)</span>
@@ -229,7 +236,7 @@ <h1>DIFFEQN</h1>
229236
</div>
230237
</div>
231238
<div class="pagefooter">
232-
This page was last edited on Mon, 17 Oct 2022 20:17:59 +0200
239+
This page was last edited on Mon, 23 Oct 2023 15:36:14 +0200
233240
|
234241
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
235242
processed with

reference/729.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,18 @@ <h4>SmallBASIC</h4>
6565
</div>
6666
<div class="article">
6767
<h1>DETERM</h1>
68-
<blockquote>DETERM (A[, toler])</blockquote>
68+
<blockquote>D = DETERM (A [, toler])</blockquote>
6969
<div class="siteSub">
7070
<p>
7171
<a href="/">Home</a> &gt;
7272
<a href="/pages/reference.html">Reference</a> &gt;
7373
<a href="/pages/math.html">Math</a>
7474
</p>
7575
</div>
76-
<p>Determinant of A. toler = tolerance number. the absolute value of the lowest acceptable number. default = 0.</p>
76+
<p>Determinant of <code>A</code>. <code>toler</code> is the tolerance number. It is equivalent to the absolute value of the lowest acceptable number. Default value is <code>0</code>.</p>
77+
<h3 id="example">Example</h3>
7778
<div class="sourceCode" id="cb1"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a>A = [ <span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">2</span>; <span class="dv">3</span>, <span class="dv">2</span>, <span class="dv">1</span>; <span class="dv">1</span>, <span class="dv">1</span>, <span class="dv">0</span>]</span>
78-
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="kw">print</span> <span class="fu">determ</span>(A)</span></code></pre></div>
79+
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="kw">print</span> <span class="fu">determ</span>(A) <span class="co">&#39; Output: 3</span></span></code></pre></div>
7980
<div class="lavenderBox">
8081
<div class="header">Code samples using DETERM</div>
8182
<div class="linklist">
@@ -197,7 +198,7 @@ <h1>DETERM</h1>
197198
</div>
198199
</div>
199200
<div class="pagefooter">
200-
This page was last edited on Mon, 17 Oct 2022 16:52:55 +0200
201+
This page was last edited on Mon, 23 Oct 2023 15:21:47 +0200
201202
|
202203
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
203204
processed with

reference/777.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ <h1>DISCLOSE</h1>
116116
</tr>
117117
</tbody>
118118
</table>
119-
<h2 id="example-1-disclose-default-pairs">Example 1: Disclose default pairs</h2>
119+
<h3 id="example-1-disclose-default-pairs">Example 1: Disclose default pairs</h3>
120120
<div class="sourceCode" id="cb1"><pre class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a>s = <span class="st">&quot;(abc)&quot;</span></span>
121121
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="kw">print</span> <span class="fu">disclose</span>(s) <span class="co">&#39; Output: abc</span></span></code></pre></div>
122122
<h3 id="example-2-disclose-non-default-pairs">Example 2: Disclose non-default pairs</h3>
@@ -210,7 +210,7 @@ <h3 id="example-3-disclose-with-ignore-pairs">Example 3: Disclose with ignore-pa
210210
</div>
211211
</div>
212212
<div class="pagefooter">
213-
This page was last edited on Mon, 25 Sep 2023 22:25:55 +0200
213+
This page was last edited on Mon, 23 Oct 2023 15:46:28 +0200
214214
|
215215
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
216216
processed with

0 commit comments

Comments
 (0)