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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.8dY8omnix++EB5/QBRk4Sw.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Beginning Ada Programming, by Andrew T. Shvets (2020) Date: Tue, 03 Dec 2019 14:39:21 +0000 Organization: Aioe.org NNTP Server Message-ID: References: <87muca3vgd.fsf@nightsong.com> <57d49047-0a61-4d13-8822-d004732a3acc@googlegroups.com> <3b1b248b-43d0-4762-b1f5-1c5460d24c8b@googlegroups.com> NNTP-Posting-Host: 8dY8omnix++EB5/QBRk4Sw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) Cancel-Lock: sha1:9lQW4XT7m5ChhdZmXYTVIs52dzA= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:57633 Date: 2019-12-03T14:39:21+00:00 List-Id: AdaMagica writes: > Define a type for values you can read from a foldable meter rod (0 to > 2 m). > > type Length is digits 4 range 0.0 .. 2.000; -- Meter > type Length is delta 0.001 range 0.0 .. 2.000; > > A meter rod allows one millimeter as maximal precision: > Floating point or fixed point number. > > What's difficult to grasp here? I think what's difficult to grasp is the need for such a type. Nothing wrong with float len; or, for the more enlightened, typedef float length; ... length len; :-) :-)