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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6e3cd8a6b7c1d008 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-27 11:26:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sunqbc.risq.qc.ca!carnaval.risq.qc.ca.POSTED!not-for-mail Message-ID: <3C03E97E.F91778A9@courriel.polymtl.ca> From: Louis Granger Organization: Ecole Polytechnique de Montreal X-Mailer: Mozilla 4.75 [fr] (Windows NT 5.0; U) X-Accept-Language: fr-CA,en,pdf MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Error with: for EntryName use at 16#address#; References: Content-Type: multipart/mixed; boundary="------------188F045C2A7D544639EFE719" Date: Tue, 27 Nov 2001 19:26:42 GMT NNTP-Posting-Host: 132.207.92.253 X-Trace: carnaval.risq.qc.ca 1006889202 132.207.92.253 (Tue, 27 Nov 2001 14:26:42 EST) NNTP-Posting-Date: Tue, 27 Nov 2001 14:26:42 EST Xref: archiver1.google.com comp.lang.ada:17056 Date: 2001-11-27T19:26:42+00:00 List-Id: Il s'agit d'un message multivolet au format MIME. --------------188F045C2A7D544639EFE719 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Why don't you try this one. It compiles without any error with GNAT 3.13p under W2K. ....Louis Stephen Leake a ?crit : > "Jean-David Tr?panier" ?JDT@hy.cgocable.ca? writes: > > ? Hi! I have a little problem for handling an interrupt. I receive this error > ? at the compilation of the code below: Expression has no possible > ? interpretation as an expression of the expected type Address, Continuing > ? > ? > ? > ? with Text_IO; with System; > ? procedure main is > ? --------TASK----------- > ? task TKeyboard is > ? entry keyp; > ? for Keyp use at 16#20#; -- Error at this line > > This looks like a copy from an Ada 83 compiler, where the "address" > for an entry was typically an interrupt number. In Ada 95, things are > different. You need to read your compiler manual. > > -- > -- Stephe --------------188F045C2A7D544639EFE719 Content-Type: text/plain; charset=us-ascii; name="main.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="main.txt" with Text_IO; with System; with System.Storage_Elements; procedure main is --------TASK----------- task TKeyboard is entry keyp; for Keyp'Address use System.Storage_Elements.To_Address (16#20#); end TKeyboard; task body TKeyboard is begin loop accept keyp do text_io.put_line("Keypressed (numlock)"); end keyp; end loop; end TKeyboard; ------END TASK--------- begin null; end main; --------------188F045C2A7D544639EFE719--