Thread: do-while loop

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    270

    do-while loop

    I got a do while loop. Now it works fine. But once it ends its not perforing a calcualtion after the loop as ended. Like outside the loop i have created a calculation and its not getting done?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Well, there's several options.
    1. The compiler is broken - unlikely.
    2. You are actually NOT leaving the do-while loop as you expect.
    3. Something else is preventing the calculation from being completed.
    4. The aliens stole your code and replaced it with NOP's [1]


    [1] NOP's are "NO Operation" instructions. This is a "no effect" instruction, such as move register 1 into register 1, or some equally "meaningless" thing.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by taurus View Post
    I got a do while loop. Now it works fine. But once it ends its not perforing a calcualtion after the loop as ended. Like outside the loop i have created a calculation and its not getting done?
    I've got a lot of code lying around the needs debugging. Can you psychically debug it?

    If you want help with a particular bit of code, don't you think it would be a good idea to post it?
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. nested loop, simple but i'm missing it
    By big_brother in forum C Programming
    Replies: 19
    Last Post: 10-23-2006, 10:21 PM
  2. While loop misbehaving (or misunderstanding)
    By mattAU in forum C Programming
    Replies: 2
    Last Post: 08-28-2006, 02:14 AM
  3. loop in a linked linked lists
    By kris.c in forum C Programming
    Replies: 6
    Last Post: 08-26-2006, 12:38 PM
  4. while loop help
    By bliznags in forum C Programming
    Replies: 5
    Last Post: 03-20-2005, 12:30 AM
  5. loop issues
    By kristy in forum C Programming
    Replies: 3
    Last Post: 03-05-2005, 09:14 AM