Logo etsi

ETSI's Bug Tracker

Notice: information submitted on the ETSI issue Tracker may be incorporated in ETSI publication(s) and therefore subject to the ETSI IPR policy.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008217Part 01: TTCN-3 Core LanguageClarificationpublic10-11-2023 10:5110-11-2023 10:51
ReporterGusztáv Adamis 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0008217: Harmonisation needed btw 6.2.3.0 and C.2.1 (Lengthof does not count last, but not initialized elements.)
DescriptionIn 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.)
TagsNo tags attached.
Clause Reference(s)6.2.3.0 and C.2.1
Source (company - Author)     Gusztáv Adamis Ericsson
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
10-11-2023 10:51 Gusztáv Adamis New Issue


MantisBT 1.2.14 [^]
Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker