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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d2dbb7c2489d3c69,start X-Google-Attributes: gid103376,public From: dgibson@snoopy.cis.ohio-state.edu (david scott gibson) Subject: Q: Dynamically testing type of any variable Date: 1996/06/03 Message-ID: <4ov0miINN99m@snoopy.cis.ohio-state.edu>#1/1 X-Deja-AN: 158235544 organization: The Ohio State University, Department of Computer and Information Science newsgroups: comp.lang.ada Date: 1996-06-03T00:00:00+00:00 List-Id: Hi. Is there any way to determine the type of an arbitrary Ada95 variable at runtime? Inside a generic unit, I'd like to test if a generic formal has been instantiated with a scalar type, and then if so, initialize it to some valid representation. It doesn't appear that the 'Class or 'Valid attributes help much since neither is defined for all types. Also, I'd prefer not using any exception trickery to deal with this. Any ideas? Dave -- dgibson@cis.ohio-state.edu