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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1540032852ee6d61 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!news.ecp.fr!jussieu.fr!news.enst.fr!news.rfc1149.net!not-for-mail From: "Grein, Christoph (Fa. ESG)" Newsgroups: comp.lang.ada Subject: AW: Why does this work? (overloads) Date: Wed, 07 Feb 2007 07:45:27 +0100 Organization: ENST, France Message-ID: NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: news.enst.fr 1170830706 79246 137.194.161.2 (7 Feb 2007 06:45:06 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 7 Feb 2007 06:45:06 +0000 (UTC) To: Jerry , comp.lang.ada@ada-france.org Return-Path: In-reply-to: <1170823163.681564.186260@s48g2000cws.googlegroups.com> X-MIMEOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Thread-topic: Why does this work? (overloads) Thread-index: AcdKcskFUHbR9SO6TRCfI/Rgp6ZmAQAD8hgA X-MS-Has-Attach: X-MS-TNEF-Correlator: X-OriginalArrivalTime: 07 Feb 2007 06:44:51.0418 (UTC) FILETIME=[77C8FBA0:01C74A83] X-Virus-Scanned: amavisd-new at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.9rc1 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , X-Leafnode-NNTP-Posting-Host: 88.191.17.134 Xref: g2news2.google.com comp.lang.ada:9049 Date: 2007-02-07T07:45:27+01:00 > H := 1.0 + f * x; -- Adds scalar, 1.0, to a vector using my overload > above. > a := 1.0 + f * x; -- Adds scalar, 1.0, to another scalar, an inner > product. This feature is called overloading. For a problematic example, consider X := A*B*C; where all four are vectors. Is it (A*B) inner product * C resulting in vector or (A*B) vector * C resulting in vector. The compiler can't tell and will reject the code.