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_50,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!think!nike!ucbcad!ucbvax!ti-eg.CSNET!LINNIG From: LINNIG@ti-eg.CSNET (Mike Linnig) Newsgroups: net.lang.ada Subject: Overloading "and" Message-ID: <8611020431.AA01146@ucbvax.berkeley.edu> Date: Fri, 31-Oct-86 09:25:00 EST Article-I.D.: ucbvax.8611020431.AA01146 Posted: Fri Oct 31 09:25:00 1986 Date-Received: Mon, 3-Nov-86 22:44:35 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet List-Id: Here's something that I thought was illegal. We've all seen Ada programs that overloaded the standard operators ("+","-","*","/"). We've also seen people overload the concatination operator "&". But I didn't think it was possible to overload the "AND" and "OR" operators. The following compiles without error on DEC Ada: PACKAGE test is function "and"(l,r: integer) return integer; END test; ---------------------------------------------------------------------- WITH test; USE test; PROCEDURE mytest IS a, b,c : integer; BEGIN a := b AND c; -- a call to the function TEST."AND" END mytest; ---------------------------------------------------------------------- Many thanks to Renzo Bianchi and Gary Smith of TI, Colorado Springs for bringing this to my attention. Live and learn. -- Mike Linnig, Texas Instruments