Skip to content

Commit

Permalink
Style fixes. Should work better on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrik-rambris committed Feb 15, 2024
1 parent e2902c4 commit fb15f1a
Show file tree
Hide file tree
Showing 48 changed files with 621 additions and 588 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
*.iml
20 changes: 10 additions & 10 deletions 05-01-the-bare-bones.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ <h2>Storing variables</h2>

<!-- section -->

<h3 id="i-set-buffer">SET BUFFER</h3>
<h3 class="command" id="i-set-buffer">SET BUFFER</h3>
<p><i>instruction: set the size of the variable area</i><BR>
<b>Set Buffer</b> number of kilobytes</P>

Expand All @@ -255,7 +255,7 @@ <h2>Arrays</h2>
Professional the size of the table of variables needed for your array. There is a special command for
setting up this dimension.</P>

<h3 id="i-dim">DIM</h3>
<h3 class="command" id="i-dim">DIM</h3>
<p><i>instruction: dimension an array</i><BR>
<b>Dim</b> variable name(number,number,number...)</P>

Expand Down Expand Up @@ -335,7 +335,7 @@ <h2>Functions</h2>
"functions". These are command words that have one thing in common: they all work with numbers in
order to give a result.</P>

<h3 id="fn-free">FREE</h3>
<h3 class="command" id="fn-free">FREE</h3>
<p><i>function: give the amount of free memory in the variable buffer area</i><br>
memory=<b>Free</b></P>

Expand All @@ -360,7 +360,7 @@ <h3 id="fn-free">FREE</h3>
programs, and they can be used to compute commonly used values very quickly and very
simply.</P>

<h3 id="str-def-fn">DEF FN</h3>
<h3 class="command" id="str-def-fn">DEF FN</h3>
<p><i>structure: create a user-defined function</i><BR>
<b>Def Fn</b> name (list of variables)=expression</P>

Expand All @@ -378,7 +378,7 @@ <h3 id="str-def-fn">DEF FN</h3>
When a user-defined function is called up my variables that are entered with it will be
substituted in the appropriate positions, as demonstrated below.</p>

<h3 id="str-fn">FN</h3>
<h3 class="command" id="str-fn">FN</h3>
<p><i>structure: call a user-defined function</i><BR>
<b>Fn</b> name(list of variables)</p>

Expand Down Expand Up @@ -467,7 +467,7 @@ <h2>Controlling a program skeleton</h2>
Print "I am the next instruction."
</pre>

<h3 id="i-end">END</h3>
<h3 class="command" id="i-end">END</h3>
<p><i>instruction: end the current program</i><BR>
<b>End</b></P>

Expand All @@ -483,7 +483,7 @@ <h3 id="i-end">END</h3>
Print "This instruction will never be executed!"
</pre>

<h3 id="i-stop">STOP</h3>
<h3 class="command" id="i-stop">STOP</h3>
<p><i>instruction: interrupt the current program</i><BR>
<b>Stop</b></P>

Expand All @@ -496,7 +496,7 @@ <h3 id="i-stop">STOP</h3>
Print "I have been abandoned"
</pre>

<h3 id="i-edit">EDIT</h3>
<h3 class="command" id="i-edit">EDIT</h3>
<p><i>instruction: leave current program and return to Edit Screen</i><BR>
<b>Edit</b></P>

Expand All @@ -510,7 +510,7 @@ <h3 id="i-edit">EDIT</h3>
Print "I have been ignored!"
</pre>

<h3 id="i-direct">DIRECT</h3>
<h3 class="command" id="i-direct">DIRECT</h3>
<p><i>instruction: leave current program and return to Direct Mode</i><BR>
<b>Direct</b></P>

Expand Down Expand Up @@ -605,7 +605,7 @@ <h2>Marking the bones of a program</h2>
typed messages to remind yourself exactly what this section of program is for. These
little comments or messages are known as "Rem statements".</P>

