Re: two exiting points in void function?

From: Ed Morton (mortonAVOIDINGSPAM_at_lucent.com)
Date: 11/13/03


Date: Thu, 13 Nov 2003 08:51:38 -0600


L. Westmeier wrote:

> Grumble wrote:
>
>> L. Westmeier wrote:
>>
>>> Is there a way to have to exiting point in a void function? I don't
>>> want to exit the program but just this function.
>>
>>
>>
>> Use return;
>>
> thanks for the fast reply :-)
>

Its good practice to only have one return point from a function. Since
you didn't know about "return;", I'm guessing you're new to C so you may
want to post a small, compilable code sample to get feedback on whether
or not you're approaching this the right way.

        Ed.



Relevant Pages

  • Re: ICMP benchmark?
    ... but _in practice_ any bit of Gigabit kit you will find ... is going to do full-duplex. ... > I'm guessing that all of our links are over 100BaseT in this case, ...
    (comp.benchmarks)
  • Re: How does taking breaks restore mental capacity?
    ... There have been many experiments on "massed vs. spaced practice," most ... Distributed practice in verbal recall tasks: A review and quantitative ... Analyses suggest that ISI and retention interval ... I'm guessing that this hypothetical construct has ...
    (sci.cognitive)
  • Re: Use of @ symbols in SXML quoted literals
    ... at the spec. ... I hadn't thought of the splicing problem, ... guessing in practice it's not much of a problem given that SXML seems ...
    (comp.lang.scheme)
  • Re: two exiting points in void function?
    ... > L. Westmeier wrote: ... > Its good practice to only have one return point from a function. ... > want to post a small, compilable code sample to get feedback on whether ...
    (comp.lang.c)
  • Re: Beginner questions on price and difficulty
    ... contouring. ... but i also realize it will take lots of time and practice, ... Prev by Date: ...
    (alt.machines.cnc)