Re: two exiting points in void function?
From: Ed Morton (mortonAVOIDINGSPAM_at_lucent.com)
Date: 11/13/03
- Next message: Alan Balmer: "Re: fseek"
- Previous message: Ed Morton: "Re: malloc a struct?"
- In reply to: L. Westmeier: "Re: two exiting points in void function?"
- Next in thread: Goran Larsson: "Re: two exiting points in void function?"
- Reply: Goran Larsson: "Re: two exiting points in void function?"
- Reply: Sheldon Simms: "Re: two exiting points in void function?"
- Reply: Dan Pop: "Re: two exiting points in void function?"
- Reply: Mac: "Re: two exiting points in void function?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Alan Balmer: "Re: fseek"
- Previous message: Ed Morton: "Re: malloc a struct?"
- In reply to: L. Westmeier: "Re: two exiting points in void function?"
- Next in thread: Goran Larsson: "Re: two exiting points in void function?"
- Reply: Goran Larsson: "Re: two exiting points in void function?"
- Reply: Sheldon Simms: "Re: two exiting points in void function?"
- Reply: Dan Pop: "Re: two exiting points in void function?"
- Reply: Mac: "Re: two exiting points in void function?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|