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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8f0924b09d1aa9d2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!news.csl-gmbh.net!feeder.news-service.com!proxad.net!cleanfeed1-a.proxad.net!nnrp14-1.free.fr!not-for-mail Sender: sam@willow.rfc1149.net From: Samuel Tardieu Newsgroups: comp.lang.ada Subject: Re: Why is abs an operator, not a function? References: <1161148425.954662.138180@b28g2000cwb.googlegroups.com> Date: 18 Oct 2006 09:36:10 +0200 Message-ID: <877iyyulcl.fsf@willow.rfc1149.net> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Leafnode-NNTP-Posting-Host: 2001:6f8:37a:2::2 Organization: Guest of ProXad - France NNTP-Posting-Date: 18 Oct 2006 09:40:01 MEST NNTP-Posting-Host: 88.191.14.223 X-Trace: 1161157201 news-4.free.fr 12854 88.191.14.223:49688 X-Complaints-To: abuse@proxad.net Xref: g2news2.google.com comp.lang.ada:7025 Date: 2006-10-18T09:40:01+02:00 List-Id: >>>>> "Jerry" == Jerry writes: Jerry> Why is abs an operator and not a function? Just wondering. Is Jerry> there no way to write a function abs() that, say, computes the Jerry> absolute value of each of the components of a float array? Of course there is :) You can overload operators as well in Ada, just use the name "abs" (including the quotes). Sam -- Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/