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.7 required=5.0 tests=AXB_XMAILER_MIMEOLE_OL_024C2, BAYES_00,MAILING_LIST_MULTI autolearn=no 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-04 02:18:56 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.251.151.101!opentransit.net!jussieu.fr!enst!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: (elementary question) Test on type ? Date: Tue, 4 Sep 2001 04:18:08 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <9n24g4$17q$1@snipp.uninett.no> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 999595134 80478 137.194.161.2 (4 Sep 2001 09:18:54 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 4 Sep 2001 09:18:54 +0000 (UTC) Cc: To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:12674 Date: 2001-09-04T04:18:08-05:00 You would say instead: if X in Integer then See section 4.5.2 of the Ada Language Reference Manual. ----- Original Message ----- From: "Reinert Korsnes" Newsgroups: comp.lang.ada To: Sent: September 04, 2001 3:41 AM Subject: (elementary question) Test on type ? Hi, is it possible in Ada to test on type ? (did not manage to find out) Assume: -- specification : generic type T is (<>); function F(X : T) return Float; --body : function F(X : T) return Float is begin if Type(X) = Integer then ?????? something... I := integer(X) ???? end; --application prog: function F1 is new F(T => Integer); reinert -- http://home.chello.no/~rkorsnes _______________________________________________ comp.lang.ada mailing list comp.lang.ada@ada.eu.org http://ada.eu.org/mailman/listinfo/comp.lang.ada