How could I put a numerical character in program status?
marpin,
Your question needs to be a little more clear. Provide code and the background for your question - otherwise it might be taken as homework (which shouldn't be posted here).
Are you talking about function returns? Or a program return value, such as one that can be retrieved with an echo $? after the program runs?
If the latter, it's a simple exit(-1) or some number. Please elaborate.
Cheers,
Keith
i hope that i got your question right, but is it's what i think then you need to define that number
#define EXIT_AFTER_FAILURE -6
.
.
.
.
.
int main(int argc, char *argv[]){
some functions();
..
..
..
if (some test condition){
return(-6);
}
}
but if you DEFINE a number already... use the define
if (some test condition){
return(EXIT_AFTER_FAILURE );
}
}