function

This is a discussion on function within the C Programming forums, part of the General Programming Boards category; sorry, im new to c and am wondering how to muck a program loop up to the top. Thankyou...

  1. #1
    unregistered
    Guest

    Unhappy function

    sorry,
    im new to c and am wondering how to muck a program loop up to the top.



    Thankyou

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789

    Re: function

    Originally posted by unregistered
    sorry,
    im new to c and am wondering how to muck a program loop up to the top.



    Thankyou
    Dont know quite what you are saying....if you mean send an iteration back to the top of the loop block.?? - try the "continue" keywork

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    You mean a loop?

    This will execute the commands within the brackets as long as *expression* equals to true (non-zero).
    Code:
    while( *expression* )
    {
       *commands*
    }
    Also, look up for and do. Loops are a very important part of programming.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Registered User
    Join Date
    Jul 2002
    Posts
    66
    sorry,
    im new to c and am wondering how to muck a program loop up to the top.
    Where I come from, mucking something up means to make a mistake. That's easy, so you probably mean something else.

  5. #5
    Cody
    Guest

    Re: function

    Originally posted by unregistered
    sorry,
    im new to c and am wondering how to muck a program loop up to the top.



    Thankyou
    are you talking about a goto statement, or a loop???

  6. #6
    Terrance
    Guest

    Re: function

    Originally posted by unregistered
    sorry,
    im new to c and am wondering how to muck a program loop up to the top.



    Thankyou
    Use the continue statement

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 02:07 AM
  2. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  3. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  4. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  5. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 06:44 PM

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