Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Control Flow - Multiple returns or nested conditionals

by jakeease (Friar)
on Oct 08, 2010 at 10:08 UTC ( #864175=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    double getPayAmount()
    {
    ...
    }
    return result;
    }
    
  2. or download this
    double getPayAmount()
    {
    ...
    if(m_isRetired) return retiredAmount();
    return normalPayAmount();
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://864175]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2021-07-29 10:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?