Visit Our UNIX and Linux User Community


How do it...?


 
Thread Tools Search this Thread
Top Forums Programming How do it...?
# 1  
Old 01-11-2004
Question How do it...?

Smilie How could I put a numerical character in program status?
# 2  
Old 01-11-2004
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
# 3  
Old 01-12-2004
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);
}
}

Last edited by mbabeli; 01-12-2004 at 11:59 AM..
# 4  
Old 01-24-2004
but if you DEFINE a number already... use the define Smilie


if (some test condition){
return(EXIT_AFTER_FAILURE );
}
}

Previous Thread | Next Thread

Featured Tech Videos