Discussion in "Software" started by    gauravgate    Feb 3, 2009.
Tue Feb 03 2009, 03:11 pm
#1
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;
Tue Feb 03 2009, 03:22 pm
#2
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.
Tue Feb 03 2009, 03:33 pm
#3
but the value -2 is not used in program,
then why -2 only is returned to the main program?
Tue Feb 03 2009, 03:57 pm
#4
that you have to ask the programmer who wrote the program I cannot help you with that.
 gaurav_pvg like this.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am
ArnoldDiant
Fri Apr 26 2024, 03:53 am
RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am