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

ID | Project | Category | View Status | Date Submitted | Last Update
0008103 | Part 01: TTCN-3 Core Language | New Feature | public | 09-08-2022 15:10 | 03-01-2023 13:12

Reporter | Matthias Simon |
Assigned To | Jens Grabowski |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version |  | Fixed in Version |  |
Clause Reference(s) | 19 -- Basic program statements
Source (company - Author) | Nokia - Matthias Simon

Summary | 0008103: Add increment and decrement statement

Description

SUMMARY
The post increment operator in C has a bad reputation, because its unfavorable specification creates multiple undefined behavior scenarios.
However, incrementing by one is so common in TTCN-3 that introducing some kind of increment instruction is justified.
PROPOSAL
Introduce a increment and decrement *statement*. A statement cannot be used in expressions, only in places where it's safe. Examples:
for(i:=0; i<10; i++) // okay.
log(i++) // not okay.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR8103.docx (139,230) 07-12-2022 11:54 http://oldforge.etsi.org/mantis/file_download.php?file_id=4088&type=bug

Issue History
Date Modified | Username | Field | Change
09-08-2022 15:10 | Matthias Simon | New Issue |
16-08-2022 12:18 | Jens Grabowski | Note Added: 0016218 |
16-08-2022 12:19 | Jens Grabowski | Assigned To | => Jens Grabowski
16-08-2022 12:19 | Jens Grabowski | Status | new => assigned
16-08-2022 14:14 | Jens Grabowski | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
11-11-2022 11:36 | Jens Grabowski | Note Added: 0016310 |
11-11-2022 11:36 | Jens Grabowski | Assigned To | Jens Grabowski => Axel Rennoch
06-12-2022 14:15 | Axel Rennoch | Note Added: 0016360 |
06-12-2022 14:15 | Axel Rennoch | Assigned To | Axel Rennoch => Jens Grabowski
07-12-2022 09:15 | Jens Grabowski | Note Added: 0016367 |
07-12-2022 09:15 | Jens Grabowski | Assigned To | Jens Grabowski => Axel Rennoch
07-12-2022 11:54 | Axel Rennoch | File Added: CR8103.docx |
07-12-2022 11:55 | Axel Rennoch | Note Added: 0016370 |
07-12-2022 11:55 | Axel Rennoch | Assigned To | Axel Rennoch => Jens Grabowski
07-12-2022 11:55 | Axel Rennoch | Status | assigned => confirmed
16-12-2022 09:22 | Jens Grabowski | Note Added: 0016425 |
16-12-2022 09:22 | Jens Grabowski | Status | confirmed => resolved
16-12-2022 09:22 | Jens Grabowski | Resolution | open => fixed
03-01-2023 13:12 | Jens Grabowski | Note Added: 0016449 |
03-01-2023 13:12 | Jens Grabowski | Status | resolved => closed

Notes

(0016218)
Jens Grabowski
16-08-2022 12:18

TTF discussion: Idea appreciated. Decrement should also be added.

(0016310)
Jens Grabowski
11-11-2022 11:36

Axel, can you have a look?

(0016360)
Axel Rennoch
06-12-2022 14:15

The approach may be to add a new subsection "7.1.8 Increment and Decrement operators" to explain the functionality of "++" and "--". In addition the section "19.1 Assignments" and the BNF rule 539 may be subject to an update to allow the new sytax: ValueRef"++" and ValueRef"--".

(0016367)
Jens Grabowski
07-12-2022 09:15

TTF discussion: Increment and Decrement should become stand-alone statements and not operators. They may become subsections of 19.1. The BNF change in assignment rules looks ok.

(0016370)
Axel Rennoch
07-12-2022 11:55

Please check the proposed solution file.

(0016425)
Jens Grabowski
16-12-2022 09:22

ok

(0016449)
Jens Grabowski
03-01-2023 13:12

Implemented as proposed