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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,fa2ee17d1c33f7d5,start X-Google-Attributes: gid103376,public From: Fran�oise & Herv� BITTEUR Subject: How could I name it ? Date: 1998/11/08 Message-ID: <3645C3C4.2A05@club-internet.fr>#1/1 X-Deja-AN: 409652503 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1 X-Trace: front6.grolier.fr 910541802 2840 195.36.149.213 (8 Nov 1998 16:16:42 GMT) Organization: Club-Internet (France) Mime-Version: 1.0 Reply-To: hbitteur@club-internet.fr NNTP-Posting-Date: 8 Nov 1998 16:16:42 GMT Newsgroups: comp.lang.ada Date: 1998-11-08T16:16:42+00:00 List-Id: Please, how could I name the item 'Ptr', belonging to task body 'T' in the following entry point. I cannot name it simply 'Ptr' since the entry point already has a 'Ptr' as parameter. The various constructions, all flagged hereunder with comment "Not OK", lead to the GNAT compilation message : invalid prefix in selected component "T" How come ? Besides, this is a simplified old piece of code (Ada 83) that used to compile correctly on VaxAda. Thanks for any clue. --Herv� BITTEUR ---- cut here ------------------------------------------------------- procedure Test is type T; type T_Ptr is access T; task type T is entry Point (Ptr : in T_Ptr); end T; task body T is Ptr : T_Ptr; My_Ptr : T_Ptr; begin accept Point (Ptr : in T_Ptr) do --Ptr := Ptr; -- not OK, of course My_Ptr := Ptr; -- OK, but I don't like it ! T.Ptr := Ptr; -- not OK T.My_Ptr := Ptr; -- not OK Test.T.Ptr := Ptr; -- not OK Test.T.My_Ptr := Ptr; -- not OK end Point; end T; begin null; end Test; -- gnatmake -g test.adb -- gcc -c -g test.adb -- test.adb:17:10: invalid prefix in selected component "T" -- test.adb:18:10: invalid prefix in selected component "T" -- test.adb:20:14: invalid prefix in selected component "T" -- test.adb:21:14: invalid prefix in selected component "T" -- gnatmake: "test.adb" compilation error ----- end of example --------------------------------------------------