From: Louis Granger <louis.granger@courriel.polymtl.ca>
Subject: Re: Error with: for EntryName use at 16#address#;
Date: Tue, 27 Nov 2001 19:26:42 GMT
Date: 2001-11-27T19:26:42+00:00 [thread overview]
Message-ID: <3C03E97E.F91778A9@courriel.polymtl.ca> (raw)
In-Reply-To: ulmgsjor6.fsf@gsfc.nasa.gov
[-- Attachment #1: Type: text/plain, Size: 837 bytes --]
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
[-- Attachment #2: main.txt --]
[-- Type: text/plain, Size: 528 bytes --]
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;
next prev parent reply other threads:[~2001-11-27 19:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-25 2:14 Error with: for EntryName use at 16#address#; Jean-David Tr�panier
2001-11-25 9:01 ` Jerry van Dijk
2001-11-26 2:58 ` Nick Roberts
2001-11-27 4:04 ` Robert Dewar
2001-11-27 14:02 ` Stephen Leake
2001-11-27 19:26 ` Louis Granger [this message]
2001-11-27 20:41 ` Jerry van Dijk
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox