Back to questions
JuniorTheoryCommon
What does the program print (lines separated by spaces)?
Х = "15";
Х = Х + 1;
Сообщить(ТипЗнч(Х) = Тип("Число"));
Сообщить(Х);Нет 151
- Expecting
"15" + 1to give the number16: with a string on the left+joins strings and gives"151" - Expecting a variable to have its own type that
+changes: the type belongs to the value, andХholds a string again
- How do you turn the string
"15"into a number before adding? - Why do the 1C standards check a type with
ТипЗнч(Х) = Тип("Число")?