ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0004847 | Part 01: TTCN-3 Core Language | Technical | public | 13-02-2009 07:47 | 16-02-2009 05:34

Reporter | Gyorgy Rethy |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.1.1 (published 2009-06) | Fixed in Version | v4.1.1 (published 2009-06) |
Clause Reference(s) | C.28
Source (company - Author) | L.M.Ericsson

Summary | 0004847: What should lengthof return for arrays with indexing not started from zero

Description

In clause C.28 of part-1 the following sentence is ambiguous in the case of arrays, when indexing starts with a number different from zero:
"For record of, set of, and array the value to be returned is the sequential number of the last initialized element (index of that element plus 1).
E.g. in the following example:
var integer v_intlist [3..5] := {0,0,0}
var integer v_listnum := lengthof(v_intlist);
shall lenghtof return 3 (the sequential number of the last element) or 6 (index of the last element plus 1) ?
I propose that the "main text" is followed, i.e. the number of elements and the sentence is changed to:
"For record of, set of, and array the value to be returned is the sequential number of the last initialized element (i.e. in case of record ofs, set ofs and arrays when the indexing starts from zero, the index of that element plus 1).

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
13-02-2009 07:47 | Gyorgy Rethy | New Issue |
13-02-2009 07:47 | Gyorgy Rethy | Status | new => assigned
13-02-2009 07:47 | Gyorgy Rethy | Assigned To | => Ina Schieferdecker
13-02-2009 07:47 | Gyorgy Rethy | Clause Reference(s) | => C.28
13-02-2009 07:47 | Gyorgy Rethy | Source (company - Author) | => L.M.Ericsson
13-02-2009 10:10 | Ina Schieferdecker | Note Added: 0008096 |
13-02-2009 10:10 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published)
13-02-2009 10:11 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
16-02-2009 05:34 | Ina Schieferdecker | Resolution | open => fixed
16-02-2009 05:34 | Ina Schieferdecker | Status | assigned => resolved
16-02-2009 05:34 | Ina Schieferdecker | Fixed in Version | => Edition 4.1.1 (not yet published)
16-02-2009 05:34 | Ina Schieferdecker | Status | resolved => assigned
16-02-2009 05:34 | Ina Schieferdecker | Assigned To | Gyorgy Rethy => Ina Schieferdecker
16-02-2009 05:34 | Ina Schieferdecker | Status | assigned => closed

Notes

(0008096)
Ina Schieferdecker
13-02-2009 10:10

I propose to change into: For record of, set of, and array the value to be returned is the sequential number of the last initialized element: in case of record ofs and set ofs the index of that element plus 1. In case of arrays, lengthof should return the index of that last element minus the index of the first element plus 1.