comp.lang.ada
 help / color / mirror / Atom feed
* (no subject given)
@ 1996-02-21  0:00 pruiz
  1996-02-22  0:00 ` Pascal OBRY
  0 siblings, 1 reply; 12+ messages in thread
From: pruiz @ 1996-02-21  0:00 UTC (permalink / raw)


I would like to know why the gnat sends the  message :
  "type (Unit) must be declared abstract or Set (procedure) overrides"
when I'm compiling the package body "Controller-p.adb";the error is detected
in the specification, i.e., in "Controller-p.ads".

Package Controller is abstract and generic;
Package Controller.P is his child :it isn't Abstract!!! but is generic;
 I supposed when I writted it, that Set overrides, but this is not a problem,
is it ??? This is the usual when we are working with abstract types and subpro-
grams, isn't it???  This is my conclusion reading the last Barnes' book.

Next, I send the packages.

Thank you very much!!!!.

*******************************************************************************

generic    -- package Controller,it is abstract.

  type Controlled_Variable is delta <>;
  type Actuating_Variable  is delta <>;

package Controller is    -- generic

   type Unit is abstract tagged private;
   subtype Class is Unit'Class;


   procedure Set     (Device      : in  out  Unit)  is abstract;



   procedure Control (Device      : in  out  Unit;
                      Reference   : in       Controlled_Variable;
                      Measurement : in       Controlled_Variable;
                      Action      :     out  Actuating_Variable) is abstract;


private
   type Unit is tagged null record;

end Controller;


--  /**************************************************************************


generic  --  package Controller.P

   type Parameter  is delta <>;  --  generic parameter

package Controller.P is    --  generic

   type Proportional_Controller is new Unit with private;

private
   type Proportional_Controller is new Unit with
      record
         Gain : Parameter;
      end record;


   procedure Set      (Device      :   in  out  Proportional_Controller;
                       Gain        :   in       Parameter);

   procedure Control  (Device      :   in  out  Proportional_Controller;
                       Reference   :   in       Controlled_Variable;
                       Measurement :   in       Controlled_Variable;
                       Action      :       out  Actuating_Variable);


end Controller.P;



--  /**********************************************************************
--  / Controller.P
--  /**************************************************************************

package body Controller.P is    --  generic


   procedure Set      (Device      :  in   out Proportional_Controller;
                       Gain        :  in       Parameter)   is
   begin

      Device.Gain := Gain;

   end Set;


   procedure Control     (Device      :  in  out  Proportional_Controller;
                          Reference   :  in       Controlled_Variable;
                          Measurement :  in       Controlled_Variable;
                          Action      :      out  Actuating_Variable)   is
   Error : Controlled_Variable;

   begin

      Error  :=  Reference - Measurement;
      Action :=  Device.Gain * Error;

   end Control;

end Controller.P;


-- ***************************************************************************




^ permalink raw reply	[flat|nested] 12+ messages in thread
* (no subject given)
@ 1998-04-19  0:00 Chau
  1998-04-19  0:00 ` Matthew Heaney
  0 siblings, 1 reply; 12+ messages in thread
From: Chau @ 1998-04-19  0:00 UTC (permalink / raw)



Hi,

My name is Simon Chau. I have been searching for a copy of Ada 95 software
in the market for a long time without much success. Therefore will like to
request for a site where I might be able to download a copy of Ada 95.

Thanx and God Bless

Simon Chau
e-mail address : vcjq724@mbox4.singnet.com.sg




^ permalink raw reply	[flat|nested] 12+ messages in thread
* (no subject given)
@ 1996-09-03  0:00 Chris Sparks
  1996-09-04  0:00 ` Jon S Anthony
  1996-09-06  0:00 ` Jon S Anthony
  0 siblings, 2 replies; 12+ messages in thread
From: Chris Sparks @ 1996-09-03  0:00 UTC (permalink / raw)



I want to thank all of the individuals who responded to my query
about the "when others" part for a case statement.  My group decided
to not use "when others" so that the compiler can catch any new additions.

Thanks Robert for the insight about "pragma Assert".  Definitely a winner!

Chris Sparks

PS: Sorry for my ILLEGAL use of the work ERRONEOUS (pun intended)




^ permalink raw reply	[flat|nested] 12+ messages in thread
* (no subject given)
@ 1996-07-05  0:00 JOHN LY
  0 siblings, 0 replies; 12+ messages in thread
From: JOHN LY @ 1996-07-05  0:00 UTC (permalink / raw)



     unsubcribe




^ permalink raw reply	[flat|nested] 12+ messages in thread
* (no subject given)
@ 1994-12-21 20:07 Eric Baker
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Baker @ 1994-12-21 20:07 UTC (permalink / raw)


     Dear Ada Users,

     I am looking for anyone that has had work done by or considered using
     Alydaar, a translation & migration reengineering service in
     Madisonville, LA.  I am interested in their translation to Ada
     capabilities.  Please respond to me personally.


                                     Thanks,
                                     Eric Baker
                                     (205) 955-3549
                                     baker-md-pa@ccsmtp.redstone.army.mil



^ permalink raw reply	[flat|nested] 12+ messages in thread
* (no subject given)
@ 1994-11-20 20:12 Terry Mellon
  0 siblings, 0 replies; 12+ messages in thread
From: Terry Mellon @ 1994-11-20 20:12 UTC (permalink / raw)


+=========-=========-=========-=========-=========-=========+
| Terry Mellon                                              |
| Software Engineering EXcellence (SEEX)                    |
| 1219 E. Todd Dr.                   Phone: 602/838-3650    |
| Tempe, AZ 85283                 Internet: mellon@seex.com |
+=========-=========-=========-=========-=========-=========+



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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-02-21  0:00 (no subject given) pruiz
1996-02-22  0:00 ` Pascal OBRY
  -- strict thread matches above, loose matches on Subject: below --
1998-04-19  0:00 Chau
1998-04-19  0:00 ` Matthew Heaney
1998-04-19  0:00   ` Matthew Heaney
1996-09-03  0:00 Chris Sparks
1996-09-04  0:00 ` Jon S Anthony
1996-09-05  0:00   ` Robert Dewar
1996-09-06  0:00 ` Jon S Anthony
1996-07-05  0:00 JOHN LY
1994-12-21 20:07 Eric Baker
1994-11-20 20:12 Terry Mellon

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