<h3 id="str-rem">REM</h3>
<h3 class="command" id="str-rem">REM</h3>
<p><i>structure: insert a reminder message into a program</i><BR>
<b>Rem</b> Typed in statement<BR>
<b>'</b> Typed in statement</P>
Expand Down
34 changes: 17 additions & 17 deletions 05-02-string-functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h1>String Functions</h1>
<section id="01-reading-characters-in-a-string">
<h2>Reading characters in a string</h2>

<h3 id="fn-left-dollar">LEFT$</h3>
<h3 class="command" id="fn-left-dollar">LEFT$</h3>
<p><i>function: return the leftmost characters of a string</i><BR>
destination$=<b>Left$</b>(source$,number)<BR>
<b>Left$</b>(destination$,number)=source$</P>
Expand Down Expand Up @@ -67,7 +67,7 @@ <h3 id="fn-left-dollar">LEFT$</h3>
<P>Exactly the same processes can be performed with characters from the right-hand side of
a string, by using the equivalent RIGHT$ function.</P>

<h3 id="fn-right-dollar">RIGHT$</h3>
<h3 class="command" id="fn-right-dollar">RIGHT$</h3>
<p><i>function: return the rightmost characters of a string</i><BR>
destination$=<b>Right$</b>(source$,number)<BR>
<b>Right$</b>(destination$,number)=source$</P>
Expand All @@ -87,7 +87,7 @@ <h3 id="fn-right-dollar">RIGHT$</h3>
</PRE>

<!-- section -->
<h3 id="fn-mid-dollar">MID$</h3>
<h3 class="command" id="fn-mid-dollar">MID$</h3>
<p><i>function: return a number of characters from the middle of a string</i><br>
destination$=<b>Mid$</b>(source$,offset,number)<BR>
<b>Mid$</b>(destination$,offset,number)=source$</P>
Expand Down Expand Up @@ -117,7 +117,7 @@ <h2>Finding characters in a string</h2>
other words, to search through strings for individual characters or sub-strings. Similarly, you may
wish to write an adventure game where lines of text must be broken down into individual commands.</p>

<h3 id="fn-instr">INSTR</h3>
<h3 class="command" id="fn-instr">INSTR</h3>
<p><i>function: search for occurrences of one string within another string</i><br>
x=<b>Instr</b>(host$,guest$)<BR>
x=<b>Instr</b>(host$,guest$,start of search position)</P>
Expand Down Expand Up @@ -163,7 +163,7 @@ <h3 id="fn-instr">INSTR</h3>
<section id="03-converting-strings">
<h2>Converting strings</h2>

<h3 id="fn-upper-dollar">UPPER$</h3>
<h3 class="command" id="fn-upper-dollar">UPPER$</h3>
<p><i>function: convert a string of text to upper case</i><BR>
new$=<b>Upper$</b>(old$)</P>

Expand All @@ -174,7 +174,7 @@ <h3 id="fn-upper-dollar">UPPER$</h3>
D&gt; Print Upper$("aMoS pRoFeSsIoNaL")
</pre>

<h3 id="fn-lower-dollar">LOWER$</h3>
<h3 class="command" id="fn-lower-dollar">LOWER$</h3>
<p><i>function: convert a string of text to lower case</i><BR>
new$=<b>Lower$</b>(old$)</P>

Expand All @@ -190,7 +190,7 @@ <h3 id="fn-lower-dollar">LOWER$</h3>
Print "OK. Continuing with your program"
</pre>

<h3 id="fn-str-dollar">STR$</h3>
<h3 class="command" id="fn-str-dollar">STR$</h3>
<p><i>function: convert a number into a string</i><BR>
s$=<b>Str$</b>(number)</P>

Expand All @@ -203,7 +203,7 @@ <h3 id="fn-str-dollar">STR$</h3>
E&gt; Centre "Remaining memory is"+Str$(Chip Free)+" Bytes"
</pre>

