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,c30642befcd7bf85 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: New GNAT ports (was Re: Ada and Automotive Industry) Date: 1997/01/08 Message-ID: #1/1 X-Deja-AN: 208730081 references: <5asvku$jtu$1@goanna.cs.rmit.edu.au> <32D2B847.6A7@lmtas.lmco.com> <5avfqo$it9$1@goanna.cs.rmit.edu.au> organization: New York University newsgroups: comp.lang.ada Date: 1997-01-08T00:00:00+00:00 List-Id: Richard said "The only reason that I bothered about the placement of code at all was that the 8051 book I was studying included a memory test program that did this. According to the Ada 83 LRM I had handy, you _couldn't_ supply address clauses for code." That is wrong, Ada 83 did allow you to specify the address of a subprogram, and in fact using this in conjunction with pragma Interface was a well known way of fooling a compiler into providing a mechanism equiavlent to an indirect call: procedure x; for x'address use expression; -- expression need not be static pragma interface (Ada, x); now when you call x, you call the subprogram at the given address. In fact CIFO specifically required this to work!