On Tue, 18 May 2021 18:13:10 +0000
mohamed hamza <medh...@hotmail.com> wrote:

> I want to change this peace of code
> 
>  procedure tfrmbasePagefo.DoSum(oDbGrid: TDbwidgetgrid; iRow:integer);
> VAR  n:currency; nn:integer; iCol:integer; oField:TField;
...
> with this one
...
> procedure tfrmbasePagefo.DoSum(oDbGrid: TDbwidgetgrid; iRow:integer);
> VAR  n:currency;  iCol:integer; oField:TField;

Your problem might be caused by the principal imcompatibility of a 64
bit with a 32 bit data type (currency vs. integer). You might attempt
to use an explicit cast ("integer (n)") to coerce the currency value
into an integer, accepting possible loss of range, precision or both.
Basically, the first version of the code seems to attempt (!) to resolve
the incompatibility of the data types by using an (implicitely assumed)
_real_ type result field for the "currency" case. Even that might fail
if the result data type doesn't comply.

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------



_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to