blob: f7e35b4efee8690e793cee4efdbf766ecad78a8a [file] [log] [blame]
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="../css/ot.css" />
<link rel="stylesheet" type="text/css" href="../css/otjld.css" />
<title>OT/J Language Definition v1.3</title>
</head>
<body class="otdt">
<div id="content">
<table class="nav">
<tr>
<td class="back"><a id="top"></a></td>
<td class="top"><a href="index.html" rel="contents">&uarr;&nbsp;Table of Contents&nbsp;&uarr;</a></td>
<td class="next"><a href="s4.8.b.html" rel="next">&sect;4.8.(b)&nbsp;Qualified and unqualified names&nbsp;&gt;&gt;</a></td>
</tr>
</table>
<div class="breadcrumb"><a class="nav" href="s4.html" rel="section">&sect;4&nbsp;Callin Binding</a>&nbsp;&gt;&nbsp;<a class="nav" href="s4.8.html" rel="section">&sect;4.8&nbsp;Callin precedence</a></div>
<div class="subsect depth3" id="s4.8.a">
<h4 class="subsect">&sect;4.8.(a)&nbsp;<span class="title">Precedence declaration</span><a class="img" href="s4.8.a.html"
title="PermaLink to (a)&nbsp;Precedence declaration"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png"
alt="" /></a></h4>
<p>A precedence declaration consists of the keyword <code>precedence</code> followed by
a list of names referring to callin bindings (see <a href="s4.1.e.html" title="&sect;4.1.(e)&nbsp;Named callin binding"
class="sect">&sect;4.1.(e)</a> for named callin bindings).
</p>
<div class="listing plain"><pre><b>precedence</b> callinBinding1, callinBinding2;</pre></div>
<p>
A precedence declaration is only legal within a role or team class.<br />
The order of elements in a precedence declaration determines their <strong>priority</strong> during dispatch,
similar to priorities based on activation of several team instances (<a href="s5.1.html" title="&sect;5.1&nbsp;Effect of team activation"
class="sect">&sect;5.1</a>).
This means that <code>before</code> and <code>replace</code> binding with highest priority trigger first,
whereas <code>after</code> bindings with highest priority trigger last.
For binding precedences (as opposed to class based precedence, see <a href="s4.8.c.html" title="&sect;4.8.(c)&nbsp;Class based precedence"
class="sect">&sect;4.8.(c)</a> below)
which refer to <code>after</code> bindings, the precedence declaration must also use the <code>after</code> keyword
to remind the programmer that the execution order is inverse to the textual order.
</p>
<div class="listing plain"><pre><b>precedence</b> <b>after</b> importantExecuteLast, lessImportantExecuteEarlier;</pre></div>
</div>
<table class="nav">
<tr>
<td class="back"></td>
<td class="top"><a href="index.html" rel="contents">&uarr;&nbsp;Table of Contents&nbsp;&uarr;</a></td>
<td class="next"><a href="s4.8.b.html" rel="next">&sect;4.8.(b)&nbsp;Qualified and unqualified names&nbsp;&gt;&gt;</a></td>
</tr>
</table>
<div class="breadcrumb"><a class="nav" href="s4.html" rel="section">&sect;4&nbsp;Callin Binding</a>&nbsp;&gt;&nbsp;<a class="nav" href="s4.8.html" rel="section">&sect;4.8&nbsp;Callin precedence</a></div>
</div>
<div id="footer">
<hr /><a class="w3c img" href="http://jigsaw.w3.org/css-validator/check/referer"
shape="rect"><img src="../images/valid-css2-blue.png" alt="Valid CSS!" height="31" width="88" /></a><a class="w3c img" href="http://validator.w3.org/check?uri=referer" shape="rect"><img src="../images/valid-xhtml10-blue.png" alt="Valid XHTML 1.0 Strict" height="31"
width="88" /></a><address>&copy; Stephan Herrmann, Christine Hundt, Marco Mosconi</address>
OT/J version 1.3 &mdash; last modified: 2011-05-12
</div>
</body>
</html>