Skip to content

Commit 3037c21

Browse files
committed
documentation improvements
1 parent 9b57a36 commit 3037c21

2 files changed

Lines changed: 35 additions & 10 deletions

File tree

docs/source/guide.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ <h3 id="stat-memory">Memory and machine ports</h3>
13061306
low memory segment, including the keyboard buffer. Additionally, there is read
13071307
support for font ROM, variable, array and string memory, <code><a href="#FIELD">FIELD</a></code>
13081308
buffers as well as the program code itself. Writing into the program code is
1309-
disabled by default, but can be enabled with the <code><a href="--allow-code-poke">allow-code-poke</a></code>
1309+
disabled by default, but can be enabled with the <code><a href="#--allow-code-poke">allow-code-poke</a></code>
13101310
option. A number of machine ports related to keyboard input and
13111311
video modes are supported as well.
13121312
</p>

docs/source/reference.html

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3151,11 +3151,14 @@ <h5>Notes</h5>
31513151
<code>VARPTR</code> can be used with <code><a href="#PEEK">PEEK</a></code>
31523152
to read a variable's internal representation.
31533153
</li>
3154+
<li>
3155+
If <code><var>name</var></code> is an undefined array element, it will be implicitly allocated in the same way as if it had been used in an expression.
3156+
</li>
31543157
</ul>
31553158
<h5>Errors</h5>
31563159
<ul>
31573160
<li>
3158-
<code><var>name</var></code> has not been previously defined: <samp>Illegal function call</samp>.
3161+
<code><var>name</var></code> is a scalar that has not been previously defined: <samp>Illegal function call</samp>.
31593162
</li>
31603163
<li>
31613164
<code><var>file_num</var></code> has a string value: <samp>Type mismatch</samp>.
@@ -3177,6 +3180,7 @@ <h4 id="VARPTR$"><code>VARPTR$</code></h4>
31773180
</code>
31783181
<p>
31793182
Returns the memory address of variable <code><var>name</var></code> in the form of a 3-byte string.
3183+
<code><var>name</var></code> is a fully indexed array element (which may or may not have been defined) or a previously-defined scalar variable.
31803184
The first byte is the length of the record the pointer points to:
31813185
</p>
31823186
<dl class="compact">
@@ -3196,10 +3200,16 @@ <h4 id="VARPTR$"><code>VARPTR$</code></h4>
31963200
The last two bytes are the pointer address (as returned by
31973201
<code><a href="#VARPTR">VARPTR</a></code>) in little-endian order.
31983202
</p>
3203+
<h5>Notes</h5>
3204+
<ul>
3205+
<li>
3206+
If <code><var>name</var></code> is an undefined array element, it will be implicitly allocated in the same way as if it had been used in an expression.
3207+
</li>
3208+
</ul>
31993209
<h5>Errors</h5>
32003210
<ul>
32013211
<li>
3202-
<code><var>name</var></code> has not been previously defined: <samp>Illegal function call</samp>.
3212+
<code><var>name</var></code> is a scalar that has not been previously defined: <samp>Illegal function call</samp>.
32033213
</li>
32043214
</ul>
32053215
</section>
@@ -3234,8 +3244,8 @@ <h4 id="AUTO"><code>AUTO</code></h4>
32343244
If a program line exists at a generated line number, a <code>*</code> is shown after the
32353245
line number. To avoid overwriting this line, leave it empty and press <kbd>Enter</kbd>.
32363246
To stop automatic line numbering, press <kbd>Ctrl</kbd>+<kbd>Break</kbd> or <kbd>Ctrl</kbd>+<kbd>C</kbd>. The line being edited at
3237-
that point is not saved. BASIC will return to command mode, even if <code>AUTO</code> was
3238-
run from a program line.
3247+
that point is not saved.
3248+
Also stops program execution and returns control to the user. Any further statements on the line will be ignored, also in direct mode.
32393249
</p>
32403250
<h5>Parameters</h5>
32413251
<ul>
@@ -4262,6 +4272,7 @@ <h4 id="CONT"><code>CONT</code></h4>
42624272
Resumes execution of a program that has been halted by
42634273
<code><a href="#STOP">STOP</a></code>, <code><a href="#END">END</a></code>,
42644274
<kbd>Ctrl</kbd>+<kbd>C</kbd>, or <kbd>Ctrl</kbd>+<kbd>Break</kbd>.
4275+
If run from a program, stops program execution and returns control to the user. Any further statements on the line will be ignored, also in direct mode.
42654276
</p>
42664277
<h5>Notes</h5>
42674278
<ul>
@@ -4580,7 +4591,7 @@ <h4 id="DELETE"><code>DELETE</code></h4>
45804591
</code>
45814592
<p>
45824593
Deletes a range of lines from the program.
4583-
Also stops program execution and returns control to the user.
4594+
Also stops program execution and returns control to the user. Any further statements on the line will be ignored, also in direct mode.
45844595
</p>
45854596
<h5>Parameters</h5>
45864597
<ul>
@@ -4880,6 +4891,7 @@ <h4 id="EDIT"><code>EDIT</code></h4>
48804891
Displays the specified program line with the cursor positioned for editing.
48814892
<code><var>line_number</var></code> must be a line that exists in the program, or a period (.) to
48824893
indicate the last line stored.
4894+
Also stops program execution and returns control to the user. Any further statements on the line will be ignored, also in direct mode.
48834895
</p>
48844896
<h5>Errors</h5>
48854897
<ul>
@@ -5012,6 +5024,7 @@ <h4 id="ERROR"><code>ERROR</code></h4>
50125024
</code>
50135025
<p>
50145026
Raises the error with number <code><var>error_number</var></code>.
5027+
See the <a href="#errors">list of error numbers and messages</a>.
50155028
</p>
50165029
<h5>Parameters</h5>
50175030
<ul>
@@ -6589,8 +6602,9 @@ <h4 id="LOAD"><code>LOAD</code></h4>
65896602
</code>
65906603
<p>
65916604
Loads the program stored in a file into memory.
6592-
Existing variables will be cleared and any program in memory will be erased. <code>LOAD</code> implies a
6605+
Existing variables will be cleared and any program in memory will be erased. <code>LOAD</code> implies
65936606
<code><a href="#CLEAR">CLEAR</a></code>.
6607+
Also stops program execution and returns control to the user. Any further statements on the line will be ignored, also in direct mode.
65946608
</p>
65956609
<p>
65966610
If <code>,R</code> is specified, keeps all data files open and runs the specified file.
@@ -6818,6 +6832,9 @@ <h4 id="MERGE"><code>MERGE</code></h4>
68186832
Overlays the lines of a program from a plain-text program file into the existing program. The loaded
68196833
lines overwrite existing lines if they have the same line number.
68206834
</p>
6835+
<p>
6836+
Also stops program execution and returns control to the user. Any further statements on the line will be ignored, also in direct mode.
6837+
</p>
68216838
<h5>Parameters</h5>
68226839
<ul>
68236840
<li>
@@ -8877,6 +8894,9 @@ <h6>MML Parameters</h6>
88778894
It is an error to write <code>PLAY "G=VAR;"</code> or <code>PLAY "G=" + VARPTR$(VAR)</code>.
88788895
Use <code>PLAY "G4"</code> or <code>PLAY "L=VAR;G"</code> or <code>PLAY "L=" + VARPTR$(VAR) + "G"</code> instead.
88798896
</p>
8897+
<p>
8898+
Commands may optionally be separated by one semicolon <code>;</code>, but not by more than one.
8899+
</p>
88808900
<h5>Errors</h5>
88818901
<ul>
88828902
<li>
@@ -9313,7 +9333,10 @@ <h5>Format string syntax</h5>
93139333
</tr>
93149334
<tr>
93159335
<td><code>^^^^</code></td>
9316-
<td>Specify that scientific notation <code>E+00</code> is to be used.</td>
9336+
<td>
9337+
Specify that scientific notation is to be used, with a mantissa and an exponent represented by <code>E+00</code>.
9338+
In scientific notation, thousands separators will not be shown and any <code>,</code> character has the same effect as <code>#</code>.
9339+
</td>
93179340
</tr>
93189341
</table>
93199342
</div>
@@ -9654,6 +9677,7 @@ <h4 id="RENUM"><code>RENUM</code></h4>
96549677
less than <code><var>old</var></code> remain unchanged.
96559678
<code><var>new</var></code>, <code><var>old</var></code> are line numbers; the dot <code>.</code> signifies the last line edited.
96569679
<code><var>increment</var></code> is a line number but must not be a dot or zero.
9680+
Also stops program execution and returns control to the user. Any further statements on the line will be ignored, also in direct mode.
96579681
</p>
96589682
<h5>Notes</h5>
96599683
<ul>
@@ -9893,8 +9917,8 @@ <h4 id="RUN"><code>RUN</code></h4>
98939917
</code>
98949918
<p>
98959919
Executes a program.
9896-
Existing variables will be
9897-
cleared and any program in memory will be erased. <code>RUN</code> implies a <code><a href="#CLEAR">CLEAR</a></code>
9920+
Existing variables will be cleared. <code>RUN</code> implies <code><a href="#CLEAR">CLEAR</a></code>.
9921+
If <code><var>file_spec</var></code> is given, any program in memory will be erased.
98989922
If <code>,R</code> is specified after <code><var>file_spec</var></code>, files are kept open; if not, all files are closed.
98999923
</p>
99009924
<h5>Parameters</h5>
@@ -9940,6 +9964,7 @@ <h4 id="SAVE"><code>SAVE</code></h4>
99409964
<li>
99419965
If <code><b>,A</b></code> is specified, the program will be saved in plain text format.
99429966
In this case, program execution will stop and control will be returned to the user.
9967+
Any further statements on teh line will be ignored, also in direct mode.
99439968
</li>
99449969
<li>
99459970
If <code><b>,P</b></code> is specified, the program will be saved in <a href="#protected-file-format">protected format</a>.

0 commit comments

Comments
 (0)