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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,89814ab9e757697a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-19 00:44:02 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: user-defined type conversion Date: 19 May 2002 00:44:01 -0700 Organization: http://groups.google.com/ Message-ID: NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1021794241 10845 127.0.0.1 (19 May 2002 07:44:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 19 May 2002 07:44:01 GMT Xref: archiver1.google.com comp.lang.ada:24368 Date: 2002-05-19T07:44:01+00:00 List-Id: I am experimenting with a simple type system for physical units. Suppose, for example, I have types for inches and feet, and I wish to write an explicit conversion: type inches is new float; type feet is new float; function inches ( arg: feet ) return inches is begin return inches ( 12.0 * float(feet) ); end inches; The problem is that I am not allowed to use the name inches for the conversion function because it is already used for the type name. It seems that the name should be overloadable for both the type and the conversion function. Is there any way around this?