<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="BETA (programming language) - Page 7 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=BETA_(programming_language)&amp;p=6">1.Previous</a><br />
<a accesskey="3" href="page.php?w=BETA_%28programming_language%29&amp;p=8">3.Next</a>
</p>
<p>a function could be written using a pattern</p>

<p><syntaxhighlight lang="pascal">max: (#    x, y, z: @integerenter (x, y)do    (if x >= y // True then        x -> z    else        y -> z    if)exit z<br/>
#)</syntaxhighlight>The x, y and z are local variables. The <b>enter</b> keyword specifies the input parameters to the pattern, while the <b>exit</b> keyword specifies the result of the function. Between the two, the <b>do</b> keyword prefixes the sequence of operations to be made. The conditional block is delimited by (if and if), that is</p><p>
<a accesskey="1" href="page.php?w=BETA_(programming_language)&amp;p=6">1.Previous</a><br />
<a accesskey="3" href="page.php?w=BETA_%28programming_language%29&amp;p=8">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
