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

ID | Project | Category | View Status | Date Submitted | Last Update
0008217 | Part 01: TTCN-3 Core Language | Clarification | public | 10-11-2023 10:51 | 21-11-2024 15:04

Reporter | Gusztáv Adamis |
Assigned To | Matthias Simon |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | resolved | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version |  | Fixed in Version |  |
Clause Reference(s) | 6.2.3.0 and C.2.1
Source (company - Author) | Gusztáv Adamis Ericsson

Summary | 0008217: Harmonisation needed btw 6.2.3.0 and C.2.1 (Lengthof does not count last, but not initialized elements.)

Description

In 6.2.3.0 (Records and sets of single types/General) and C.2.1 (Length of strings and lists)
In Example 2 of 6.2.3.0 says that this array has 3 elements
EXAMPLE 2:
var MyRecordOfType v_myVariable := {
[0] := '111'B,
[1] := '101'B,
[2] := -
}
v_myVariable := { '10111'B, -, - };
// after this, v_myVariable contains:
// { '10111'B, '101'B /* unchanged */, <undefined> /* unchanged */ }
while the definition of the lengthof does not count this last, existing, but not initialized element. It is emphasized at the end of Example 1 of C.2.1.
// Given
type record length(0..10) of integer MyList;
var MyList v_myListVar := { 0, 1, -, 2, - };
lengthof(v_myListVar);
// returns 4 without respect to the fact, that the element v_myListVar[2] is not initialized
This is according to the specification of lengthof, but normally we would wait 5 in this situation (as is suggested in 6.2.3.0.)

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

Issue History
Date Modified | Username | Field | Change
10-11-2023 10:51 | Gusztáv Adamis | New Issue |
19-11-2024 13:50 | Jens Grabowski | Note Added: 0016695 |
19-11-2024 13:50 | Jens Grabowski | Assigned To | => Matthias Simon
19-11-2024 13:50 | Jens Grabowski | Status | new => assigned
21-11-2024 15:04 | Matthias Simon | Note Added: 0016696 |
21-11-2024 15:04 | Matthias Simon | Status | assigned => resolved
21-11-2024 15:04 | Matthias Simon | Resolution | open => fixed

Notes

(0016695)
Jens Grabowski
19-11-2024 13:50

Please have a look and check this specific case.

(0016696)
Matthias Simon
21-11-2024 15:04

Work on this CR will continue here: https://labs.etsi.org/rep/mts/ttcn3/standard/-/issues/22 [^]