comp.lang.ada
 help / color / mirror / Atom feed
From: agate!linus!linus.mitre.org!texas!jclander@ucbvax.Berkeley.EDU  (Julian C . Lander)
Subject: Re: Difference between a function and an operation
Date: 24 Sep 92 15:27:26 GMT	[thread overview]
Message-ID: <1992Sep24.152726.17404@linus.mitre.org> (raw)

In article <PDB7L1R@math.fu-berlin.de>, 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

             reply	other threads:[~1992-09-24 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-09-24 15:27 Julian C . Lander [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-09-25  2:19 Difference between a function and an operation portal!cup.portal.com!R_Tim_Coslet
1992-09-29 18:57 Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox