Re: The difference between return and exit()?

From: Alex Vinokur (alexvn_at_big-foot.com)
Date: 09/28/04

  • Next message: Guillaume Métayer: "Need help about Linux daemon and system call (system or popen)"
    Date: Tue, 28 Sep 2004 16:17:50 +0200
    
    

    "learning_C++" <learning_c@hotmail.com> wrote in message news:44bd0859.0409280026.16dfcd53@posting.google.com...
    > Hi,
    > I often see the functions like exit() and close(). Can they replace
    > return in the c program? Which header includes them?
    > What is the difference between exit(0), exit(1) and exit(...)?
    > Please give me some examples.
    >
    > Thanks,

    The difference between return, exit() and abort() in C++ program can be seen at
    http://groups.google.com/groups?selm=7d7jmn%24clg%241%40nnrp1.dejanews.com

    -- 
       Alex Vinokur
         http://mathforum.org/library/view/10978.html
         http://sourceforge.net/users/alexvn
    

  • Next message: Guillaume Métayer: "Need help about Linux daemon and system call (system or popen)"

    Relevant Pages

    • Re: Header call and exit()
      ... If making a header(location:) call, is it good practice to place an exit() statement after it, or will the header call take control of the script? ... Obviously the request is within the same ...
      (comp.lang.php)
    • Re: So lost... Need help
      ... I think I'm going to go in a different direction w/ this perl script so ... Thanks for reading. ... Name" is a header): ...
      (perl.beginners)
    • Re: Header call and exit()
      ... If making a header(location:) call, is it good practice to place an exit() statement after it, or will the header call take control of the script? ... So if the next execution is delete the current record, that is what will happen - only it doesn't happen *every* time because sometimes the execution of the new request is virtually immediate and other times it is not, depending on the speed of the connection, speed of the computer, number of connections to the server, etc, etc. ...
      (comp.lang.php)
    • Re: Header call and exit()
      ... If making a header(location:) call, is it good practice to place an exit() statement after it, or will the header call take control of the script? ... If the exitcommand is not issued, the script can still do database access, or whatever in the 'background'? ...
      (comp.lang.php)
    • Re: output buffering, parse error unexpected t_string
      ... This is the header line it conflicts with so I surrounded it with the ... I have a question is this buffer supposed to go around the whole php ...  Everytime I used it with the exit ...
      (comp.lang.php)