ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0005944Part 01: TTCN-3 Core LanguageTechnicalpublic06-10-2011 10:0129-11-2011 14:07
Gyorgy Rethy 
Ina Schieferdecker 
normalmajorhave not tried
closedfixed 
 
v4.4.1 (published 2012-04)v4.4.1 (published 2012-04) 
C.29
L.M.Ericsson
0005944: Misleading sentence for lengthof for arrays.
The current text, regarding the lengthof arrays is:
"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 of and set of 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.
The length of a fixed length record of, set of, or array value will always be the fixed length according to the type definition."

Arrays are equivalent to fixed-length record ofs, thus the sentence "In case of arrays..." is simply wrong and contradicts to the next sentence ("The length of a fixed length record of, set of, or array value will always be the fixed length according to the type definition.").

Arrays are always of fixed length. Therefore each instance of an array definition (like instances of fixed-length record/set of types) shall have exactly the length specified in the definition. The text shall be changed to:
"For non-fixed length record of and set of, the value to be returned is the sequential number of the last initialized element: the index of that element plus 1.
The length of a fixed length record of, set of and arrays shall always be the fixed length according to their types: in case of record of and set of the size specified by the length restriction of the type definition, in case of arrays it shall be the upper index minus the lower index plus 1."
No tags attached.
related to 0005941closed Ina Schieferdecker What lenghtof shall return for record of templates with uninitialized elements? 
doc CR5944.doc (87,552) 29-11-2011 10:30
http://oldforge.etsi.org/mantis/file_download.php?file_id=2592&type=bug
Issue History
06-10-2011 10:01Gyorgy RethyNew Issue
06-10-2011 10:01Gyorgy RethyClause Reference(s) => C.29
06-10-2011 10:01Gyorgy RethySource (company - Author) => L.M.Ericsson
06-10-2011 11:44Gyorgy RethyTarget Version => Edition 4.4.1
06-10-2011 11:44Gyorgy RethySummaryMisleading definition for lengthof for arrays. => Misleading sentence for lengthof for arrays.
06-10-2011 11:44Gyorgy RethyDescription Updated
07-10-2011 16:35Gyorgy RethyDescription Updated
07-10-2011 17:01Gyorgy RethyDescription Updated
28-11-2011 10:13Jacob Wieland - SpirentNote Added: 0010332
28-11-2011 12:54Gyorgy RethyNote Added: 0010343
28-11-2011 16:24Gyorgy RethyNote Added: 0010362
28-11-2011 16:24Gyorgy RethyAssigned To => Jacob Wieland - Spirent
28-11-2011 16:24Gyorgy RethyStatusnew => assigned
29-11-2011 10:30Jacob Wieland - SpirentFile Added: CR5944.doc
29-11-2011 10:31Jacob Wieland - SpirentNote Added: 0010378
29-11-2011 10:31Jacob Wieland - SpirentAssigned ToJacob Wieland - Spirent => Ina Schieferdecker
29-11-2011 14:06Ina SchieferdeckerNote Added: 0010396
29-11-2011 14:06Ina SchieferdeckerStatusassigned => resolved
29-11-2011 14:06Ina SchieferdeckerResolutionopen => fixed
29-11-2011 14:06Ina SchieferdeckerFixed in Version => Edition 4.4.1
29-11-2011 14:07Ina SchieferdeckerStatusresolved => closed
02-12-2011 14:06Ina SchieferdeckerRelationship addedrelated to 0005941

Notes
(0010332)
Jacob Wieland - Spirent   
28-11-2011 10:13   
Agreed. But I would grammatically re-formulate it to:

"The length of a fixed length record of, set of or array shall always be the fixed length according to its type ..."
(0010343)
Gyorgy Rethy   
28-11-2011 12:54   
has to be discussed as different tools give different results. Therefore we need more detailed investigation.
(0010362)
Gyorgy Rethy   
28-11-2011 16:24   
STF discussion 28/11: formulate the resolution text. Take into account the minimum length acc. to the lenght restriction; fixed length is a special case of this.
(0010378)
Jacob Wieland - Spirent   
29-11-2011 10:31   
uploaded proposal, please review
(0010396)
Ina Schieferdecker   
29-11-2011 14:06   
As proposed.