  

<table class="width100" style="width:100%;" data-cellspacing="1">
<colgroup>
<col style="width: 16%" />
<col style="width: 16%" />
<col style="width: 16%" />
<col style="width: 16%" />
<col style="width: 16%" />
<col style="width: 16%" />
</colgroup>
<tbody>
<tr class="odd">
<td colspan="6" class="form-title"><div class="center">
ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
</div></td>
</tr>
<tr class="even">
<td colspan="6" class="form-title">View Issue Details</td>
</tr>
<tr class="odd">
<td colspan="6" class="print-spacer"><hr /></td>
</tr>
<tr class="even print-category">
<td class="print" width="16%">ID</td>
<td class="print" width="16%">Project</td>
<td class="print" width="16%">Category</td>
<td class="print" width="16%">View Status</td>
<td class="print" width="16%">Date Submitted</td>
<td class="print" width="16%">Last Update</td>
</tr>
<tr class="odd print">
<td class="print">0002108</td>
<td class="print">Part 01: TTCN-3 Core Language</td>
<td class="print">Editorial</td>
<td class="print">public</td>
<td class="print">05-10-2007 17:31</td>
<td class="print">12-03-2008 10:24</td>
</tr>
<tr class="even">
<td colspan="6" class="print-spacer"><hr /></td>
</tr>
<tr class="odd print">
<td class="print-category">Reporter</td>
<td class="print">Thomas DeiÃŸ</td>
<td colspan="4" class="print"> </td>
</tr>
<tr class="even print">
<td class="print-category">Assigned To</td>
<td class="print">Ina Schieferdecker</td>
<td colspan="4" class="print"> </td>
</tr>
<tr class="odd print">
<td class="print-category">Priority</td>
<td class="print">normal</td>
<td class="print-category">Severity</td>
<td class="print">minor</td>
<td class="print-category">Reproducibility</td>
<td class="print">N/A</td>
</tr>
<tr class="even print">
<td class="print-category">Status</td>
<td class="print">closed</td>
<td class="print-category">Resolution</td>
<td class="print">fixed</td>
<td colspan="2" class="print"> </td>
</tr>
<tr class="odd print">
<td class="print-category">Platform</td>
<td class="print"></td>
<td class="print-category">OS</td>
<td class="print"></td>
<td class="print-category">OS Version</td>
<td class="print"></td>
</tr>
<tr class="even print">
<td class="print-category">Product Version</td>
<td class="print">v3.2.1 (published 2007-02)</td>
<td colspan="4" class="print"> </td>
</tr>
<tr class="odd">
<td class="print-category">Target Version</td>
<td class="print">v3.3.2 (published 2008-04)</td>
<td class="print-category">Fixed in Version</td>
<td class="print">v3.3.2 (published 2008-04)</td>
<td colspan="2" class="print"> </td>
</tr>
<tr class="even print">
<td class="print-category">Clause Reference(s)</td>
<td colspan="4" class="print">5.4.1.1, 16.1.4</td>
<td></td>
</tr>
<tr class="odd print">
<td class="print-category">Source (company - Author)</td>
<td colspan="4" class="print">Thomas DeiÃŸ</td>
<td></td>
</tr>
<tr class="even">
<td colspan="6" class="print-spacer"><hr /></td>
</tr>
<tr class="odd print">
<td class="print-category">Summary</td>
<td colspan="5" class="print">0002108: Example uses function in template
with out parameter</td>
</tr>
<tr class="even print">
<td class="print-category">Description</td>
<td colspan="5" class="print">Example 2 in clause 5.4.1.1 uses a
function with an inout parameter inside a template definition. But this
is not allowed according to clause 16.1.4. item j).<br />
<br />
Proposed resolution: change the template in the example to a function
and adapt its usage (name changed from t_MyMessage to f_MyMessage)<br />
<br />
function f_MyMessage (integer p_int) return MyMessage {<br />
  var integer f1,f2;<br />
  f1 := f_mult2 (p_int),<br />
  // parameter p_int is passed on; as the parameter of the called
function f_mult2 is<br />
  // defined as an inout parameter, it passes back the changed value for
p_int,<br />
  f2 := p_int;<br />
  return {f1, f2};<br />
}<br />
<br />
...<br />
<br />
testcase tc_01 () runs on MTC_PT {<br />
    ...<br />
      P1.send (f_MyMessage(5))<br />
        // the value sent is { f1 := 9 , f2 := 10 }<br />
    ...<br />
    }<br />
