comp.lang.ada
 help / color / mirror / Atom feed
* Export instances of procedures
@ 2000-04-18  0:00 Gautier
  2000-04-18  0:00 ` Vincent Marciante
  2000-04-19  0:00 ` Jean-Pierre Rosen
  0 siblings, 2 replies; 12+ messages in thread
From: Gautier @ 2000-04-18  0:00 UTC (permalink / raw)


Hi. GNAT 3.10-3.12 doesn't seem to want to export directly,
i.e. without "renames", instances of procedures out of a package.
Is there an Ada rule behind it ? No explanation found in the Manual.

Example:

1) This works:

     package DMA is
48:    procedure Read_8bit_AutoInit( linearAddressOfBuffer: unsigned_32;
                                     length: integer );
     end DMA;

  package body DMA is
    generic
      dmaCommand: Unsigned_8;
    procedure Program_DMA( linearAddressOfBuffer: unsigned_32;
                           length: integer );

    procedure Program_DMA( linearAddressOfBuffer: unsigned_32;
                           length: integer ) is
...
    end Program_DMA;

    procedure R8AI is new Program_DMA( 16#58# );

    procedure Read_8bit_AutoInit( linearAddressOfBuffer: unsigned_32;
                                  length: integer )
      renames R8AI;
  end DMA;

2) But, if I put: "procedure Read_8bit_AutoInit is new Program_DMA( 16#58# );"
   I get: "Read_8bit_Autoinit" conflicts with declaration at line 48
   and of course: missing body for "Read_8bit_AutoInit" declared at line 48

Strange, isn't it ?

______________________________________________________
Gautier  --  http://members.xoom.com/gdemont/gsoft.htm




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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-18  0:00 Export instances of procedures Gautier
2000-04-18  0:00 ` Vincent Marciante
2000-04-25  0:00   ` Gautier
2000-04-25  0:00     ` Robert Dewar
2000-04-26  0:00       ` Gautier
2000-04-25  0:00     ` Vincent Marciante
2000-04-26  0:00     ` Tucker Taft
2000-04-19  0:00 ` Jean-Pierre Rosen
2000-04-19  0:00   ` Pascal Obry
2000-04-19  0:00     ` Jean-Pierre Rosen
2000-04-19  0:00       ` Pascal Obry
2000-04-20  0:00         ` Gautier

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