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

WilliamErync
Sun May 05 2024, 02:35 am
Danielnof
Sat May 04 2024, 11:12 pm
oriminna
Sat May 04 2024, 08:28 pm
scaneraNom
Sat May 04 2024, 02:21 am
gtaletrzua
Fri May 03 2024, 10:55 am
Clydehet
Wed May 01 2024, 06:44 pm
Davidoried
Wed May 01 2024, 06:11 pm
KevinTab
Sun Apr 28 2024, 05:35 am