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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!postnews.google.com!g47g2000cwa.googlegroups.com!not-for-mail From: "Gene" Newsgroups: comp.lang.ada Subject: Re: pointer questions Date: 26 Oct 2005 16:51:13 -0700 Organization: http://groups.google.com Message-ID: <1130370673.871663.78070@g47g2000cwa.googlegroups.com> References: NNTP-Posting-Host: 216.190.181.85 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1130370679 3205 127.0.0.1 (26 Oct 2005 23:51:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 26 Oct 2005 23:51:19 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g47g2000cwa.googlegroups.com; posting-host=216.190.181.85; posting-account=ZFTPUQ0AAABW8AYEou9RtrBd-zTxz0_y Xref: g2news1.google.com comp.lang.ada:5970 Date: 2005-10-26T16:51:13-07:00 List-Id: The package System has an Address type with comparison operations defined, and the package Address_To_Access_Conversions supports conversions between addresses and pointers. With the loss of some portability, you can also use Unchecked_Conversion to turn one kind of pointer to another, so you can set up your own "void*" equivalent type and convert to/from specific pointers. A universal pointer to function/procedure pointer is a marginally useful and very dangerous idea. But on most architectures you can use unchecked conversions to implement this kind of thing and get away with it.