Re: percentage



Hi,

maybe you have an overflow.
Integer (32 bit) range is -2.147.483.648 .. 2.147.483.647
If you e.g. subtract 2.5% from x = 100.000.000
by the formula dec(x, (25 * x) div 1000), you get an overflow,
unless you declare x to be int64.

Regards
Heiner


.



Relevant Pages

  • Re: Static Array
    ... MyArray = record case byte of ... Regards ... Heiner ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: finding the day of the year
    ... "The gregorian calendar states that friday to follow immediately Thursday ... Regards ... Heiner ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: Grid like excel
    ... OnDrawCell event. ... Regards ... Heiner ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: Keyboard Event
    ... I use the keyup event of a form or other controls for this task ... Regards ... Heiner ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)
  • Re: The Component real position...
    ... > away from the truth. ... Prev by Date: ...
    (alt.comp.lang.borland-delphi)