else if or if?
#1

Variant 1
Код:
if(VariableSet)
{
   print("OK");
   return 1;
}
if(!VariableSet)
{
   print("Not OK");
   return 1;
}
Variant 2
Код:
if(VariableSet)
{
   print("OK");
   return 1;
}
else if(!VariableSet)
{
   print("Not OK");
   return 1;
}
Which code will cause less lag than other? Or they're same?
Reply


Messages In This Thread
else if or if? - by lukas567 - 11.04.2012, 12:49
Re: else if or if? - by Slice - 11.04.2012, 12:52
Re: else if or if? - by lukas567 - 11.04.2012, 12:53
Re: else if or if? - by Slice - 11.04.2012, 13:05
Re: else if or if? - by lukas567 - 11.04.2012, 13:14
Re: else if or if? - by lukas567 - 11.04.2012, 13:20
AW: else if or if? - by Meta - 11.04.2012, 14:26

Forum Jump:


Users browsing this thread: 2 Guest(s)