Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Ada Programming/Attributes/'Integer Value

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Description For every integer type S, S'Integer_Value denotes a function with the following spec:function S'Integer_Value (Arg : <Universal_Fixed>) return S;The value returned is the integer value V, such that:Arg = V * T'Smallwhere T is the type of Arg. The effect is thus similar to first doing an unchecked conversion from the fixed-point type to its corresponding implementation type, and then converting the result to the target integer type. The difference is that there are full range checks, to ensure that the result is in range. This attribute is primarily intended for use in implementation of the standard input-output functions for fixed-point values.