Ada Programming/Attributes/'Extended Width

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Description

[edit | edit source]

Returns the width for (sub)type T. T may be integer or enumeration type. All the parameters are optional. They are:

Base : Number_Base := 10
the base for which the width will be calculated.
Based : Boolean := FALSE
if TRUE, compute the width of the based format (e.g., 10#99#).
Space_If_Positive : BOOLEAN := FALSE
if TRUE, compute the width assuming that a positive integer will be preceded by a blank.

Example

[edit | edit source]
T'EXTENDED_WIDTH(Base, Based, Space_If_Positive)