<h3 id="fn-val">VAL</h3>
<h3 class="command" id="fn-val">VAL</h3>
<p><i>function: convert a string of digits into a number</i><BR>
v=<b>Val</b>(x$)<BR>
v#=<b>Val</b>(x$)</P>
Expand All @@ -217,7 +217,7 @@ <h3 id="fn-val">VAL</h3>
D&gt; X=Val("1234") : Print X
</pre>

<h3 id="fn-string-dollar">STRING$</h3>
<h3 class="command" id="fn-string-dollar">STRING$</h3>
<p><i>function: create a new string from an existing string</i><BR>
new$=<b>String$</b>(existing$, number)</P>

Expand All @@ -240,7 +240,7 @@ <h2>Manipulating strings</h2>
wish to pad out a piece of text before it gets printed onto the screen, you will need an
accurate method of creating spaces in the string.</p>

<h3 id="fn-space-dollar">SPACE$</h3>
<h3 class="command" id="fn-space-dollar">SPACE$</h3>
<p><i>function: space out a string</i><BR>
s$=<b>Space$</b>(number of spaces)</P>

Expand All @@ -250,7 +250,7 @@ <h3 id="fn-space-dollar">SPACE$</h3>
E&gt; Print "Ten";Space$(10);"spaces"
</pre>

<h3 id="fn-flip-dollar">FLIP$</h3>
<h3 class="command" id="fn-flip-dollar">FLIP$</h3>
<p><i>function: invert a string</i><BR>
inverted$=<b>Flip$</b>(original$)</P>

Expand All @@ -261,7 +261,7 @@ <h3 id="fn-flip-dollar">FLIP$</h3>
D&gt; Print Flip$("SOMA gnippilf")
</pre>

<h3 id="fn-repeat-dollar">REPEAT$</h3>
<h3 class="command" id="fn-repeat-dollar">REPEAT$</h3>
<p><i>function: repeat a string</i><BR>
r$=<b>Repeat$</b>(text$,number)</P>

Expand All @@ -280,7 +280,7 @@ <h3 id="fn-repeat-dollar">REPEAT$</h3>
<h2>Getting information about strings</h2>
The next three functions are provided to discover particular properties of strings.</P>

<h3 id="fn-chr-dollar">CHR$</h3>
<h3 class="command" id="fn-chr-dollar">CHR$</h3>
<p><i>function: return the character with a given ASCII code</i><BR>
s$=<b>Chr$</b>(code number)</P>

Expand All @@ -294,7 +294,7 @@ <h3 id="fn-chr-dollar">CHR$</h3>
E&gt; For S=32 To 255: Print Chr$(S); : Next S
</pre>

<h3 id="fn-asc">ASC</h3>
<h3 class="command" id="fn-asc">ASC</h3>
<p><i>function: Give the ASCII code of a character</i><BR>
code=<b>Asc</b>(a$)</P>

Expand All @@ -306,7 +306,7 @@ <h3 id="fn-asc">ASC</h3>
Print Asc("AMOS Professional")
</pre>

<h3 id="fn-len">LEN</h3>
<h3 class="command" id="fn-len">LEN</h3>
<p><i>function: give the length of a string</i><BR>
length=<b>Len</b>(a$)</P>

Expand All @@ -323,7 +323,7 @@ <h2>Array operations</h2>

<P>To end this Chapter, here are a pair of useful instructions for manipulating arrays.</P>

<h3 id="i-sort">SORT</h3>
<h3 class="command" id="i-sort">SORT</h3>
<p><i>instruction: sort all elements in an array</i><BR>
<b>Sort</b> a(0)<BR>
<b>Sort</b> a#(0)<BR>
Expand Down Expand Up @@ -356,7 +356,7 @@ <h3 id="i-sort">SORT</h3>
Next X
</pre>

<h3 id="fn-match">MATCH</h3>
<h3 class="command" id="fn-match">MATCH</h3>
<p><i>function: search an array for a value</i><BR>
x=<b>Match</b>(array(0),value)<br>
x=<b>Match</b>(array#(0),value#)<br>
Expand Down
Loading

0 comments on commit fb15f1a

Please sign in to comment.