Re[10]: оффтоп
От: _hum_ Беларусь  
Дата: 16.12.15 12:59
Оценка:
Здравствуйте, xobotik, Вы писали:

X>Здравствуйте, _hum_, Вы писали:


__>>безусловно, но использовать более одного return — это моветон


X>И когда это стало моветоном ? Можно пруфы?


wiki/Return_statement
Languages with an explicit return statement create the possibility of multiple return statements in the same function. Whether or not that is a good thing is controversial.

Strong adherents of structured programming make sure each function has a single entry and a single exit (SESE). It has thus been argued[6] that one should eschew the use of the explicit return statement except at the textual end of a subroutine, considering that, when it is used to "return early", it may suffer from the same sort of problems that arise for the GOTO statement.

 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.