Answer the question
In order to leave comments, you need to log in
How to write a double value to an array of type variant?
The array FINAL_ARRAY of type Variant contains various information. These are text and integers.
FINAL_ARRAY : array of array [1..5] of Variant;
.....
FINAL_ARRAY[1,1]:='Текст';
//Далее все заполним нулями
for i:=2 to 5 do
begin
for j:=1 to 9 do
begin
FINAL_ARRAY[j,i]:=0;
end;
end;
percent:float; //процент
current_float:float; //просто дробное число
...
percent:=FINAL_ARRAY[7,4] div 100; //Деление с остатком. результат помещаем в percent типа float
for i:=2 to 6 do
begin
current_float:=RoundTo(FINAL_ARRAY[i,4] div percent, -1); //получили дробное число и округлили до десятых
FINAL_ARRAY[i,5]:=current_float; //Тут целое число?. Но деление было с остатком. Почему не дробное?
end;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question