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,cdeb9be83428b637 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Ada95: at clause - 'Address Date: 1996/10/18 Message-ID: #1/1 X-Deja-AN: 190418827 references: <3267958B.41C6@erols.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-10-18T00:00:00+00:00 List-Id: In article <3267958B.41C6@erols.com>, Ramesh Sadasivam wrote: >In Ada95 I guess the "at clause" has been replaced with the 'Address. The "at clause" still exists, but is considered obsolescent. "for X use at Y;" means exactly the same thing as "for X'Address use Y;", but the second syntax is considered preferable. But if you have existing Ada 83 code, there is no need to modify it to use the second syntax. > ITEM_ADDRESS : SYSTEM.ADDRESS := ITEM; You need to make this a constant. In your CASE 1, the address was an 'in' parameter, which is a constant, so it worked. This is not a hard rule of Ada, but an allowed restriction. I think the GNAT error message points you to the right RM paragraph. The rule is that in portable code, if you want to say "for X'Address use Y;", make sure Y is a constant, and that it is declared before X. - Bob