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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,27b7b39155b8a0d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-30 14:41:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!ppp-2-93.cvx4.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: Generics not overloadable Date: Fri, 30 Nov 2001 22:38:04 -0000 Message-ID: <9u91u5$71h5k$2@ID-25716.news.dfncis.de> References: <3C0611EB.F7E0E1A9@cfmu.eurocontrol.int> NNTP-Posting-Host: ppp-2-93.cvx4.telinco.net (212.1.149.93) X-Trace: fu-berlin.de 1007160069 7390388 212.1.149.93 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:17252 Date: 2001-11-30T22:38:04+00:00 List-Id: I think what Ian meant was that a generic unit can be a function, and some functions are recursive. E.g.: generic type Number is range <>; function Factorial (N: in Number) return Number; function Factorial (N: in Number) return Number is begin if N < 0 then raise Constraint_Error; end if; if N < 2 then return 1; end if; return N * Factorial(N-1); end; Here the last occurance of 'Factorial' is the use of the generic unit's name as its current instance in order to make a recursive call upon itself. -- Best wishes, Nick Roberts