TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

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

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Thu, 23 Aug 2001 21:21:22 +0900
Reply-To: Toshitaka KUMANO <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"
Organization: Mitsubishi Electric Corporation
From: Toshitaka KUMANO <[log in to unmask]>
Parts/Attachments: text/plain (47 lines)
Thank you for comments.

Jacob Sparre Andersen wrote:
> I think for loops on floating point types is a mistake,
> since the step size isn't constant.

Constancy is desirable here ?

What do you think about enumeration, whose representations are
specified as sparse ones ?

 # type E is (A, B, C, D);
 # for E use (A => 0, B => 10, C => 100, D => 1_000);

In other words, I consider that for-loop iteration could be re-viewed
from abstract viewpoint that "what is the next", 'Succ.

 # And Floatings now have Succ.

That is my saying "orthogonal" mean.


> For fixed point types, where the step size can be constant,
> I consider it interesting (and something I might want to
> use). There is still a problem due to the possible
> difference between the requested and the actual resolution
> of fixed point types. Most readers of such code would
> probably expect the step size to be equal to the requested
> resolution and not to the somewhat more arbitrary actual
> resolution of the fixed point type.

'Succ for fixed is defined as,
"For a fixed point type, the function returns the result of adding small to the value of Arg."

So, your mention that "difference between the requested and the actual resolution"
would be of discussion domain for "what Small is".

When we need to match the requested and the actual, we can specify its
Small with representation clause, as you know.

Am I on wrong way ?

Regards,
--
------------------------------------------------------------------------
   Toshitaka KUMANO <[log in to unmask]>

ATOM RSS1 RSS2