trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: January 2012

Re: [trinity-devel] C++ Question

From: Petri Airio <petriai@...>
Date: Mon, 16 Jan 2012 16:13:49 +0200
On 16 January 2012 15:52, Darrell Anderson <humanreadable@...> wrote:
> When a C++ (boolean) function contains multiple if-else tests, and each of those tests contains a return statement (return=false; or return=true;), does the function exit when encountering the first return?
>
> Or does the function continue executing the remaining code within that function?
>
> In other words, when encountering that first return, does the function exit much like a break command?

Code always returns from the function when the first return is executed.