Вниз
Скачать: CL | DM;

Математические операции   Найти похожие ветки 

 
Denizzz   (2004-08-19 12:19) [0]

Добрый день.

Есть поля
Netto - BCD
Percent - Integer
Netto2 - BCD

По нажатию кнопки должно выполниться следующее вычисление:
Netto2=Netto+Netto*Percent/100
Делаю так:
FMain.Table2.FieldByName("Netto2").AsBCD:=
FMain.Table2.FieldByName("Netto").AsBCD +
FMain.Table2.FieldByName("Netto").AsBCD *
FMain.Table2.FieldByName("Percent").AsInteger/100;

Где ошибка?


 
Соловьев ©   (2004-08-19 12:23) [1]


> Где ошибка?

вот именно - где???


 
Denizzz   (2004-08-19 12:27) [2]

Выдает: "Operator not applicable to this operand type"


 
Соловьев ©   (2004-08-19 12:35) [3]


> FMain.Table2.FieldByName("Netto2").AsBCD:=
> FMain.Table2.FieldByName("Netto").AsBCD +
> FMain.Table2.FieldByName("Netto").AsBCD *
> FMain.Table2.FieldByName("Percent").AsInteger/100;

AsBCD замени на AsFloat



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.024 c
1-1094128157
Lord de Mon
2004-09-02 16:29
2004.09.19
Таймер


1-1094453421
Koala
2004-09-06 10:50
2004.09.19
запуск команды в определенное время


11-1080710352
*pavel
2004-03-31 09:19
2004.09.19
hint & showhint


6-1087821074
NLO
2004-06-21 16:31
2004.09.19
HTTP ЗАПрос


1-1093635363
Фёдор Мегатронов
2004-08-27 23:36
2004.09.19
Как поделить Cardinal на Integer ?




   Наверх