comp.lang.ada
 help / color / mirror / Atom feed
From: Bryan@SIERRA.STANFORD.EDU (Doug Bryan)
Subject: predefined operations
Date: Thu, 9-Oct-86 14:11:38 EDT	[thread overview]
Date: Thu Oct  9 14:11:38 1986
Message-ID: <12245469253.9.BRYAN@Sierra.Stanford.EDU> (raw)


Since we are still on the subject of predefined operations, I may as well
throw out the execption to the rule:

	procedure Not_Immediately_After is
	   type F1 is delta 1.0/16    range 0.0 .. 1_000.0;
	   type F2 is delta 2#0.1#E-3 range 0.0 .. 1_000.0;
	   X : F1 := 1.0;
	   Y : F2 := 2.0;
	begin
	   X := F1 (Standard."*"(X, Y));
	end Not_Immediately_After;

The reason this works is that any two fixed point operands may be multiplied.
Since the two fixed point types may be declared in different, non-overlapping
scopes, the only deterministic place to define "*" is in Standard.  The result
of this operation is of the type universal_fixed and is never implicitly
converted to a name type (like universal_integer and universal_real are).

doug
-------

             reply	other threads:[~1986-10-09 18:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-10-09 18:11 Doug Bryan [this message]
  -- strict thread matches above, loose matches on Subject: below --
1986-10-08 19:08 Predefined Operations BBardin
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox