TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Content-type:
text/plain; charset=us-ascii
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Subject:
From:
Date:
Fri, 24 May 2002 08:39:41 -0500
MIME-Version:
1.0
X-To:
Randy Brukardt <[log in to unmask]>
Reply-To:
Parts/Attachments:
text/plain (33 lines)
> What is the justification, if any, for making a comparison operation
> available, and then defining it as meaningless?
>
> It's not meaningless. It is just defined such that two independently
derived
> access values may or may not be equal. This is very similar to the way
> floating point works; it shouldn't be that surprising. That is:
>
>     A := F'Access;
>     B := A;
>     C := G'Access;
>     D := C;
>     E := F'Acesss;
>
>     if A = B then -- Must be true.
>     if C = D then -- Must be true.
>     if A = C then -- Must be false.
>     if B = D then -- Must be false.
>     if A = E then -- May be either true or false.
>     if B = E then -- May be either true or false.

OK, I'll agree with you that it's not always meaningless.
It may be determinable at compile time by code analysis,
but it can't be trusted at run time.  I still don't see
much use for it!

At least floating point has ways of telling "close enough"  :-)

--
Wes Groleau
http://AFATDS/~wwgrol
http://freepages.rootsweb.com/~wgroleau/Wes

ATOM RSS1 RSS2