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: a07f3367d7,de7dd126d6737f3a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Callback in Ada Date: Tue, 4 Jan 2011 14:15:43 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <8lc2d0Fb6jU1@mid.individual.net> <4cf0ec67$0$6882$9b4e6d93@newsspool2.arcor-online.net> <393221c0-ac56-436f-b3f8-280c40d5a53a@j1g2000vbl.googlegroups.com> <10p6vzd761rdz$.1gtmc0fk6t9rb.dlg@40tude.net> <704b1c18-9d58-420f-b7af-205ccd1ca7ad@g26g2000vbz.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1294172145 17325 69.95.181.76 (4 Jan 2011 20:15:45 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 4 Jan 2011 20:15:45 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Xref: g2news2.google.com comp.lang.ada:17294 Date: 2011-01-04T14:15:43-06:00 List-Id: "Alex Mentis" wrote in message news:ifvp6h$qga$1@news.eternal-september.org... ... > In other words, from what I read, it looks like once this is supported > one could have a function Foobar in an .ads file that looks like > > function Foobar (A : Integer) return Integer is (if A > 10 then A - 5 > else A); > > and not need a corresponding function in the .adb file. Right. An alternative way of looking at this feature is that it provides a way to give a name to an expression. (This is modeled as a function because it is the least disruptive way to do that; the original idea was to call this a "renaming" of an expression.) The "body" in this case is just the expression being named. Randy.