Skip to content

Minor improvements to subsection on machine representation#1316

Open
gusthoff wants to merge 12 commits intoAdaCore:mainfrom
gusthoff:content/advanced_ada/review/numerics/fixed_point_types/20260214
Open

Minor improvements to subsection on machine representation#1316
gusthoff wants to merge 12 commits intoAdaCore:mainfrom
gusthoff:content/advanced_ada/review/numerics/fixed_point_types/20260214

Conversation

@gusthoff
Copy link
Collaborator

Minor improvements to subsection on machine representation of fixed-point types.

@gusthoff gusthoff added editorial improvement Improvements to e.g. an existing section labels Feb 14, 2026
@gusthoff gusthoff requested a review from swbaird February 15, 2026 00:59
@gusthoff gusthoff force-pushed the content/advanced_ada/review/numerics/fixed_point_types/20260214 branch from 6350a4c to 2b31a26 Compare February 23, 2026 21:09
@gusthoff gusthoff force-pushed the content/advanced_ada/review/numerics/fixed_point_types/20260214 branch from 2b31a26 to acb85da Compare February 26, 2026 02:43
Copy link

@swbaird swbaird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! A couple of small comments.

We can use an overlay to uncover the actual integer values stored on the
machine when assigning values to objects of decimal type. For example:
We can use an overlay in the body of the generic :ada:`Gen_Show_Info` procedure
to uncover the actual integer values stored on the machine for objects of
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing word; perhaps "the" or "a"?

procedure Gen_Show_Info (V : T_Decimal;
V_Str : String)
is
V_Int_Overlay : T_Int_Decimal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add an assertion that T_Decimal'Size = T_Int_Decimal'Size?
No warning will be generated for a size mismatch if we use an overlay instead of an Unchecked_Conversion instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editorial improvement Improvements to e.g. an existing section

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants