Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
exit() o return()
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
adriano meis  
View profile   Translate to Translated (View Original)
 More options Jul 3 2008, 1:37 pm
Newsgroups: it.comp.lang.c
From: "adriano meis" <umiumi...@invalid.it>
Date: Thu, 03 Jul 2008 17:37:38 GMT
Local: Thurs, Jul 3 2008 1:37 pm
Subject: exit() o return()

salve,
ho win98 ed il dev c++.
quando c'è la possibilità che si verifichi un errore prevedibile dal
programmatore (con le
 malloc, fopen(), passaggio prametri al main), di solito il
programmatore C inserisce una printf("errore").

A volte essa è seguita da exit(1), altre da return(-1).

Ora io chiedo: cosa cambi nei due casi? E' indifferente? Quando è meglio
l'uno al posto
dell'altro?

grazie,
adriano


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
camillo  
View profile   Translate to Translated (View Original)
 More options Jul 3 2008, 7:14 pm
Newsgroups: it.comp.lang.c
From: camillo <c...@g.c>
Date: Thu, 03 Jul 2008 23:14:44 GMT
Local: Thurs, Jul 3 2008 7:14 pm
Subject: Re: exit() o return()
"adriano meis" <umiumi...@invalid.it>:

> Ora io chiedo:

un
manuale
sul
c

hai chiesto questo.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
?manu*  
View profile   Translate to Translated (View Original)
 More options Jul 9 2008, 4:12 pm
Newsgroups: it.comp.lang.c
From: ?manu* <paol...@NO.math.unifi.SPAM.it>
Date: Wed, 09 Jul 2008 22:12:37 +0200
Local: Wed, Jul 9 2008 4:12 pm
Subject: Re: exit() o return()

adriano meis wrote:
> A volte essa è seguita da exit(1), altre da return(-1).

> Ora io chiedo: cosa cambi nei due casi? E' indifferente? Quando è meglio
> l'uno al posto
> dell'altro?

exit lo puoi fare da qualunque punto del codice. Il return(-1) potrà
essere utile allo scopo solo se ti trovi nel main.

E.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google