- 1
- 2
- 3
- 4
if (result == true)
return true;
else
return result;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+339.8
if (result == true)
return true;
else
return result;
этпипец... из разряда индокода, только в реале
Похоже, сначала возвращалось не булевское значение, а како-0то код ошибки и было что-то вроде:
А потом по ходу отладки решили возвращать булевское - поставили заплатку, да так она и осталась. В больший проектах и не такое встречется.
if (result == true)
return true;
else
{
if (result == false) return false;
else
{
return (!true) && (!false); // ну надо же хоть что-то вернуть....
}
}
да с === код не скомпилируется-смысл понятен=)
Ну да! Конечно! Автор же не знает значение result! Вот и надо узнать! А то он ещё возвратит result непонятно какой...)
мг...похожее обычно получается после нескольких мелких изменений в коде в разное время. А потом как-нибудь смотришь на весь фрагмент в целом и понимаешь что данунах.
я иногда так куски html комментирую
..
if(0){
?>
<table><tr..<?=$var?>
строк 30
</table>
<?
}
главное по view source всего этого не будет ))
так что в процессе многоразового исправления и не такое "накапливается"
smarty - наше всё
C11 читай, умник
return result == true;
Или ещё православней использовать преобразование типа
Так-что все кто сразу заржали, что автор полный мудак ВОЗМОЖНО тоже мудаки
А вообще надо в таких случаях писать так:
return not result or true
Т.е. если некоторый язык считает, что result это false, то not от этого значения вернет true, в противном случае true вернет правая часть or.
new variable = 0;
if(varible)
{
return varible = true;
}
else if(!varible)
{
return varible = false;
}
Hand bags are the essential accessories for the women as this stuff can add the elegance and beauty in their outlook. The trend of using handbags is rising to the peak level from the time when the celebrities have been going to carry the stylish and branded bags with them.
The celebrities are the real inspiration behind the rising demands of hands bags A woman who wants to look like a super star always tries to copy her but there is a problem; the branded bags are not very affordable and normally tagged with high price. So how to deal with this problem, very simple just go for replica handbags
[url=http://www.handbagshermes.org.uk ] Replica Handbags[/url] are carbon copies of [url=http://www.voguesking.net ] replica handbags[/url] . What increase the demand of these [url=http://www.chanel-handbags.co.uk ] replica chanel handbags[/url] is the affordability as it is an accessible for all women. The women who can’t afford the branded and designer bags have an alternative in the form of replica handsbag . By carrying this bag a woman can look like a celebrity and it is what for which she desire always.
Normally at the first look Free Reprint Articles,you can never find the difference between a [url=http://www.replicacartierhandbags.co.uk ]replica cartier handbags[/url] and its replica but when you look it closely and keenly you noticed several things. The first thing is the quality of material that is used for the production of such bags. By and large the material of these bags is of average quality. Still there are some companies that are using the same quality material as used by designers.
http://www.nikeoutletfactorystore.com/ Nike Outlet Factory
http://www.longchamp--outlet.com/ Longchamp Outlet
http://www.nikeflyknit.org/ Nike Flyknit
http://www.oakleysunglassesoutlet.name/ Oakley Outlet
http://www.oakleyoutletstore.net.co/ Oakley Outlet
http://www.tomsoutletstore.org/ Toms Outlet
http://www.ralphlaurenoutletstoreonline.com/ polo ralph lauren outlet online
http://www.katespadeoutletsstore.com/ Kate Spade Outlet
http://www.air-max2015.org/ nike air max 2015
http://www.adidasoutletstore.org/ Adidas Outlet Store
http://www.yeezyboost350.us.com/ Yeezy Boost 350
http://www.nikeoutletsstore.com/ Nike Outlet
http://www.yeezyboost.org/ Yeezy Boost 350
http://www.longchampoutletstore.us.com/ longchamp outlet
http://www.katespade-outlet.org/ kate spade outlet
http://www.nfAljerseyswhosale.us.com/ Cheap NFL Jerseys
http://www.airmax2016.us.com/ Nike Air Max 2016
http://www.raybanoutletsunglasses.net/ Ray Ban Outlet
http://www.burberryoutletstoreonline.org/ Burberry Outlet
http://www.adidasyeezyboost350.org/ Adidas Yeezy
<a href="http://www.vansshoes.in.net"><strong>vans sk8 hi</strong></a>
[url=http://www.cheapjordans.com.co]cheap jordan shoes[/url]
[url=http://www.airjordan-uk.org.uk]air jordan uk[/url]
http://www.airforce1-nike.fr
http://www.canadagooseuk.me.uk
ghd straighteners
burberry outlet