return -2 in c
Discussion in "Software" started by gauravgate Feb 3, 2009.
Tue Feb 03 2009, 03:11 pm
pls tell me what is the meaning of return -2 in c?
these are the statements in a code
if(Plc_Active_Fl==0)return 0;
if(ENGRAVING_ON_FL==1)return -2;
these are the statements in a code
if(Plc_Active_Fl==0)return 0;
if(ENGRAVING_ON_FL==1)return -2;
Tue Feb 03 2009, 03:22 pm
in the above statements, function is checking PLC_active_fl flag if its 0 then function returns back 0 and if Engraving_On_fl is 1 then it returns a value -2.
usually -ve vaules are for showing errors. positive and 0 are for OK status.
usually -ve vaules are for showing errors. positive and 0 are for OK status.
Tue Feb 03 2009, 03:33 pm
but the value -2 is not used in program,
then why -2 only is returned to the main program?
then why -2 only is returned to the main program?
Tue Feb 03 2009, 03:57 pm
that you have to ask the programmer who wrote the program I cannot help you with that.
gaurav_pvg like this.
Powered by e107 Forum System