From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,FROM_ADDR_WS autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 24 Sep 92 15:27:26 GMT From: agate!linus!linus.mitre.org!texas!jclander@ucbvax.Berkeley.EDU (Julian C . Lander) Subject: Re: Difference between a function and an operation Message-ID: <1992Sep24.152726.17404@linus.mitre.org> List-Id: In article , weberwu@inf.fu-berlin.de (Debora Weber- Wulff) writes: |> Could someone either explain the distinction between an operation |> and a function in Ada or quote chapter and versein the LMR? I understand tha t |> '+' and '*' and such are operations, and when I define a |> function hugo to return a value, then that is a function. But |> since I can overload '+' with function "+" (....) returns ... |> they seem the same to me. |> Is there a difference, or are they synonymous? |> -- |> Debora Weber-Wulff dww@inf.fu-berlin.de |> Institut fuer Informatik +49 30 89691 124 |> Nestorstr. 8-9 (INCLUDE "standard.disclaimer") |> D-W-1000 Berlin 31 (PRINTN (WITTY-MESSAGE TODAY)) You've got it right. Operations in Ada are functions, which is why the overloading works. You can't overload the function "/=", because that is defined to be the opposite of "=", which can be overloaded. The operational notation is merely a notational convenience. I don't remember offhand when you can use it for your own defined functions, and I'm too lazy to check the LRM. Julian C. Lander jclander@mitre.org