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

ID | Project | Category | View Status | Date Submitted | Last Update
0004849 | Part 01: TTCN-3 Core Language | Technical | public | 13-02-2009 10:29 | 16-02-2009 05:07

Reporter | Gyorgy Rethy |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.1.1 (published 2009-06) | Fixed in Version | v4.1.1 (published 2009-06) |
Clause Reference(s) | 22.2.2
Source (company - Author) | L.M.Ericsson

Summary | 0004849: Misuse of the assignment operator

Description

In clause 22.2.2 the assignment operator is re-used for storing parts of the received message. Normally, with the assignment symbol the rigth hand value is assigned to the entity on the left hand side of ":=". In this case the direction of the assignment is the opposite. This syntax causes really strange things like in the example of the draft "integer := MyIntegerVar".
Use the storing symbol "->" to identify the parts to be stored.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.

Relationships

related to | 0002757 | closed | Ina Schieferdecker | accessing parts of received messages

Attached Files |

Issue History
Date Modified | Username | Field | Change
13-02-2009 10:29 | Gyorgy Rethy | New Issue |
13-02-2009 10:29 | Gyorgy Rethy | Status | new => assigned
13-02-2009 10:29 | Gyorgy Rethy | Assigned To | => Ina Schieferdecker
13-02-2009 10:29 | Gyorgy Rethy | Clause Reference(s) | => 22.2.2
13-02-2009 10:29 | Gyorgy Rethy | Source (company - Author) | => L.M.Ericsson
16-02-2009 05:02 | Ina Schieferdecker | Note Added: 0008100 |
16-02-2009 05:02 | Ina Schieferdecker | Resolution | open => fixed
16-02-2009 05:02 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published)
16-02-2009 05:07 | Ina Schieferdecker | Status | assigned => resolved
16-02-2009 05:07 | Ina Schieferdecker | Status | resolved => closed
16-02-2009 05:07 | Ina Schieferdecker | Fixed in Version | => Edition 4.1.1 (not yet published)
10-03-2009 09:37 | Ina Schieferdecker | Relationship added | related to 0002757

Notes

(0008100)
Ina Schieferdecker
16-02-2009 05:02

Hello Ina and Gyorgy,
after we discussed to some length whether it would be better to use '->' or ':=' I prefer to stick to the ':='. And in this case it would be sufficient to change the examples.
Example 2 of 'catch' clause 22.3 should be changed, too:
MyPort.catch(MyProc, MyTemplate(5)) -> value (MyVarThree := f1 )
sender MyPeer;
// Catches an exception, assigns the value of its field f1 to MyVarThree and retrieves the
// address of the sender.
Best regards
Thomas
>-----Original Message-----
>From: ext Schieferdecker, Ina
>[mailto:Ina.Schieferdecker@fokus.fraunhofer.de]
>Sent: Friday, 13. February 2009 17:39
>To: Deiss, Thomas (NSN - DE/Duesseldorf); ext Jens Grabowski
>Cc: GyÃ¶rgy RÃ©thy
>Subject: 0004849: Misuse of the assignment operator - Testing
>- Online Reporting Tool
>Importance: High
>
>Dear Thomas, dear Jens,
>
>this is an interesting one:
>
>http://t-ort.etsi.org/view.php?id=4849 [^]
>
>I think: when deciding to use := instead of -> it was
>forgotten to switch the lhs and rhs in the examples.
>
>The syntax defines correctly that the variable reference is on the lhs.
>
>Can we agree to switch the lhs and rhs in the respective examples:
>
> MyPort.receive(MyType:?) -> value ( MyVar,
>MyMessageIdVar := MyType.messageId )
>
>// The value of the received message is stored in the variable
>
>// MyVar and the value of the messageId field of the received
>
>// message is stored in the variable MyMessageIdVar.
>
> MyPort.receive(anytype:?) -> value ( MyIntegerVar := integer )
>
>// If the received value is an integer, it is stored in the variable
>
>// MyIntegerVar, a test case error otherwise.
>
>Thank you in advance for your fast response.
>
>With best regards,
>
>Ina
>