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,1ce805592e46d231 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-06 02:43:36 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!128.39.3.168!uninett.no!not-for-mail From: Reinert Korsnes Newsgroups: comp.lang.ada Subject: Re: (elementary question) Test on type ? Date: Thu, 6 Sep 2001 11:36:57 +0200 Organization: UNINETT news service Message-ID: <9n7gg7$bke$1@snipp.uninett.no> References: <9n24g4$17q$1@snipp.uninett.no> <9n279a$1ua$1@snipp.uninett.no> <3B94B4B4.CE1955D6@nbi.dk> <9n2ctk$36v$1@snipp.uninett.no> NNTP-Posting-Host: sthrkou.ffi.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: snipp.uninett.no 999769415 11918 193.156.99.159 (6 Sep 2001 09:43:35 GMT) X-Complaints-To: news-abuse@uninett.no User-Agent: KNode/0.4 Xref: archiver1.google.com comp.lang.ada:12786 Date: 2001-09-06T11:36:57+02:00 List-Id: Ted Dennison wrote: > In article <9n2ctk$36v$1@snipp.uninett.no>, Reinert Korsnes says... >> >>Jacob Sparre Andersen wrote: >>> Seriously, what are you trying to do? >> >>Just do a bit different things in the function depending on the type >>of X. Say, X is Float of Interger.... > > But you can't specify such a parameter, unless you are working with > generics (is that it?). > > Again, what exactly are you trying to do? Or, is this entirely > theorietical? Well, I run into some logic problems which I actually solved by something -simplified - like (overloading): generic type T is (<>); with function F(X : T) return Float; procedure P(A : some type; B : another type; X : T); function F(X: some anumeration type) returns Float; function F(X: another enumeration type) returns Float; and: procedure P1 is new P(T => simething,F); Someone called John McCabe gave me the hint (in this interesting discussion). Thanks... reinert PS: Yes, call me "newbie" :-) > > --- > T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html > home email - mailto:dennison@telepath.com > http://home.chello.no/~rkorsnes