do-while loop

This is a discussion on do-while loop within the C Programming forums, part of the General Programming Boards category; I got a do while loop. Now it works fine. But once it ends its not perforing a calcualtion after ...

  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,006
    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-19-2005, 11:30 PM
  5. loop issues
    By kristy in forum C Programming
    Replies: 3
    Last Post: 03-05-2005, 08:14 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21