Clear sky!
The situation is this: There is an array. I pass it to the procedure by value. I work inside the procedure allegedly with a copy of the array, but in the end it turns out that the link to it is still transmitted, and the value of the transmitted array changes.
part of the code in the procedure:
Процедура ЗаполнитьДаты(Периоды, Знач МойМассив, КолонкаНачала, КолонкаКонца) ... Пока Дата(МойМассив[0] + " 00:00:00") < ПерваяДатаЛиста Цикл МойМассив.Удалить(0); Если МойМассив.Количество() = 0 Тогда прервать; КонецЕсли; КонецЦикла; ... КонецПроцедуры;
What am I doing wrong, and how to do it right?
It is interesting that even if I do this:
Массив1 = Массив2; Массив1.Удалить(0);
Array2 will change. This begs the question - how in the usual assignment to copy the value, and not the link?