Andre,
A) you can do the #3 substitution on your own code, something like:
#define EXIT_FAILURE 1
Perhaps it can be done in stdlib.h but i'm not sure.
B)It's true(I guess)
C)If this constant hasnt been defined yet, you can make the substitution.
Try it!
Hugs, : )
-=3D-=3D-=3D-=3D-=3D-=3D-
Felipe Lima - Software Tester/ Developer
CPTS - Software Test Research Center
HP Brazil - PUCRS
----- Original Message -----
From: "Andr=E9 Mac=E1rio Barros" <and...@su...>
To: "Dev-Cpp-Users" <dev...@li...>
Sent: Thursday, May 22, 2003 2:39 PM
Subject: [Dev-C++] Exit Codes
> Dear Users,
>
> 1. Every time I finish a code without problems the final code is return=
0
> for an int main()
> function;
> 2. But, if exists inside the code a primary condition for the code run =
I
use
> a piece of
> code like the following:
> ...
> char *ptr;
>
> ptr=3Dmalloc(10*sizeof(char));
> if(!ptr)
> {
> printf("no mem");
> exit(1);
> }
> ...
> That is, I scape in advance of the execution because lack of resourc=
es;
> 3. It=B4s my interest to change the zero of the 1 statement for an
> EXIT_SUCCESS stdlib.h constant;
> 4. I couldn=B4t find an constant for 1 in an EXIT style;
> 5. I think I can=B4t change an exit(1) for an exit(EXIT_FAILURE) becaus=
e
this
> constant is equal to
> -1;
>
> My Questions:
> A) Can I make the #3 substitution?
> B) Is that true the #4 statement?
> C) Can I make the #5 substitution?
>
> Regards
> Andre
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ObjectStore.
> If flattening out C++ or Java code to make your application fit in a
> relational database is painful, don't do it! Check out ObjectStore.
> Now part of Progress Software. http://www.objectstore.net/sourceforge
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
|