ETSI's Bug Tracker - Part 01: TTCN-3 Core Language | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000416 | Part 01: TTCN-3 Core Language | Clarification | public | 24-11-2006 14:34 | 12-03-2008 10:24 |
Reporter | Stephan Schulz | ||||
Assigned To | Ina Schieferdecker | ||||
Priority | high | Severity | block | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | v3.1.1 (published 2005-06) | ||||
Target Version | v3.3.2 (published 2008-04) | Fixed in Version | v3.3.2 (published 2008-04) | ||
Clause Reference(s) | - | ||||
Source (company - Author) | dr. György Réthy, Ericsson | ||||
Summary | 0000416: Passing omit to value formal parameters | ||||
Description | The TTCN-3 standard today does not defines the term "value". In common sense value means "In computer science, a value may be a number, literal string, array and anything that can be treated as if it were a number. ... The exact definition varies across programming languages." (from the English Wikipedia, Value (computer science) item). "Nothing" is not a value, i.e. omit should not be considered as value in TTCN-3. This meaning is strengthened by the TTCN-3 standard, where omit is mentioned as a matching mechanism (though it can also be PART of a value, i.e. assigned to optional fields. Titan follows this approach and allows to pass real specific values to value parameters only but not omit. This provides a big advantage: it is sufficient to check the "value" of a value formal parameter when it is passed, no need for subsequent checks when it is used e.g. in expressions. However, in many cases it would be useful to allow formal parameters accepting specific values and omit, e.g. when this parameter is passed to optional template fields in sending operations. | ||||
Steps To Reproduce | |||||
Additional Information | It is proposed to make a distinction between value formal parameters allowing omit and not allowing omit in the TTCN-3 language. Formal parameters To denote that the special value omit is allowed for a value formal parameter, the optional keyword shall be used in the formal parameter list of test cases, functions, altsteps or templates. In the testcase/function/altstep the optional parameter can be compared with omit to determine if a concrete value has been provided or omit was given when calling it. Example code: function f_MyFunc1 (optional integer par) { if (par==omit) { // omit was given for par } else { // value was provided for par } } The parameters with default value (see CR 406) and optional parameters are independent features. The user can combine the two features, Example code: function f_MyFunc2(optional integer par1, optional integer par2 := omit, integer par3 := 5 ) { ... } Actual parameters Optional value parameters may be called with a concrete value or with omit as actual parameter. Example code: f_MyFunc1(11); f_MyFunc1(omit); f_MyFunc2(omit); // par1 & par2 will have the actual value omit, // par3 will have the actual value 5 | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | CR_416_v2.zip (890,821) 06-12-2007 11:51 http://oldforge.etsi.org/mantis/file_download.php?file_id=1234&type=bug CR_416_v3.zip (885,232) 06-12-2007 17:01 http://oldforge.etsi.org/mantis/file_download.php?file_id=1242&type=bug CR_416_v4.zip (869,220) 06-12-2007 17:43 http://oldforge.etsi.org/mantis/file_download.php?file_id=1245&type=bug CR_416_v5.zip (886,077) 06-12-2007 18:30 http://oldforge.etsi.org/mantis/file_download.php?file_id=1247&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
24-11-2006 14:34 | Stephan Schulz | New Issue | |||
24-11-2006 14:34 | Stephan Schulz | Clause Reference(s) | => - | ||
24-11-2006 14:34 | Stephan Schulz | Source (company - Author) | => dr. György Réthy, Ericsson | ||
15-06-2007 19:15 | Stephan Schulz | Status | new => assigned | ||
15-06-2007 19:15 | Stephan Schulz | Assigned To | => Ina Schieferdecker | ||
13-10-2007 19:22 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => developer_u | ||
17-10-2007 12:41 | user10 | Assigned To | developer_u => Thomas Deiß | ||
18-10-2007 12:10 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published) | ||
06-12-2007 11:51 | Thomas Deiß | File Added: CR_416_v2.zip | |||
06-12-2007 11:52 | Thomas Deiß | Note Added: 0004372 | |||
06-12-2007 11:52 | Thomas Deiß | Assigned To | Thomas Deiß => Gyorgy Rethy | ||
06-12-2007 11:52 | Thomas Deiß | Resolution | open => fixed | ||
06-12-2007 11:52 | Thomas Deiß | Target Version | Edition 4.1.1 (not yet published) => Edition 3.3.1 (not yet published) | ||
06-12-2007 16:59 | Thomas Deiß | Note Added: 0004396 | |||
06-12-2007 17:01 | Thomas Deiß | File Added: CR_416_v3.zip | |||
06-12-2007 17:43 | Gyorgy Rethy | File Added: CR_416_v4.zip | |||
06-12-2007 17:45 | Gyorgy Rethy | Note Added: 0004401 | |||
06-12-2007 17:45 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Jens Grabowski | ||
06-12-2007 18:05 | Jens Grabowski | Assigned To | Jens Grabowski => Thomas Deiß | ||
06-12-2007 18:30 | Thomas Deiß | File Added: CR_416_v5.zip | |||
06-12-2007 18:34 | Thomas Deiß | Note Added: 0004407 | |||
06-12-2007 18:34 | Thomas Deiß | Assigned To | Thomas Deiß => Ina Schieferdecker | ||
07-12-2007 09:38 | Ina Schieferdecker | Status | assigned => resolved | ||
07-12-2007 10:05 | Ina Schieferdecker | Status | resolved => closed | ||
07-12-2007 10:05 | Ina Schieferdecker | Note Added: 0004417 | |||
07-12-2007 10:05 | Ina Schieferdecker | Fixed in Version | => Edition 3.3.1 (not yet published) | ||
12-03-2008 10:22 | user10 | Fixed in Version | Edition 3.3.1 --will not be published, see 3.3.2 => Edition 3.3.2 (not yet published) | ||
12-03-2008 10:24 | user10 | Target Version | Edition 3.3.1 --will not be published, see 3.3.2 => Edition 3.3.2 (not yet published) |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|