comp.lang.ada
 help / color / mirror / Atom feed
From: luo@cybercom.net ()
Subject: sign bit for digits type
Date: 1997/02/11
Date: 1997-02-11T00:00:00+00:00	[thread overview]
Message-ID: <5dq6am$5m0$1@lator.cybercom.net> (raw)


Subject: sign bit for digits type
Newsgroups: comp.lang.ada
Organization: Cyber Access Internet Communications, Inc.
Summary: 
Keywords: 

I have a float type as follows:

package A is
   type float_32 is digits 6;
end A;

This type is unsigned as defined by the language or the compiler?
I declare an object and a '-' operator as follows to handle negative
numbers:

with A;
package B is
  function "-" (x, y : A.float_32) renames A."-" return A.float_32;
  Real :A.float_32 := -5.0;
end B;

What happens in procedure C when I do the following:
with A;
with B;
procedure C is
  value : A.float_32 := B.Real;
begin
  null;
end C;

What is value equal to, 5.0 or -5.0?
Is this compiler dependent?

TIA.





             reply	other threads:[~1997-02-11  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-11  0:00 luo [this message]
1997-02-12  0:00 ` sign bit for digits type Mats Weber
1997-02-12  0:00 ` David Taylor
replies disabled

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