RE: [sv-bc] scope of break/continue within foreach loop

From: Rich, Dave <Dave_Rich@mentor.com>
Date: Tue Jun 01 2010 - 19:53:54 PDT

Paul,

If a foreach statement with multiple variables is defined as equivalent to a set of nested for loops, then why would break/continue be anything other than treated as a break/continue of the inner most loop?

> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Paul
> Graham
> Sent: Tuesday, June 01, 2010 2:55 PM
> To: sv-bc
> Subject: [sv-bc] scope of break/continue within foreach loop
>
> A foreach statement with multiple variables is defined as equivalent to a
> set of nested for loops. If a break statement is executed in the body of
> a forever loop, does it break out of the innermost of these nested for
> loops, or does it break out of the outermost? Likewise for a continue
> statement. I guess it should be the outermost loop. Could this be
> clarified?
>
> Paul
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Jun 1 19:54:11 2010

This archive was generated by hypermail 2.1.8 : Tue Jun 01 2010 - 19:57:00 PDT