<br />
<br />
<br />
</td>
</tr>
<tr class="odd print">
<td class="print-category">Steps To Reproduce</td>
<td colspan="5" class="print"></td>
</tr>
<tr class="even print">
<td class="print-category">Additional Information</td>
<td colspan="5" class="print">Note 1) The reason given that functions
with inout parameters cannot be used do not apply in this case, for
usage in boolean guards of alternatives they are fine. But inside a
template changes do not propagate outside the template, so there should
not be a problem of using them.<br />
Note 2) What is the evaluation order inside a template, is this fixed to
be top down? Or what is the order in case of a modified template? If
this is not fixed there might be unexpected results. Despite of note 1)
it might be best to keep the restriction in item j) to avoid
surprises.</td>
</tr>
<tr class="odd print">
<td class="print-category">Tags</td>
<td colspan="5" class="print">No tags attached.</td>
</tr>
<tr class="even print">
<td class="print-category">Relationships</td>
<td colspan="5" class="print"></td>
</tr>
<tr class="odd print">
<td class="print-category">Attached Files</td>
<td colspan="5" class="print"><img
src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif"
alt="doc" /> CR-2108-Example-Uses-Function-in-Template-with-out-Parameter-Resolution.doc
(210,944) <span class="italic">04-12-2007 16:19</span><br />
http://oldforge.etsi.org/mantis/file_download.php?file_id=1199&amp;type=bug</td>
</tr>
<tr class="even">
<td colspan="6" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="form-title">Issue History</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="even print-category">
<td class="row-category-history">Date Modified</td>
<td class="row-category-history">Username</td>
<td class="row-category-history">Field</td>
<td class="row-category-history">Change</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">05-10-2007 17:31</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas
DeiÃŸ</a></td>
<td class="print">New Issue</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">05-10-2007 17:31</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas
DeiÃŸ</a></td>
<td class="print">Clause Reference(s)</td>
<td class="print">=&gt; 5.4.1.1, 16.1.4</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">05-10-2007 17:31</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas
DeiÃŸ</a></td>
<td class="print">Source (company - Author)</td>
<td class="print">=&gt; Thomas DeiÃŸ</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">13-10-2007 19:06</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina
Schieferdecker</a></td>
<td class="print">Status</td>
<td class="print">new =&gt; assigned</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">13-10-2007 19:06</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina
Schieferdecker</a></td>
<td class="print">Assigned To</td>
<td class="print">=&gt; Ina Schieferdecker</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">13-10-2007 19:06</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina
Schieferdecker</a></td>
<td class="print">Assigned To</td>
<td class="print">Ina Schieferdecker =&gt; Jens Grabowski</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">18-10-2007 12:25</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina
Schieferdecker</a></td>
<td class="print">Target Version</td>
<td class="print">=&gt; Edition 3.3.1 (not yet published)</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">04-12-2007 16:19</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=82">Jens
Grabowski</a></td>
<td class="print">File Added:
CR-2108-Example-Uses-Function-in-Template-with-out-Parameter-Resolution.doc</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">04-12-2007 16:20</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=82">Jens
Grabowski</a></td>
<td class="print">Note Added: 0004281</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">04-12-2007 16:20</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=82">Jens
Grabowski</a></td>
<td class="print">Assigned To</td>
<td class="print">Jens Grabowski =&gt; Thomas DeiÃŸ</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">04-12-2007 16:20</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=82">Jens
Grabowski</a></td>
<td class="print">Resolution</td>
<td class="print">open =&gt; fixed</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">04-12-2007 16:54</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas
DeiÃŸ</a></td>
<td class="print">Note Added: 0004287</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">04-12-2007 16:54</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas
DeiÃŸ</a></td>
<td class="print">Assigned To</td>
<td class="print">Thomas DeiÃŸ =&gt; Ina Schieferdecker</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">04-12-2007 16:54</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas
DeiÃŸ</a></td>
<td class="print">Status</td>
<td class="print">assigned =&gt; resolved</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">05-12-2007 17:11</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina
Schieferdecker</a></td>
<td class="print">Status</td>
<td class="print">resolved =&gt; closed</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">05-12-2007 17:11</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=81">Ina
Schieferdecker</a></td>
<td class="print">Fixed in Version</td>
<td class="print">=&gt; Edition 3.3.1 (not yet published)</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">12-03-2008 10:22</td>
<td class="print">user10</td>
<td class="print">Fixed in Version</td>
<td class="print">Edition 3.3.1 --will not be published, see 3.3.2 =&gt;
Edition 3.3.2 (not yet published)</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">12-03-2008 10:24</td>
<td class="print">user10</td>
<td class="print">Target Version</td>
<td class="print">Edition 3.3.1 --will not be published, see 3.3.2 =&gt;
Edition 3.3.2 (not yet published)</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>

  

<table class="width100" data-cellspacing="1">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr class="odd">
<td colspan="2" class="form-title">Notes</td>
</tr>
<tr class="even">
<td colspan="2" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="nopad" data-valign="top" width="20%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">(0004281)</td>
</tr>
<tr class="even">
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=82">Jens
Grabowski</a>   </td>
</tr>
<tr class="odd">
<td class="print">04-12-2007 16:20   </td>
</tr>
</tbody>
</table></td>
<td class="nopad" data-valign="top" width="85%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">Resolution follows the proposal of the submitter.
Assigned to Thomas for crosschecking.</td>
</tr>
</tbody>
</table></td>
</tr>
<tr class="even">
<td colspan="2" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="nopad" data-valign="top" width="20%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">(0004287)</td>
</tr>
<tr class="even">
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=112">Thomas
DeiÃŸ</a>   </td>
</tr>
<tr class="odd">
<td class="print">04-12-2007 16:54   </td>
</tr>
</tbody>
</table></td>
<td class="nopad" data-valign="top" width="85%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">checked by Thomas: Ok</td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
