Re: Loop controls

2002-04-25 Thread Miko O'Sullivan
> > And "" won't be printed before "Done."? > > It *will* be printed there, according to the current design. A C is > *always* called when the iteration leaves the block (whether it's coming > around again or not). By analogy, C is a terminator, not a separator. Darn, we're so close. I understand

Re: Loop controls

2002-04-25 Thread Damian Conway
Trey Harris wrote: > So: > > for $results.get_next() { > FIRST { print "Results:"; } > print $_; > NEXT { print ""; } > LAST { print "Done."; } > } else { > print "No results."; > } > > Do I have that right? Yes. Presuming Larry decides in favour of C and C. Note too that the NAMED

Re: Loop controls

2002-04-25 Thread Trey Harris
In a message dated Fri, 26 Apr 2002, Damian Conway writes: > Larry is still considering allowing a C block that would do this. > It would go inside the loop block. > [...] > This will be called a C block. It goes inside the loop block. > [...] > This will be called a C block. It goes inside the lo

Re: Loop controls

2002-04-25 Thread Trey Harris
In a message dated Thu, 25 Apr 2002, Luke Palmer writes: > > before { ... } # run before first iteration, only if there is at > >least one iteration > > after { ... } # run after last iteration, only if there is at least > > one iteration > > noloop { ... }

Re: Loop controls

2002-04-25 Thread Damian Conway
Miko O'Sullivan wrote: > > SUMMARY > > A proposal for a set of loop structures that simplify code that is based on > loop iterations. > > foreach my $var (@arr) { ... } > before { ... } # run before first iteration, > # only if there is at least one iteration Larry

Re: Loop controls

2002-04-25 Thread Luke Palmer
> foreach my $var (@arr) { ... } You mean foreach @arr -> $var {...} > before { ... } # run before first iteration, only if there is at >least one iteration > after { ... } # run after last iteration, only if there is at least > one iteration > noloo

Re: Loop controls

2002-04-25 Thread Miko O'Sullivan
(note: this repsonse arrived just in my mailbox, not to the list, but I thought I'd post my response to the list. -Miko) > Okay, that's if you can store the results somewhere all at once, but > so was your example. Iteration objects could be used to optimize for > the case where you can't (or d

Loop controls

2002-04-25 Thread Miko O'Sullivan
SUMMARY A proposal for a set of loop structures that simplify code that is based on loop iterations. foreach my $var (@arr) { ... } before { ... } # run before first iteration, only if there is at least one iteration between { ... } # run between iterations, not before first or after l

Re: http://archive.develooper.com/perl6-announce-rfc@perl.org/msg00318.html

2002-04-25 Thread david nicol reading obsolescent UMKC mailboxes
James Ryley wrote: > > Hi, > > I was wondering if anything ever became of the comments at > http:[EMAIL PROTECTED]/msg00318.html? > > I have an application that would benefit from double interpolation. Of > course I can work around it, but double interpolation would be so much > cleaner. Was