* Working with GNAT Ada
@ 1997-10-02 0:00 James H. Robinson, III
1997-10-02 0:00 ` Jon S Anthony
0 siblings, 1 reply; 2+ messages in thread
From: James H. Robinson, III @ 1997-10-02 0:00 UTC (permalink / raw)
I typed the following code from my textbook into GNAT Ada 95:
-- Precompiled instantiations of Integer_IO and
-- Float_IO for the predefined Integer and Float types
WITH Text_IO;
PACKAGE My-Int-_IO IS
NEW Text_IO.Integer_IO (Num => Integer);
WITH Text_IO;
PACKAGE My_Flt_IO IS
NEW Text_IO.Float_IO (Num =>);
When I tried to compile this code, I received many error messages such as
my needing and END statement and my needing declarations. I don't have a
clue what's going wrong. Is this due to a difference between Ada83 and
Ada95? The problem is, I can't do any of the other examples in Chapter 2
until I get this instantiation working.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Working with GNAT Ada
1997-10-02 0:00 Working with GNAT Ada James H. Robinson, III
@ 1997-10-02 0:00 ` Jon S Anthony
0 siblings, 0 replies; 2+ messages in thread
From: Jon S Anthony @ 1997-10-02 0:00 UTC (permalink / raw)
In article <01bccf61$ff2dcbe0$eb2aaccf@default> "James H. Robinson, III" <jr3uva90@erols.com> writes:
> -- Precompiled instantiations of Integer_IO and
> -- Float_IO for the predefined Integer and Float types
>
> WITH Text_IO;
> PACKAGE My-Int-_IO IS
^---^--------- should be '_'
> NEW Text_IO.Integer_IO (Num => Integer);
>
> WITH Text_IO;
> PACKAGE My_Flt_IO IS
> NEW Text_IO.Float_IO (Num =>);
>
>
> When I tried to compile this code, I received many error messages such as
> my needing and END statement and my needing declarations.
Hyphens are not legal characters in identifiers in Ada. You been
hackin' Lisp recently? :-)
Works fine if you fix the syntax errors.
/Jon
--
Jon Anthony
STL, Belmont, MA 02178, 617.484.3383
"Nightmares - Ha! The way my life's been going lately,
Who'd notice?" -- Londo Mollari
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-10-02 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-02 0:00 Working with GNAT Ada James H. Robinson, III
1997-10-02 0:00 ` Jon S Anthony
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox