From: "Steve Doiel" <nospam_steved@pacifier.com>
Subject: Re: Comments at the End of Lines
Date: 1999/07/03
Date: 1999-07-03T00:00:00+00:00 [thread overview]
Message-ID: <377e7376.0@news.pacifier.com> (raw)
In-Reply-To: 7llkoc$1uq$1@usenet01.srv.cis.pitt.edu
[snip]
>
>One problem that I have with your declaration up there is that you move
from
>inches to feet. If your lengths are in inches, why are your areas not in
>inches? I would think it funny to see an area function that looked like
>this:
>
>-- linear values are in inches, area returned in sq. ft.
>function Area(L: Float, W: Float) return Float is
>begin
> return ((L * W) / 144); -- must convert after calculation
>end Area;
>
>Rather, I would imagine that you would normally do it like this:
>
>function Area(L: Float, W: Float) return Float is
>begin
> return L * W;
>end Area;
>
I agree that it seems odd that length is maintained in inches while area is
maintained in square feet. But in certain industries this as a "standard"
convention.
BTW: I didn't really want to get into it with regard to the placement of
comments but what is perhaps a better answer to the unit question is to
declare different types for each unit and provide overloaded math functions
that implicitly convert dimensions.
SteveD
next prev parent reply other threads:[~1999-07-03 0:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-02 0:00 Comments at the End of Lines Roger Racine
1999-07-02 0:00 ` John Duncan
1999-07-02 0:00 ` Robert Dewar
1999-07-02 0:00 ` Robert Dewar
1999-07-03 0:00 ` Steve Doiel
1999-07-03 0:00 ` Chad R. Meiners
1999-07-03 0:00 ` John Duncan
1999-07-03 0:00 ` Steve Doiel [this message]
1999-07-03 0:00 ` Larry Kilgallen
1999-07-02 0:00 ` Martin C. Carlisle
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox