ada Scalar Types Fixed Point (Decimal)

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Decimal fixed point types are typically used in accounting. They are characterised by both a delta and a number of decimal digits. Their arithmetical operations reflect the rules of accounting.

type Money is delta 0.001 digits 10;

Oil_Price : Money := 56.402;
Loss      : Money := 0.002 / 3; -- is 0.000


Got any ada Question?