[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] do... while?



> You can tell from the prefixes where this code comes from :-)

I can't, actually. And despite what a surprisingly large number of
people keep maintaining, it's thoroughly unreadable--I would say
insultingly unreadable. Notice how all the ink wasted on "mnemonic"
names necessitates many more lines, and each line does practically
nothing. It's a snowball effect.

I stared at this until it was clear that what I was going to get
out of it wasn't all that much. I think it's a grep of a sort...
finding the first eligible element, more precisely. Except it
hammers the array.

I also didn't know people used names like bCheckIfThisIsAnAceFile()
outside of parodies...

> my $bContinueLooking = 1;
> do {
>     if ( $#aListOfOldAceFiles == -1 ) {
>       $bTransferTags = 0;
>       $bContinueLooking = 0;
>     }
>     else {
>       $szOldAceFile = shift @aListOfOldAceFiles;
>       $bIsAnAceFile = &bCheckIfThisIsAnAceFile( $szOldAceFile );
>       if ( $bIsAnAceFile ) {
>         $bTransferTags = 1;
>         $bContinueLooking = 0;
>       }
>     }
>   } while( $bContinueLooking );

--
Tushar Samant
~
~
:wq


==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org