Is getopt() standard C? etc.
From: José de Paula (jose_de_paula_at_ig.com.br)
Date: 01/30/04
- Previous message: Sean Kenwrick: "[OT] Shooting yourself in the foot"
- Next in thread: Joona I Palaste: "Re: Is getopt() standard C? etc."
- Reply: Joona I Palaste: "Re: Is getopt() standard C? etc."
- Reply: Runtime: "Re: Is getopt() standard C? etc."
- Reply: nrk: "Re: Is getopt() standard C? etc."
- Reply: Christopher Benson-Manica: "Re: Is getopt() standard C? etc."
- Reply: Nimmi Srivastav: "Re: Is getopt() standard C? etc."
- Reply: Sandeep Sharma: "Re: Is getopt() standard C? etc."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jan 2004 12:29:59 -0200
Is getopt() and its companions, commonly found in GNU libc and other
Unices libc, part of the C standard?
Another doubt: I have a switch inside a while loop; is there a way to
break out of the loop from the switch without using goto? I mean:
start:
while(chr = fgetc(inputfile))
{
switch(chr)
{
case 'a': case 'b':
do_one_stuff(chr);
break;
case 'c': case 'd':
do_some_other_stuff(chr);
break;
case 'e': case 'f':
do_stuff(chr);
break;
default:
goto start;
} /* end switch */
do_even_more_stuff_here();
} /* end while */
Is there a way to get out of the while (i.e., skipping the
"do_even_more_stuff_here();" part) without using this goto?
Thank in advance.
-- Quidquid latine dictum sit altum viditur
- Previous message: Sean Kenwrick: "[OT] Shooting yourself in the foot"
- Next in thread: Joona I Palaste: "Re: Is getopt() standard C? etc."
- Reply: Joona I Palaste: "Re: Is getopt() standard C? etc."
- Reply: Runtime: "Re: Is getopt() standard C? etc."
- Reply: nrk: "Re: Is getopt() standard C? etc."
- Reply: Christopher Benson-Manica: "Re: Is getopt() standard C? etc."
- Reply: Nimmi Srivastav: "Re: Is getopt() standard C? etc."
- Reply: Sandeep Sharma: "Re: Is getopt() standard C? etc."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|