comp.lang.ada
 help / color / mirror / Atom feed
* Re: Newbe compile problems
@ 1996-12-16  0:00 Jamie Amendolagine
  1996-12-17  0:00 ` Robert Dewar
  1996-12-19  0:00 ` David Wheeler
  0 siblings, 2 replies; 14+ messages in thread
From: Jamie Amendolagine @ 1996-12-16  0:00 UTC (permalink / raw)



Sorry, I sent the wrong error. Here's the real source and error:

 with Float_Text_IO;
 use Float_Text_IO;
 procedure Think is
   A, B : Float := 0.0; -- A and B initially zero; note the period.
   I, J : Integer := 1;
 begin
   A := B + 7.0;
   I := J * 3;
   B := Float(I) + A;
   Put(B);
 end Think;

cd /home/jamie/learnAda/think/
gnatmake think.adb 
gcc -c think.adb
think.adb:1:07: file "float_text_io.ads" not found
compilation abandoned
gnatmake: "think.adb" compilation error
Compilation exited abnormally with code 2 at Sun Dec 15 09:44:55

Actualy I ended up fixing this myself. I've switched to a more recient
turorial with examples which are compiling--so far.  In any event I'll
keep my newbe questions to myself. 


Jamie




^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Newbe compile problems
@ 1996-12-24  0:00 Sazonov Cyril
  0 siblings, 0 replies; 14+ messages in thread
From: Sazonov Cyril @ 1996-12-24  0:00 UTC (permalink / raw)



Robert wrote me:

> Both points are quite wrong, even for Ada 83. There is no package
> Text_IO.Float_IO in either Ada 83 or Ada 95 (this is a generic package,
> not a package), and in any case, surely since the questioner is using
> Ada 95, we should suggest the proper package name Ada.Float_Text_IO.

I see. But I meant that one should use the generic package to create his own
example for the data type he is using. The thing is that all the Ada compilers
I've got were, not to say a bad words, a little bit strange... There were no
such usefull extensions based on the standard packages. At any rate the
package you mean, as I understood you, should be referenced with prefix "Ada."

> For the second point, 0.0 is of course a legal float literal, I am not
> quite sure what leads to this misconception.

Yes, it was my mistake, there's no nessesety to use exponential notation. But
somewhere ( at Wegner's  description of the preliminary version of the language
may be ? ) I've seen stressed difference betwean the notation of the FLOAT and
FIXED literals. At any rate I suppose the use of the exponetial part for the
FLOAT literals is a good style.

> Finally Cyril, why not get hold of GNAT so that you have access to Ada 95.
> you might want to contact Sergey Rybin at Moscow State University for
> information on how to obtain GNAT (he certainly has appropriate internet
> connections available there, and could perhaps supply a copy to you).

It is a very good idea. I hoped to find some Ada users in Russia, but just 2
months ago I had no access to the Internet mail ( mind that Russia is a very
peculiar country, where ones who work have nothing, just no instruments ) and
so had no means to look for them -- FIDOnet doesn't help in it, and my old
cheif supposed that The Way is C & DOS & Windows ;(

Robert, wouldn't you be so kind to tell me the E-mail of Sergey Rybin?

Merry X-mas !

Best wishes from Russia !                                      Cyril ( CS )




^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Newbe compile problems
@ 1996-12-18  0:00 Sazonov Cyril
  1996-12-19  0:00 ` Robert Dewar
  1996-12-19  0:00 ` Keith Thompson
  0 siblings, 2 replies; 14+ messages in thread
From: Sazonov Cyril @ 1996-12-18  0:00 UTC (permalink / raw)



>From cyril Wed Dec 18 10:15:50 WET 1996
>> Sorry, I sent the wrong error. Here's the real source and error:
>>
>> with Float_Text_IO;
>>  use Float_Text_IO;
>> procedure Think is
>>   A, B : Float := 0.0; -- A and B initially zero; note the period.
>>   I, J : Integer := 1;
>> begin
>>   A := B + 7.0;
>>   I := J * 3;
>>   B := Float(I) + A;
>>   Put(B);
>> end Think;
>>
>> cd /home/jamie/learnAda/think/
>> gnatmake think.adb
>> gcc -c think.adb
>> think.adb:1:07: file "float_text_io.ads" not found
>> compilation abandoned
>> gnatmake: "think.adb" compilation error
>> Compilation exited abnormally with code 2 at Sun Dec 15 09:44:55
>>
>> Actualy I ended up fixing this myself. I've switched to a more recient
>> turorial with examples which are compiling--so far.  In any event I'll
>> keep my newbe questions to myself.
>>
>>Jamie

As for me I've found two places where may be errors:

#1 >> with Float_Text_IO;

Are you sure that this package exists? The standard package is called
TEXT_IO.FLOAT_IO.

Or if the IO package is of your own, then check whether its has been compiled
_before_ you're trying to compile your sample.

#2 >>  A, B : FLOAT := 0.0;

This may an error too, the thing is that decimal IS NOT a sign of a FLOAT-type
constant, it is a sign of a FIXED-type constant. The FLOAT-type constant
should be written so 12.34E56, it IS to have a power_of_ten postfix. This
detail is mentioned in the LRM ( I've got the Ada83 one only ).

Best wishes from Russia!                                      Cyril Sazonov





^ permalink raw reply	[flat|nested] 14+ messages in thread
* Newbe compile problems
@ 1996-12-15  0:00 James Amendolagine
  1996-12-15  0:00 ` Tom Moran
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: James Amendolagine @ 1996-12-15  0:00 UTC (permalink / raw)



Hello,

   I am just starting with ADA. I am going through the ADA turorial, and
can't get some source code to compile. Here's the source:

 with Float_Text_IO;
 use Float_Text_IO;
 procedure Think is
   A, B : Float := 0.0; -- A and B initially zero; note the period.
   I, J : Integer := 1;
 begin
   A := B + 7.;
   I := J * 3;
   B := Float(I) + A;
   Put(B);
 end Think;

And the error message:

cd /home/jamie/learnAda/think/
gnatmake think.adb 
gcc -c think.adb
think.adb:7:14: real literal cannot end with point
gnatmake: "think.adb" compilation error
Compilation exited abnormally with code 2 at Sun Dec 15 09:34:00

I am using Redhat Linux. With gnat-3.07. --Other examples like "hello
world" compiled OK. Solutions?
Thanks in advance.

    Jamie




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~1996-12-24  0:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-12-16  0:00 Newbe compile problems Jamie Amendolagine
1996-12-17  0:00 ` Robert Dewar
1996-12-19  0:00 ` David Wheeler
1996-12-19  0:00   ` Larry Kilgallen
  -- strict thread matches above, loose matches on Subject: below --
1996-12-24  0:00 Sazonov Cyril
1996-12-18  0:00 Sazonov Cyril
1996-12-19  0:00 ` Robert Dewar
1996-12-19  0:00 ` Keith Thompson
1996-12-15  0:00 James Amendolagine
1996-12-15  0:00 ` Tom Moran
1996-12-15  0:00 ` Robert Dewar
1996-12-16  0:00 ` Richard Curnow
1996-12-17  0:00 ` David Wheeler
1996-12-19  0:00   ` Jesse E. Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox