Skip to content
Snippets Groups Projects
Commit 51a3c607 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Documentation: Move operators to the Operators chapter.

They were hidden in the "The rest" chapter...

Also adds some minimal documentation of the **-operator.
parent 0383a651
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,10 @@ you remember from math in school. The arithmetic operators are:</p>
<c><expr>a % b</expr></c>
<c><expr>`%</expr></c>
<c>the remainder of a division between a and b</c></r>
<r><c>Exponentiation</c>
<c><expr>a ** b</expr></c>
<c><expr>`**</expr></c>
<c>the result of raising a to the b:th power</c></r>
</matrix>
<p>The third column, "Identifier" is the name of the function that actually
......@@ -258,6 +262,13 @@ float % int</code></c>
</matrix>
<insert-move entity="predef::.`+"/>
<insert-move entity="predef::.`-"/>
<insert-move entity="predef::.`*"/>
<insert-move entity="predef::.`/"/>
<insert-move entity="predef::.`%"/>
<insert-move entity="predef::.`**"/>
</section>
<section title="Comparison operators">
......@@ -316,6 +327,13 @@ to a float before the comparison. When comparing strings, lexical order is
used and the values of the environment variables <tt>LC_CTYPE</tt> and
<tt>LC_LANG</tt> are respected.</p>
<insert-move entity="predef::.`=="/>
<insert-move entity="predef::.`!="/>
<insert-move entity="predef::.`&gt;"/>
<insert-move entity="predef::.`&gt;="/>
<insert-move entity="predef::.`&lt;"/>
<insert-move entity="predef::.`&lt;="/>
</section>
<section title="Logical operators">
......@@ -323,8 +341,9 @@ used and the values of the environment variables <tt>LC_CTYPE</tt> and
<p>Logical operators are operators that operate with truth values. In Pike any value
except zero is considered <b>true</b>. Logical operators are a very basic part
of Pike. They can also decide which arguments to evaluate and which not to
evaluate. Because of this the logical operators do not have any identifiers and
can not be called as normal functions. There are four logical operators:</p>
evaluate. Because of this most of the logical operators do not have any
identifiers and can not be called as normal functions. There are four
logical operators:</p>
<matrix>
......@@ -353,6 +372,8 @@ can not be called as normal functions. There are four logical operators:</p>
</matrix>
<insert-move entity="predef::.`!"/>
</section>
<section title="Bitwise/set operators">
......@@ -420,6 +441,13 @@ the indices. If a particular index is present in both the right and left
argument to a set operator, the one from the right side will be used.
Example: <expr>([1:2]) | ([1:3])</expr> will return <expr>([1:3])</expr>.</p>
<insert-move entity="predef::.`&lt;&lt;"/>
<insert-move entity="predef::.`&gt;&gt;"/>
<insert-move entity="predef::.`~"/>
<insert-move entity="predef::.`&amp;"/>
<insert-move entity="predef::.`|"/>
<insert-move entity="predef::.`^"/>
</section>
<section title="Indexing">
......@@ -554,6 +582,12 @@ arguments to a suitable range. This means that
<li> No errors are generated in any of the above cases.</li>
</ul>
<insert-move entity="predef::.`[]"/>
<insert-move entity="predef::.`->"/>
<insert-move entity="predef::.`[]="/>
<insert-move entity="predef::.`->="/>
<insert-move entity="predef::.`[--]"/>
</section>
<!-- FIXME: tell more about indexing and ranges -->
......@@ -775,5 +809,7 @@ look at some examples:</p>
absolute value of a.</dd>
</dl>
<insert-move entity="predef::.`()"/>
</section>
</chapter>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment