Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 25th, 2005, 7:51 PM   #1
ridley
Newbie
 
Join Date: Feb 2005
Location: Orlando, FL
Posts: 8
Rep Power: 0 ridley is on a distinguished road
Quick C question [solved]

in ANSI C, if I have

while ()
     if()
          if()
               break;

will "break;" break out of the while() or the "if" ?

Last edited by ridley; Feb 25th, 2005 at 8:10 PM.
ridley is offline   Reply With Quote
Old Feb 25th, 2005, 8:07 PM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
break closes the current loop control structure (while or do), not if's or anything else
__________________

tempest is offline   Reply With Quote
Old Feb 25th, 2005, 8:10 PM   #3
ridley
Newbie
 
Join Date: Feb 2005
Location: Orlando, FL
Posts: 8
Rep Power: 0 ridley is on a distinguished road
Thanks
ridley is offline   Reply With Quote
Old Feb 26th, 2005, 8:03 AM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Just in case you hadn't figured (this isn't meant to be a jab at your intelligence), it also breaks for loops. C'est très handy.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:33 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC