In einer eMail vom Do, 8. Jan. 2004 16:15 MEZ schreibt "Dr. Schulz Stephan"
<This email address is being protected from spambots. You need JavaScript enabled to view it.>:
>Hi,
>
Hi Stephan,
>I think antti was asking about 'break' and 'continue' as statements which are
frequently used in conventional programming languages to exit 'for' and 'while'
loops.
Yes, and Johan pointed him to the use of the goto for this
purpose, which let Bernard to ask further...
Personally, I find that the ability to break out of a loop,
or skip to the next iteration in a loop is useful, however,
it is not necessary. One could do without both break and
continue.
Another issue is the misuse of the return statement, which
is counter to good software engineering principles which
states that functions should have a single entry and a single
exit point. Then again, we can't, and even don't want to,
protect or prevent the test developer from hanging himself, now do we? :-).
Cheers,
Claude.
>
>Moikka,
>stephan
>
>
Original Message
> From: active_ttcn3 : mts stf133 ttcn version 3 - active members only on
behalf of ext Stephan Tobies
> Sent: Thu 1/8/2004 4:55 PM
> To: This email address is being protected from spambots. You need JavaScript enabled to view it.
> Cc:
> Subject: Re: No break or continue statements?
>
>
>
> ext Bernard Stepien wrote:
>
> >hello all,
> >
> > I would like to add the following question to this hot debate:
> >
> > Why do we need GOTOs in TTCN-3. I always thought it was a scientific
chic to avoid GOTOs.
> >
> > I of course already know the answer to that question, but I am curious
to hear about other ideas.
> >
> >
>
> Well, from an expressivity point of view, we do not need them, I think.
> 'repeat' (which is already part of the language), 'break' and 'next'
> (which could be added) would give us all that we need when writing TTCN-3.
>
> There are at least two cases for gotos:
>
> 1) Conversion from TTCN-2, where they were allowed.
> 2) Automatically generated code. When generating code automatically,
> certain constructs can be rather elegantly be expressed with
> lables/gotos, which would otherwise require extensive nesting of if
> statemens, for example. The code generator should know what it is doing
> and so in that case, I would consider goto as rather harmless.
>
> My opinion on this issue.
>
> BR
>
> Stephan
> --
>
> Stephan Tobies Sr. Research Engineer, Nokia Research Center
> ~ Mobile Networks Lab, Protocol Engineering Group
> E-Mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
> Work Phone: +49-234-9842262
> Mobile: +49-163-9842405
> Fax: +49-234-9843491
> Address: NRC Bochum, Meesmannstr. 103, 44807 Bochum, Germany
>
>
>
--
Claude Desroches email:CDesroche@aol.com
Conformance Technologies Ltd. phone: +49 30 9606 7986
685 Cedar Point Road fax: +49 30 9606 7987
Penetanguishene Ontario, mobile 0174 701 6792
Canada