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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,73b34c20caa911d1 X-Google-Attributes: gid103376,public From: progers@acm.org Subject: Re: Math on dimensioned quantities Date: 1996/07/10 Message-ID: <4s0g7q$dca@uuneo.neosoft.com>#1/1 X-Deja-AN: 167587558 references: <9607091345.AA03915@most> organization: NeoSoft, Inc. reply-to: progers@acm.org newsgroups: comp.lang.ada Date: 1996-07-10T00:00:00+00:00 List-Id: In , bobduff@world.std.com (Robert A Duff) writes: >In article <9607091345.AA03915@most>, >W. Wesley Groleau (Wes) wrote: >>writers listening?--how about a pragma similar to >> >> pragma Disallow ( Operation => "*", For_Type => Inch ); > >How about: > > function "*"(X, Y: Inches) return Inches is <>; > >? Then this particular "*" is abstract and therefore can't be called, >and this is checked at compile time. You can still multiply >inches*inches to get square-inches. It's annoying that you might have >to declare lots of "is <>" functions, but I think it does solve the >problem. Bob's memory is too good :) The "<>" syntax was changed to use the reserved word "abstract". pat --------------- Patrick Rogers progers@acm.org