ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0008223Part 01: TTCN-3 Core LanguageEditorialpublic28-03-2024 10:4228-03-2024 11:23
Matthias Simon 
 
normalminorhave not tried
newopen 
 
 
19.4.2 -- The range based loop
Nokia - Matthias Simon
0008223: Invalid example
EXAMPLE 3:
// Iterate over partially initialized ranges
//
var integer e, i := 0;
for (e in {1, -, -}) {
    i++;
}
log("final value:", e);
// Output:
// 0
// 1
// 2
//final value: -

Output does not match expected behavior. Example should be:
EXAMPLE 3:
// Iterate over partially initialized ranges
//
var integer e, i := 0;
for (e in {1, -, 3}) {
    log(i, e)
    i++;
}
log("final value:", e);
// Output:
// 0 1
// 1 UNINITIALIZED
// 2 3
// final value: 3
//final value: -

 
No tags attached.
Issue History
28-03-2024 10:42Matthias SimonNew Issue
28-03-2024 11:23Matthias SimonNote Added: 0016622

Notes
(0016622)
Matthias Simon   
28-03-2024 11:23   
Last line was left by accident `//final value: -` and should be removed.