comp.lang.ada
 help / color / mirror / Atom feed
* Problems with ADA libraries
@ 1998-11-05  0:00 Bryan Stacey Couch
  1998-11-06  0:00 ` dewar
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bryan Stacey Couch @ 1998-11-05  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1005 bytes --]

Hi!

I am a student studying for my degree in the UK I am having problems with
GNATS compiler for Windows 98.  I am trying to use the CALENDER packager but
keep being told that it can't be found.  The file is in the library
directory and I tried putting it in the same directory as the source file
but to no avail.

The code is as follows, it is going to be used as a timing package for an
automated machine line.  This basic code doesn't do much I just wanted to
check out how it worked.

Any help would be much appreciated and I don�t want someone to WRITE THE
CODE for me, just help with the compilation would be great.

Thanks

Stacey Couch
Staceycouch@mcmail.com

with Calender; use Calender;
procedure Time1 is
   package Time_Io is new Fixed_Io(Day_Duration);
   use Time_Io;
   T:Day_Duration;
   X:Float;
begin
   T:=Secound(Clock);
   Time_Io.Put(T);
   New_Line;
   for Z in 1..1000 loop
      X:=5.23234;
   end loop;
   T:=Secounds(Clock);
   Time_Io.Put(T);
   New_Line;
end Time1;








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

* Re: Problems with ADA libraries
  1998-11-05  0:00 Problems with ADA libraries Bryan Stacey Couch
@ 1998-11-06  0:00 ` dewar
  1998-11-06  0:00 ` Tom Moran
  1998-11-06  0:00 ` Dmitriy Anisimkov
  2 siblings, 0 replies; 6+ messages in thread
From: dewar @ 1998-11-06  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1875 bytes --]

In article <3642143b.0@news1.mcmail.com>,
  "Bryan Stacey Couch" <staceycouch@yahoo.com> wrote:
> Hi!
>
> I am a student studying for my degree in the UK I am having problems with
> GNATS compiler for Windows 98.  I am trying to use the CALENDER packager but
> keep being told that it can't be found.  The file is in the library
> directory and I tried putting it in the same directory as the source file
> but to no avail.
>
> The code is as follows, it is going to be used as a timing package for an
> automated machine line.  This basic code doesn't do much I just wanted to
> check out how it worked.
>
> Any help would be much appreciated and I don�t want someone to WRITE THE
> CODE for me, just help with the compilation would be great.


It sure is a pity that you insisted on using the obsolete Ada 83 name for the
package instead of the proper Ada 95 name:

     1. with Ada.Calender; use Ada.Calender;
             |
        >>> "Ada.Calender" is not a predefined library unit
        >>> possible misspelling of "Ada.Calendar"

     2. procedure Time1 is
     3.    package Time_Io is new Fixed_Io(Day_Duration);
     4.    use Time_Io;
     5.    T:Day_Duration;
     6.    X:Float;
     7. begin
     8.    T:=Secound(Clock);
     9.    Time_Io.Put(T);
    10.    New_Line;
    11.    for Z in 1..1000 loop
    12.       X:=5.23234;
    13.    end loop;
    14.    T:=Secounds(Clock);
    15.    Time_Io.Put(T);
    16.    New_Line;
    17. end Time1;

We can't give such a warning for Calender, since it is just fine for you as a
user to define your own package called Calender (or misspelled any other way
you please), but you can't introduce your own children of Ada.

Robert Dewar
Ada Core Technologies

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

* Re: Problems with ADA libraries
  1998-11-05  0:00 Problems with ADA libraries Bryan Stacey Couch
  1998-11-06  0:00 ` dewar
@ 1998-11-06  0:00 ` Tom Moran
  1998-11-06  0:00   ` dewar
  1998-11-06  0:00 ` Dmitriy Anisimkov
  2 siblings, 1 reply; 6+ messages in thread
From: Tom Moran @ 1998-11-06  0:00 UTC (permalink / raw)


It's Ada.Calendar, with an 'a', not calender.




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

* Re: Problems with ADA libraries
  1998-11-05  0:00 Problems with ADA libraries Bryan Stacey Couch
  1998-11-06  0:00 ` dewar
  1998-11-06  0:00 ` Tom Moran
@ 1998-11-06  0:00 ` Dmitriy Anisimkov
  2 siblings, 0 replies; 6+ messages in thread
From: Dmitriy Anisimkov @ 1998-11-06  0:00 UTC (permalink / raw)
  To: Bryan Stacey Couch

Bryan Stacey Couch wrote:
> GNATS compiler for Windows 98.  I am trying to use the CALENDER packager but
> keep being told that it can't be found.  The file is in the library

> with Calender; use Calender;
> procedure Time1 is

....

try CalendAr not CalendEr




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

* Re: Problems with ADA libraries
  1998-11-06  0:00 ` Tom Moran
@ 1998-11-06  0:00   ` dewar
  1998-11-06  0:00     ` Robert I. Eachus
  0 siblings, 1 reply; 6+ messages in thread
From: dewar @ 1998-11-06  0:00 UTC (permalink / raw)


In article
<36423ddc.24016891@SantaClara01.news.InterNex.Net>,
  tmoran@bix.com (Tom Moran) wrote:
> It's Ada.Calendar, with an 'a', not calender.

I didn't see my earlier post, so I will briefly repeat it.
If you had used the proper name for this package (which is
Ada.Calendar, and not simply Calendar, which is an old
obsolete usage for Ada 83 compatibility that should not be
used in new Ada 95 code), then GNAT would have given you a
nice error message:

     1. with Ada.Calender; use Ada.Calender;
             |
        >>> "ada.calender" is not a predefined library unit
        >>> possible misspelling of "ada.calendar"

But we can't give that message for Calender, since there is
nothing to stop you naming your own package Calender!

Robert Dewar
Ada Core Technologies

P.S. it is not immediately obvious how GNAT knows enough to
give this message, if you are interested in looking have a
look at the par-load.adb file (hint: it has to do with file
name crunching!)

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

* Re: Problems with ADA libraries
  1998-11-06  0:00   ` dewar
@ 1998-11-06  0:00     ` Robert I. Eachus
  0 siblings, 0 replies; 6+ messages in thread
From: Robert I. Eachus @ 1998-11-06  0:00 UTC (permalink / raw)


In article <71ut2n$vdr$1@nnrp1.dejanews.com> dewar@gnat.com writes:

  > But we can't give that message for Calender, since there is
  > nothing to stop you naming your own package Calender!

   In fact you could, if you want, say:

   package Calender renames Ada.Calendar;

   ...and your program will work just fine. ;-)
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




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

end of thread, other threads:[~1998-11-06  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-05  0:00 Problems with ADA libraries Bryan Stacey Couch
1998-11-06  0:00 ` dewar
1998-11-06  0:00 ` Tom Moran
1998-11-06  0:00   ` dewar
1998-11-06  0:00     ` Robert I. Eachus
1998-11-06  0:00 ` Dmitriy Anisimkov

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