Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Statement blocks as statements

Statement blocks as statements 19 Dec 2001 10:07 #6050

Hi everybody,

some sections of the standard suggest (e.g., in Section 8) that it would
be ok to have blocks of statements appearing in places where statement
can appear, which would allow to write things like

function f()
{
timer t1;
t1.start(1.0);
{
timer t2;
t2.start(2.0);
}
t1.stop();
any timer.timeout; // t2 is not visible here
return;
}

On the other hand, the grammar does not allow this. Of course, the
grammar is normative, but it would be rather cheap to introduce a
modification that would allow nested statement blocks like the one
above.

Does anybody think that this would be a desirable thing?

Stephan Tobies
The administrator has disabled public write access.

Statement blocks as statements 20 Dec 2001 10:12 #6053

Hi Stephen and all others,

this ambiguity was reported by several people. We got different
proposals
to resolve this issue, i.e., either to change the text or to change the
grammar. As solution we tried to change the text in such a way that it
reflects the grammar, because we couldn't think of a situation where
nested
statement blocks are desireable or usefull.

If this was not successful or if Nokia wants to have nested statement
blocks, please send a change request according to the rules defined at
the last MTS meeting so that the TTCN-3 maintenance project in 2002
can handle it.

Merry Christmas and a happy new Year!
Jens

Stephen TOBIES schrieb:
>
> Hi everybody,
>
> some sections of the standard suggest (e.g., in Section 8) that it would
> be ok to have blocks of statements appearing in places where statement
> can appear, which would allow to write things like
>
> function f()
> {
> timer t1;
> t1.start(1.0);
> {
> timer t2;
> t2.start(2.0);
> }
> t1.stop();
> any timer.timeout; // t2 is not visible here
> return;
> }
>
> On the other hand, the grammar does not allow this. Of course, the
> grammar is normative, but it would be rather cheap to introduce a
> modification that would allow nested statement blocks like the one
> above.
>
> Does anybody think that this would be a desirable thing?
>
> Stephan Tobies

--

======================================================================
Dr. Jens Grabowski
Institute for Telematics phone: +49 451 500 3723
University of Luebeck fax: +49 451 500 3722
Ratzeburger Allee 160 eMail: This email address is being protected from spambots. You need JavaScript enabled to view it.
D-23538 Luebeck or This email address is being protected from spambots. You need JavaScript enabled to view it.
(Germany) WWW: www.itm.mu-luebeck.de
======================================================================
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin