Reference: Add Operator Precedence table

This commit is contained in:
Joshua Bell 2022-01-12 17:32:34 -08:00
parent 513f07de62
commit 0f77241688

View File

@ -353,6 +353,21 @@ can be literals (unquoted strings), strings, or numbers
<dl> <dl>
<dt>+<dd>String Concatenation <dt>+<dd>String Concatenation
</dl> </dl>
<h3>Operator Precedence</h3>
<p>Operators are listed vertically in order of precedence, from highest to lowest. Operators are the same line are of the same priority, and in an expression are executed from left to right. This order differs from the order in some other dialects of BASIC, but does match Applesoft.
<ul style="list-style-type: none">
<li><code>( )</code>
<li><code>+ - NOT</code> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (unary operators)
<li><code>^</code>
<li><code>* /</code>
<li><code>+ -</code>
<li><code>= &lt; &gt; &lt;= =&lt; &gt;= =&gt; &lt;&gt; &gt;&lt;</code>
<li><code>AND</code>
<li><code>OR</code>
</ul>
</section> </section>
<section id="errorcodes"> <section id="errorcodes">