- The following language-defined generic library package exists:
type Object(<>) is limited private;
package System.Address_To_Access_Conversions is
type Object_Pointer is access all Object;
function To_Pointer(Value : Address) return Object_Pointer;
function To_Address(Value : Object_Pointer) return Address;
pragma Convention(Intrinsic, To_Pointer);
pragma Convention(Intrinsic, To_Address);
- The To_Pointer and To_Address subprograms convert back and forth between
values of types Object_Pointer and Address. To_Pointer(X'Address) is equal
to X'Unchecked_Access for any X that allows Unchecked_Access. To_Pointer(Null_Address) returns null. For other addresses, the behavior is
unspecified. To_Address(null) returns Null_Address (for null of the
appropriate type). To_Address(Y), where Y /= null, returns Y.all'Address.
- An implementation may place restrictions on instantiations of Address_To_Access_Conversions.
-- Email comments, additions, corrections, gripes, kudos, etc. to:
Page last generated: 95-03-12