Back to questions
JuniorTheoryCommon
What does the program print (lines separated by spaces)?
Функция Проверка(Текст, Результат)
Сообщить(Текст);
Возврат Результат;
КонецФункции
Итог = Проверка("А", Ложь) И Проверка("Б", Истина);
Сообщить(Итог);А Нет
- Expecting
Иto evaluate both sides: afterЛожьon the left the result is known and the right side is never called - Expecting a function called inside an expression to print nothing: its
Сообщитьruns when it is called
- Which side of
ИЛИis skipped when the left side isИстина? - How does short-circuit evaluation guard a division by zero?