Back to questions
JuniorTheoryCommon
What does the program print (lines separated by spaces)?
Товар = Новый Структура("Наименование, Цена", "Ручка", 15);
Товар.Вставить("цена", 20);
Сообщить(Товар.Количество());
Сообщить(Товар.Цена);
Сообщить(Товар.Свойство("Скидка"));2 20 Нет
- Expecting
ценаandЦенаto be two keys: a structure key ignores letter case, andВставитьreplaces the value - Expecting
Свойствоto fail on a missing key: the method returnsЛожь, while readingТовар.Скидкаraises the error
- What happens when the program reads
Товар.Скидкаdirectly? - How does
Свойствоhand back the value of a key it finds?