Results 1 to 2 of 2

Thread: End void function prematurely?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    Texas
    Posts
    140

    Question End void function prematurely?

    I am in the middle of a void function and would like to exit the function prematurely. How may I do so?

  2. #2
    jim mcnamara
    Guest
    Code:
    void nuthin(int i){
      
      if (i==0) return;   // early exit
      if(i>) printf("%d",i);  
      return;
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width