From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,32e9e18947de9391 X-Google-Attributes: gid103376,public From: "Steve Doiel" Subject: Re: Comments at the End of Lines Date: 1999/07/03 Message-ID: <377e7376.0@news.pacifier.com>#1/1 X-Deja-AN: 496855616 References: <7lir0r$og1$1@usenet01.srv.cis.pitt.edu> <377e3757.0@news.pacifier.com> <7llkoc$1uq$1@usenet01.srv.cis.pitt.edu> X-Trace: 3 Jul 1999 13:32:54 PST, 216.65.140.16 Newsgroups: comp.lang.ada X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Date: 1999-07-03T00:00:00+00:00 List-Id: [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