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: 103376,7272aa7508a3d83f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news.abs.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: pointer questions References: From: Stephen Leake Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:zFs0FM5IRcowNCkzogzBZHym/N8= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 Oct 2005 21:12:37 -0400 NNTP-Posting-Host: 66.159.65.1 X-Complaints-To: abuse@toad.net X-Trace: news.abs.net 1130375563 66.159.65.1 (Wed, 26 Oct 2005 21:12:43 EDT) NNTP-Posting-Date: Wed, 26 Oct 2005 21:12:43 EDT Xref: g2news1.google.com comp.lang.ada:5973 Date: 2005-10-26T21:12:37-04:00 List-Id: Szymon Guz writes: > Hi, > I've got some maybe stupid questions but I don't understand some things: > > 1. Is there a pointer like (void *) from C that points to anything ? > > 2. Is there a universal (like above) pointer for procedure|function > that can point to any kind of procedure|funcion ? As others have said, the short answer is "no". However, depending on what you really want to do, there are ways to define one pointer that can point to different functions at different times. One way is a simple 'access subprogram type. Another is class wide programming on an inheritance type heirarchy. Can you say something about what you are trying to do (assuming it's more than "make Ada look like C")? -- -- Stephe