|
|
|
@@ -567,7 +567,7 @@ pre.rouge .ss {
|
|
|
|
|
<li><a href="#_but_operator">4.2. <code class="blue">but</code> operator</a></li>
|
|
|
|
|
<li><a href="#_assignment_operator">4.3. Assignment operator <code class="blue">=</code></a></li>
|
|
|
|
|
<li><a href="#_selector_operator">4.4. Selector operator <code class="blue">? : ::</code></a></li>
|
|
|
|
|
<li><a href="#_variable_default_value_and">4.5. Variable default value <code class="blue">??</code> and <code class="blue">?=</code></a></li>
|
|
|
|
|
<li><a href="#_variable_default_value_and">4.5. Variable default value <code class="blue">??</code>, <code class="blue">?=</code>, and <code class="blue">?!</code></a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
<li><a href="#_priorities_of_operators">5. Priorities of operators</a></li>
|
|
|
|
@@ -576,6 +576,7 @@ pre.rouge .ss {
|
|
|
|
|
<li><a href="#_expr_function_definition">6.1. <em>Expr</em> function definition</a></li>
|
|
|
|
|
<li><a href="#_golang_function_definition">6.2. <em>Golang</em> function definition</a></li>
|
|
|
|
|
<li><a href="#_function_calls">6.3. Function calls</a></li>
|
|
|
|
|
<li><a href="#_function_context">6.4. Function context</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
<li><a href="#_iterators">7. Iterators</a></li>
|
|
|
|
@@ -657,7 +658,7 @@ pre.rouge .ss {
|
|
|
|
|
<p>Function contexts are created by cloning the calling context. More details on this topic are given later in this document.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><em>Expr</em> creates and keeps a inner <em>global context</em> where it stores imported functions, either from builtin or plugin modules. To perform calculations, the calling program must provide its own context; this is the <em>main context</em>. All calculations take place in this context. As mentioned eralier, when a function is called, a new context is created by cloning the calling context. The created context can be called <em>function context</em>.</p>
|
|
|
|
|
<p><em>Expr</em> creates and keeps a inner <em>global context</em> where it stores imported functions, either from builtin or plugin modules. To perform calculations, the user program must provide its own context; this is the <em>main context</em>. All calculations take place in this context. As mentioned eralier, when a function is called, a new context is created by cloning the calling context. The created context can be called <em>function context</em>.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>Imported functions are registerd in the <em>global context</em>. When an expression first calls an imported function, that function is linked to the current context; this can be the <em>main context</em> or a <em>function context</em>.</p>
|
|
|
|
@@ -687,20 +688,20 @@ pre.rouge .ss {
|
|
|
|
|
<pre class="rouge highlight"><code data-lang="shell"><span class="c"># Type 'exit' or Ctrl+D to quit the program.</span>
|
|
|
|
|
|
|
|
|
|
<span class="o">[</span>user]<span class="nv">$ </span>./dev-expr
|
|
|
|
|
dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o">(</span>build 14<span class="o">)</span>,2024/06/17 <span class="o">(</span>celestino.amoroso@portale-stac.it<span class="o">)</span>
|
|
|
|
|
Based on the Expr package v0.19.0
|
|
|
|
|
dev-expr <span class="nt">--</span> Expressions calculator v1.12.0<span class="o">(</span>build 1<span class="o">)</span>,2024/09/14 <span class="o">(</span>celestino.amoroso@portale-stac.it<span class="o">)</span>
|
|
|
|
|
Based on the Expr package v0.26.0
|
|
|
|
|
Type <span class="nb">help </span>to get the list of available commands
|
|
|
|
|
See also https://git.portale-stac.it/go-pkg/expr/src/branch/main/README.adoc
|
|
|
|
|
<span class="o">>>></span> <span class="nb">help</span>
|
|
|
|
|
<span class="nt">---</span> REPL commands:
|
|
|
|
|
<span class="nb">source</span> <span class="nt">--</span> Load a file as input
|
|
|
|
|
<span class="nb">tty</span> <span class="nt">--</span> Enable/Disable ansi output <i class="conum" data-value="1"></i><b>(1)</b>
|
|
|
|
|
base <span class="nt">--</span> Set the integer output base: 2, 8, 10, or 16
|
|
|
|
|
<span class="nb">exit</span> <span class="nt">--</span> Exit the program
|
|
|
|
|
<span class="nb">help</span> <span class="nt">--</span> Show <span class="nb">command </span>list
|
|
|
|
|
ml <span class="nt">--</span> Enable/Disable multi-line output
|
|
|
|
|
mods <span class="nt">--</span> List <span class="nb">builtin </span>modules
|
|
|
|
|
output <span class="nt">--</span> Enable/Disable printing expression results. Options <span class="s1">'on'</span>, <span class="s1">'off'</span>, <span class="s1">'status'</span>
|
|
|
|
|
<span class="nb">source</span> <span class="nt">--</span> Load a file as input
|
|
|
|
|
<span class="nb">tty</span> <span class="nt">--</span> Enable/Disable ansi output <i class="conum" data-value="1"></i><b>(1)</b>
|
|
|
|
|
|
|
|
|
|
<span class="nt">---</span> Command line options:
|
|
|
|
|
<span class="nt">-b</span> <<span class="nb">builtin</span><span class="o">></span> Import <span class="nb">builtin </span>modules.
|
|
|
|
@@ -805,12 +806,12 @@ dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o
|
|
|
|
|
<p><span class="blue">Floats</span></p>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<p><span class="blue">Factions</span></p>
|
|
|
|
|
<p><span class="blue">Fractions</span></p>
|
|
|
|
|
</li>
|
|
|
|
|
</ol>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>In mixed operations involving integers, fractions and floats, automatic type promotion to the largest type take place.</p>
|
|
|
|
|
<p>In mixed operations involving integers, fractions and floats, automatic type promotion to the largest type is performed.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sect3">
|
|
|
|
|
<h4 id="_integers"><a class="anchor" href="#_integers"></a><a class="link" href="#_integers">2.1.1. Integers</a></h4>
|
|
|
|
@@ -855,33 +856,33 @@ dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">+</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>sum</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Sum</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Add two values</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">-1 + 2</code> → 1</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">-1 + 2</code> → <em>1</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">-</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>subtraction</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Subtraction</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Subtract the right value from the left one</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">3 - 1</code> → 2</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">3 - 1</code> → <em>2</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">*</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>product</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Product</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Multiply two values</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">-1 * 2</code> → -2</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">-1 * 2</code> → <em>-2</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">/</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Division</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Integer division</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Divide the left value by the right one<sup>(*)</sup></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">-10 / 2</code> → 5</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">-11 / 2</code> → <em>-5</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">%</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Modulo</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Remainder of the integer division</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">5 % 2</code> → 1</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">5 % 2</code> → <em>1</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
@@ -946,31 +947,31 @@ dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">+</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>sum</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Sum</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Add two values</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">4 + 0.5</code> → 4.5</p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">-</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>subtraction</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Subtraction</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Subtract the right value from the left one</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">4 - 0.5</code> → 3.5</p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">*</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>product</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Product</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Multiply two values</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">4 * 0.5</code> → 2.0</p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">/</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Division</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Float division</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Divide the left value by the right one</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">1.0 / 2</code> → 0.5</p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">./</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Float division</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Forced float division</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Force float division</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">-1 ./ 2</code> → -0.5</p></td>
|
|
|
|
|
</tr>
|
|
|
|
@@ -1074,7 +1075,7 @@ dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o
|
|
|
|
|
<code class="green">123    abc</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>Some arithmetic operators can also be used with strings.</p>
|
|
|
|
|
<p>Some arithmetic operators also apply to strings.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<table class="tableblock frame-all grid-all stretch">
|
|
|
|
|
<caption class="title">Table 3. String operators</caption>
|
|
|
|
@@ -1393,6 +1394,12 @@ dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">2 in [1,2,3]</code> → <em>true</em><br>
|
|
|
|
|
<code class="blue">6 in [1,2,3]</code> → <em>false</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">#</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Size</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Number of items in a list</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">#[1,2,3]</code> → <em>3</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
@@ -1415,11 +1422,19 @@ dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Items of list</div>
|
|
|
|
|
<div class="title">Examples: Getting items from lists</div>
|
|
|
|
|
<p><code>>>></code> <code class="blue">[1,2,3][1]</code><br>
|
|
|
|
|
<code class="green">2</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">index=2; ["a", "b", "c", "d"][index]</code><br>
|
|
|
|
|
<code class="green">c</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">["a", "b", "c", "d"][2:]</code><br>
|
|
|
|
|
<code class="green">["c", "d"]</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">list=[1,2,3]; list[1]</code><br>
|
|
|
|
|
<code class="green">2</code></p>
|
|
|
|
|
</div>
|
|
|
|
@@ -1432,6 +1447,10 @@ dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o
|
|
|
|
|
<code class="green">two</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">list[1]="six"; list</code><br>
|
|
|
|
|
<code class="green">["one", "six", "three"]</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">list[-1]</code><br>
|
|
|
|
|
<code class="green">three</code></p>
|
|
|
|
|
</div>
|
|
|
|
@@ -1440,22 +1459,42 @@ dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o
|
|
|
|
|
<code class="red">Eval Error: [1:9] index 10 out of bounds</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Example: Number of elements in a list</div>
|
|
|
|
|
<p><code>>>></code> <code class="blue">#list</code><br>
|
|
|
|
|
<code class="green">3</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">index=2; ["a", "b", "c", "d"][index]</code><br>
|
|
|
|
|
<code class="green">c</code></p>
|
|
|
|
|
<div class="title">Examples: Element insertion</div>
|
|
|
|
|
<p><code>>>></code> <code class="blue">"first" >> list</code><br>
|
|
|
|
|
<code class="green">["first", "one", "six", "three"]</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">["a", "b", "c", "d"][2:]</code><br>
|
|
|
|
|
<code class="green">["c", "d"]</code></p>
|
|
|
|
|
<p><code>>>></code> <code class="blue">list << "last"</code><br>
|
|
|
|
|
<code class="green">["first", "one", "six", "three", "last"]</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Examples: Element in list</div>
|
|
|
|
|
<p><code>>>></code> <code class="blue">"six" in list</code><br>
|
|
|
|
|
<code class="green">true</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">"ten" in list</code><br>
|
|
|
|
|
<code class="green">false</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Examples: Concatenation and filtering</div>
|
|
|
|
|
<p><code>>>></code> <code class="blue">[1,2,3] + ["one", "two", "three"]</code><br>
|
|
|
|
|
<code class="green">[1, 2, 3, "one", "two", "three"]</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">[1,2,3,4] - [2,4]</code><br>
|
|
|
|
|
<code class="green">[1, 3]</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sect2">
|
|
|
|
|
<h3 id="_dictionaries"><a class="anchor" href="#_dictionaries"></a><a class="link" href="#_dictionaries">2.5. Dictionaries</a></h3>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>The <em>dictionary</em>, or <em>dict</em>, data-type is set of pairs <em>key/value</em>. It is also known as <em>map</em> or <em>associative array</em>.</p>
|
|
|
|
|
<p>The <em>dictionary</em>, or <em>dict</em>, data-type represents sets of pairs <em>key/value</em>. It is also known as <em>map</em> or <em>associative array</em>.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>Dictionary literals are sequences of pairs separated by comma <code class="blue">,</code> enclosed between brace brackets.</p>
|
|
|
|
@@ -1514,6 +1553,12 @@ dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">"one" in {"one":1, "two":2}</code> → <em>true</em><br>
|
|
|
|
|
<code class="blue">"six" in {"one":1, "two":2}</code> → <em>false</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">#</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Size</em></p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Number of items in a dict</p></td>
|
|
|
|
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code class="blue">#{1:"a",2:"b",3:"c"}</code> → <em>3</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
@@ -1537,6 +1582,10 @@ dev-expr <span class="nt">--</span> Expressions calculator v1.10.0<span class="o
|
|
|
|
|
<p><code>>>></code> <code class="blue">d={"one":1, "two":2}; d["six"]=6; d</code><br>
|
|
|
|
|
<code class="green">{"two": 2, "one": 1, "six": 6}</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">#d</code><br>
|
|
|
|
|
<code class="green">3</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@@ -1582,7 +1631,7 @@ The assign operator <code class="blue">=</code> returns the value assigned to th
|
|
|
|
|
<code class="green">3</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">x = 5.2 * (9-3)</code> <em class="gray">// The assigned value has the typical approximation error of the float data-type</em><br>
|
|
|
|
|
<p><code>>>></code> <code class="blue">x = 5.2 * (9-3)</code> <em class="gray">// The assigned value here has the typical approximation error of the float data-type</em><br>
|
|
|
|
|
<code class="green">31.200000000000003</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
@@ -1751,9 +1800,9 @@ Technically <code class="blue">;</code> is not treated as a real operator. It ac
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sect2">
|
|
|
|
|
<h3 id="_variable_default_value_and"><a class="anchor" href="#_variable_default_value_and"></a><a class="link" href="#_variable_default_value_and">4.5. Variable default value <code class="blue">??</code> and <code class="blue">?=</code></a></h3>
|
|
|
|
|
<h3 id="_variable_default_value_and"><a class="anchor" href="#_variable_default_value_and"></a><a class="link" href="#_variable_default_value_and">4.5. Variable default value <code class="blue">??</code>, <code class="blue">?=</code>, and <code class="blue">?!</code></a></h3>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>The left operand of these two operators must be a variable. The right operator can be any expression. They return the value of the variable if this is defined; otherwise they return the value of the right expression.</p>
|
|
|
|
|
<p>The left operand of first two operators, <code class="blue">??</code> and <code class="blue">?=</code>, must be a variable. The right operator can be any expression. They return the value of the variable if this is defined; otherwise they return the value of the right expression.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="admonitionblock important">
|
|
|
|
|
<table>
|
|
|
|
@@ -1774,6 +1823,21 @@ If the left variable is defined, the right expression is not evaluated at all.
|
|
|
|
|
<p>The <code class="blue">?=</code> assigns the calculated value of the right expression to the left variable.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>The third one, <code class="blue">?!</code>, is the alternate operator. If the variable on the left size is not defined, it returns <em class="blue">nil</em>. Otherwise it returns the result of the expressione on the right side.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="admonitionblock important">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="icon">
|
|
|
|
|
<i class="fa icon-important" title="Important"></i>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="content">
|
|
|
|
|
If the left variable is NOT defined, the right expression is not evaluated at all.
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Examples</div>
|
|
|
|
|
<p><code>>>></code> <code class="blue">var ?? (1+2)</code><br>
|
|
|
|
|
<code class="green">3</code></p>
|
|
|
|
@@ -1790,6 +1854,18 @@ If the left variable is defined, the right expression is not evaluated at all.
|
|
|
|
|
<p><code>>>></code> <code class="blue">var</code><br>
|
|
|
|
|
<code class="green">3</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">x ?! 5</code><br>
|
|
|
|
|
<code class="green">nil</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">x=1; x ?! 5</code><br>
|
|
|
|
|
<code class="green">5</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <code class="blue">y ?! (c=5); c</code><br>
|
|
|
|
|
<code class="red">Eval Error: undefined variable or function "c"</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="admonitionblock note">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
@@ -1857,7 +1933,7 @@ These operators have a high priority, in particular higher than the operator <co
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>iterator</em> <code>++</code> → <em>any</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top" rowspan="2"><p class="tableblock"><strong>DEFAULT</strong></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top" rowspan="3"><p class="tableblock"><strong>DEFAULT</strong></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">??</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Infix</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Default value</em></p></td>
|
|
|
|
@@ -1870,11 +1946,10 @@ These operators have a high priority, in particular higher than the operator <co
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>variable</em> <code>?=</code> <em>any-expr</em> → <em>any</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><strong>ITER</strong><sup>1</sup></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">()</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Prefix</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Iterator value</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code>()</code> <em>iterator</em> → <em>any</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><code class="blue">?!</code></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Infix</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>Alternate value</em></p></td>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><em>variable</em> <code>?!</code> <em>any-expr</em> → <em>any</em></p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="tableblock halign-center valign-top"><p class="tableblock"><strong>FACT</strong></p></td>
|
|
|
|
@@ -2107,9 +2182,6 @@ These operators have a high priority, in particular higher than the operator <co
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><sup>1</sup> Experimental</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sect1">
|
|
|
|
@@ -2131,23 +2203,51 @@ These operators have a high priority, in particular higher than the operator <co
|
|
|
|
|
<div class="sect2">
|
|
|
|
|
<h3 id="_expr_function_definition"><a class="anchor" href="#_expr_function_definition"></a><a class="link" href="#_expr_function_definition">6.1. <em>Expr</em> function definition</a></h3>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>A function is identified and referenced by its name. It can have zero or more parameter. <em>Expr</em> functions also support optional parameters.</p>
|
|
|
|
|
<p>A function is identified and referenced by its name. It can have zero or more parameter. <em>Expr</em> functions also support optional parameters and passing paramters by name.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="exampleblock">
|
|
|
|
|
<div class="title">Example 14. Expr’s function definition syntax</div>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><strong><em>function-definition</em></strong> = <em>identifier</em> "<strong>=</strong>" "<strong>func(</strong>" [<em>param-list</em>] "<strong>)</strong>" "<strong>{</strong>" <em>multi-expression</em> "<strong>}</strong>"<br>
|
|
|
|
|
<em>param_list</em> = <em>required-param-list</em> [ "<strong>,</strong>" <em>optional-param-list</em> ]<br>
|
|
|
|
|
<p><strong><em>function-definition</em></strong> = <em>identifier</em> "<strong>=</strong>" "<strong>func(</strong>" [<em>formal-param-list</em>] "<strong>)</strong>" "<strong>{</strong>" <em>multi-expression</em> "<strong>}</strong>"<br>
|
|
|
|
|
<em>formal-param_list</em> = <em>required-param-list</em> [ "<strong>,</strong>" <em>optional-param-list</em> ]<br>
|
|
|
|
|
<em>required-param-list</em> = <em>identifier</em> { "<strong>,</strong>" <em>identifier</em> }<br>
|
|
|
|
|
<em>optional-param-list</em> = <em>optional-parm</em> { "<strong>,</strong>" <em>optional-param</em> }<br>
|
|
|
|
|
<em>optional-param</em> = <em>identifier</em> "<strong>=</strong>" <em>any-expr</em></p>
|
|
|
|
|
<em>optional-param</em> = <em>param-name</em> "<strong>=</strong>" <em>any-expr</em><br>
|
|
|
|
|
<em>param-name</em> = <em>identifier</em></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Examples</div>
|
|
|
|
|
<p><mark>TODO</mark></p>
|
|
|
|
|
<p><code>>>></code> <em class="gray">// A simple function: it takes two parameters and returns their "sum"</em><strong><sup>(*)</sup></strong><br>
|
|
|
|
|
<code>>>></code> <code class="blue">sum = func(a, b){ a + b }</code><br>
|
|
|
|
|
<code class="green">sum(a, b):any{}</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><sup>(*)</sup> Since the plus, *+*, operator is defined for multiple data-types, the <em>sum()</em> function can be used for any pair of that types.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <em class="gray">// A more complex example: recursive calculation of the n-th value of Fibonacci’s sequence</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">fib = func(n){ n ? [0] {0}: [1] {1} :: {fib(n-1)+fib(n-2)} }</code><br>
|
|
|
|
|
<code class="green">fib(n):any{}</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <em class="gray">// Same function fib() but entered by splitting it over mulple text lines</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">fib = func(n){ \</code><br>
|
|
|
|
|
<code>...</code> <code class="blue">  n ? \</code><br>
|
|
|
|
|
<code>...</code> <code class="blue">    [0] {0} : \</code><br>
|
|
|
|
|
<code>...</code> <code class="blue">    [1] {1} :: \</code><br>
|
|
|
|
|
<code>...</code> <code class="blue">    { \</code><br>
|
|
|
|
|
<code>...</code> <code class="blue">      fib(n-1) + fib(n-2) \</code><br>
|
|
|
|
|
<code>...</code> <code class="blue">    } \</code><br>
|
|
|
|
|
<code>...</code> <code class="blue">}</code><br>
|
|
|
|
|
<code class="green">fib(n):any{}</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><code>>>></code> <em class="gray">// Required and optional parameters</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">measure = func(value, unit="meter"){ value + " " + unit + (value > 1) ? [true] {"s"} :: {""}}</code><br>
|
|
|
|
|
<code class="green">measure(value, unit="meter"):any{}</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sect2">
|
|
|
|
@@ -2159,10 +2259,138 @@ These operators have a high priority, in particular higher than the operator <co
|
|
|
|
|
<div class="sect2">
|
|
|
|
|
<h3 id="_function_calls"><a class="anchor" href="#_function_calls"></a><a class="link" href="#_function_calls">6.3. Function calls</a></h3>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><mark>TODO: function calls operations</mark></p>
|
|
|
|
|
<p>To call a function, either Expr or Golang type, it is necessary to specify its name and, at least, its required parameters.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="exampleblock">
|
|
|
|
|
<div class="title">Example 15. Function invocation syntax</div>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p><strong><em>function-call</em></strong> = <em>identifier</em> "<strong>(</strong>" <em>actual-param-list</em> "<strong>)</strong>"<br>
|
|
|
|
|
<em>actual-param-list</em> = [<em>positional-params</em>] [<em>named-parameters</em>]<br>
|
|
|
|
|
<em>positional-params</em> = <em>any-value</em> { "<strong>,</strong>" <em>any-value</em> }<br>
|
|
|
|
|
<em>named-params</em> = <em>param-name</em> "<strong>=</strong>" <em>any-value</em> { "<strong>,</strong>" <em>param-name</em> "<strong>=</strong>" <em>any-value</em> }<br>
|
|
|
|
|
<em>param-name</em> = <em>identifier</em></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>Functions compute values in a local context (scope) that do not make effects on the calling context. This is the normal behavior. Using the reference operator <code class="blue">@</code> it is possibile to export local definition to the calling context.</p>
|
|
|
|
|
<div class="title">Examples of calling the <code>sum()</code> functions defined above</div>
|
|
|
|
|
<p><code>>>></code> <em class="gray">// sum of two integers</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">sum(-6, 2)</code><br>
|
|
|
|
|
<code class="green">-4</code><br>
|
|
|
|
|
<code>>>></code> <em class="gray">// same as above but passing the parameters by name</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">sum(a=-6, b=2)</code><br>
|
|
|
|
|
<code class="green">-4</code><br>
|
|
|
|
|
<code>>>></code> <em class="gray">// again, but swapping parameter positions (see the diff() examples below)</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">sum(b=2, a=-6)</code><br>
|
|
|
|
|
<code class="green">-4</code><br>
|
|
|
|
|
<code>>>></code> <em class="gray">// sum of a fraction and an integer</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">sum(3|2, 2)</code><br>
|
|
|
|
|
<code class="green">7|2</code><br>
|
|
|
|
|
<code>>>></code> <em class="gray">// sum of two strings</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">sum("bye", "-bye")</code><br>
|
|
|
|
|
<code class="green">"bye-bye"</code><br>
|
|
|
|
|
<code>>>></code> <em class="gray">// sum of two lists</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">sum(["one", 1], ["two", 2])</code><br>
|
|
|
|
|
<code class="green">["one", 1, "two", 2]</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Examples of calling a function with parameters passed by name</div>
|
|
|
|
|
<p><code>>>></code> <em class="gray">// diff(a,b) calculates a-b</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">diff = func(a,b){a-b}</code><br>
|
|
|
|
|
<code class="green">diff(a, b):any{}</code><br>
|
|
|
|
|
<code>>>></code> <em class="gray">// simple invocation</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">diff(10,8)</code><br>
|
|
|
|
|
<code class="green">2</code><br>
|
|
|
|
|
<code>>>></code> <em class="gray">// swapped parameters passed by name</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">diff(b=8,a=10)</code><br>
|
|
|
|
|
<code class="green">2</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Examples of calling the <code>fib()</code> function defined above</div>
|
|
|
|
|
<p><code>>>></code> <em class="gray">// Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …​</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">fib(6)</code><br>
|
|
|
|
|
<code class="green">8</code><br>
|
|
|
|
|
<code>>>></code> <code class="blue">fib(9)</code><br>
|
|
|
|
|
<code class="green">34</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Examples of calling the <code>measure()</code> functions defined above</div>
|
|
|
|
|
<p><code>>>></code> <em class="gray">// simple call</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">measure(10,"litre")</code><br>
|
|
|
|
|
<code class="green">"10 litres"</code><br>
|
|
|
|
|
<code>>>></code> <em class="gray">// accept the default unit</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">measure(8)</code><br>
|
|
|
|
|
<code class="green">"8 meters"</code><br>
|
|
|
|
|
<code>>>></code> <em class="gray">// without the required parameter 'value'</em><br>
|
|
|
|
|
<code>>>></code> <code class="blue">measure(unit="degrees"))</code><br>
|
|
|
|
|
<code class="red">Eval Error: measure(): missing params — value</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Examples of context binding (closures)</div>
|
|
|
|
|
<p><code>>>></code> <code class="blue">factory = func(n=2){ func(x){x*n} }</code><br>
|
|
|
|
|
<code class="green">factory(n=2):any{}</code><br>
|
|
|
|
|
<code>>>></code> <code class="blue">double = factory()</code><br>
|
|
|
|
|
<code class="green">double(x):any{}</code><br>
|
|
|
|
|
<code>>>></code> <code class="blue">triple = factory(3)</code><br>
|
|
|
|
|
<code class="green">triple(x):any{}</code><br>
|
|
|
|
|
<code>>>></code> <code class="blue">double(5)</code><br>
|
|
|
|
|
<code class="green">10</code><br>
|
|
|
|
|
<code>>>></code> <code class="blue">triple(5)</code><br>
|
|
|
|
|
<code class="green">15</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sect2">
|
|
|
|
|
<h3 id="_function_context"><a class="anchor" href="#_function_context"></a><a class="link" href="#_function_context">6.4. Function context</a></h3>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>Functions compute values in a local context (scope) that do not make effects on the calling context. This is the normal behavior. Using the <em>clone</em> modifier <code class="blue">@</code> it is possibile to export local definition to the calling context. The clone modifier must be used as prefix to variable names and it is part of the name. E.g. <code class="blue">@x</code> is not the same as <code class="blue">x</code>; they are two different and un related variables.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>Clone variables are normal local variables. The only diffence will appear when the defining function terminate, just before the destruction of its local context. At that point, all local clone variables are cloned in the calling context with the same names but the <code class="blue">@</code> symbol.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Example</div>
|
|
|
|
|
<p><code>>>></code> <code class="blue">f = func() { @x = 3; x = 5 }</code> <em class="gray">// f() declares two <strong>different</strong> local variables: <code>@x</code> and <code>x</code></em><br>
|
|
|
|
|
<code class="green">f():any{}</code><br>
|
|
|
|
|
<code>>>></code> <code class="blue">f()</code> <em class="gray">// The multi-expression (two) in f() is calculated and the last result is returned</em><br>
|
|
|
|
|
<code class="green">5</code><br>
|
|
|
|
|
<code>>>></code> <code class="blue">x</code> <em class="gray">// The <code>x</code> variable was not defined in the main context before the f() invocation. It appears in the main context by cloning the <code>@x</code> variable, local to f() after its termnation.</em><br>
|
|
|
|
|
<code class="green">3</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="admonitionblock note">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="icon">
|
|
|
|
|
<i class="fa icon-note" title="Note"></i>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="content">
|
|
|
|
|
The clone modifier <code class="blue">@</code> does not make a variable a reference variable, as the ampersand character <code>&</code> does in languages such as C and C++.
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="admonitionblock important">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="icon">
|
|
|
|
|
<i class="fa icon-important" title="Important"></i>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="content">
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<p>The clone modifier can also be used to declare the formal parameters of functions, because they are local variables too.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paragraph">
|
|
|
|
|
<div class="title">Example</div>
|
|
|
|
|
<p><code>>>></code> <code class="blue">g = func(@p) {2+@p}</code>
|
|
|
|
|
g(@p):any{}`
|
|
|
|
|
<code>>>></code> <code class="blue">g(9)</code>
|
|
|
|
|
11`
|
|
|
|
|
<code>>>></code> [blue]`p
|
|
|
|
|
9</p>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@@ -2204,7 +2432,7 @@ These operators have a high priority, in particular higher than the operator <co
|
|
|
|
|
</div>
|
|
|
|
|
<div id="footer">
|
|
|
|
|
<div id="footer-text">
|
|
|
|
|
Last updated 2024-09-12 06:56:30 +0200
|
|
|
|
|
Last updated 2024-09-30 07:29:03 +0200
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|