🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.ada
Article #1009

predefined operations

#1009
From: Doug Bryan
Date: Thu, 09 Oct 1986 18:11
21 lines
1342 bytes
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
-------
Technical Details
Message-ID: <12245469253.9.BRYAN@Sierra.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!caip!think!mit-eddie!genrad!decvax!ucbvax!SIERRA.STANFORD.EDU!Bryan

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!caip!think!mit-eddie!genrad!decvax!ucbvax!SIERRA.STANFORD.EDU!Bryan
From: Bryan@SIERRA.STANFORD.EDU (Doug Bryan)
Newsgroups: net.lang.ada
Subject: predefined operations
Message-ID: <12245469253.9.BRYAN@Sierra.Stanford.EDU>
Date: Thu, 9-Oct-86 14:11:38 EDT
Article-I.D.: Sierra.12245469253.9.BRYAN
Posted: Thu Oct  9 14:11:38 1986
Date-Received: Sat, 11-Oct-86 19:41:33 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 21