--- Austin Hastings <[EMAIL PROTECTED]> wrote:
> 
> --- David Storrs <[EMAIL PROTECTED]> wrote:
> > So, as I sweat here in the salt mines of C++, longing for the
> > cleansing joy that Perl(5 or 6, I'd even take 4) is, I find myself
> > with the following problem:
> > 
> > Frequently, I find myself writing stuff like this:
> > 
> > void Ficp400::SaveRow(long p_row) 
> > {
> >     // if p_row is marked as deleted, return
> >     if (GetStatus(row) & FLX_ROW_DELETE) { return; }
> > 
> >     ...
> > }
> > 
> > As a general rule, I don't like comments.  When I see a comment, I
> > want to turn it into a function name.  So, I keep wanting to be
> able
> > to write the above code like so:
> > 
> > 
> > 
> > void Ficp400::SaveRow(long p_row) 
> > {
> >     Return_If_Is_Deleted(p_row);
> > 
> >     ...
> > }
> > 
> 
> sub Ficp400::SaveRow(Int $p_row)
> {
>   return if IsDeleted($p_row);
> }

But if you really need to make a function out of it, see the C<leave>
keyword.

=Austin

Reply via email to