comp.lang.ada
 help / color / mirror / Atom feed
* [Spark] Using defered constants
@ 2003-04-15 13:18 Lutz Donnerhacke
  2003-04-16 13:01 ` Rod Chapman
  2003-04-23  9:28 ` Peter Amey
  0 siblings, 2 replies; 8+ messages in thread
From: Lutz Donnerhacke @ 2003-04-15 13:18 UTC (permalink / raw)


The following error does not make much sense for me. Any workaround?

$ cat example.lst
Line
   1  
   2  package t is
   3     type x is private;
   4     cx : constant x;
   5     procedure copy(o : out x; i : Integer);
   6     --# derives o from i;
   7  private
   8     --# hide t;
   9     type x is new Integer;
  10     cx : constant x := 0;
  11  end t;
  12  
  13  package body t is
  14     procedure doupdate(o : in out x; i : Integer)
  15       --# derives o from i, o;
  16       is
  17        --# hide doupdate;
  18     begin
  19        o := o + x(i);
  20     end doupdate;
  21     
  22     procedure copy(o : out x; i : Integer) is
  23     begin
  24        o := cx;
                 ^3
*** (  3)  Semantic Error:611: Illegal use of deferred constant prior to its 
           full declaration.

  25        doupdate(o, i);
  26     end copy;
  27  end t;



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

end of thread, other threads:[~2003-04-23 10:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-15 13:18 [Spark] Using defered constants Lutz Donnerhacke
2003-04-16 13:01 ` Rod Chapman
2003-04-16 13:37   ` Lutz Donnerhacke
2003-04-16 15:05     ` Hyman Rosen
2003-04-16 15:15       ` Lutz Donnerhacke
2003-04-16 15:27       ` Vinzent Hoefler
2003-04-23  9:28 ` Peter Amey
2003-04-23 10:52   ` Lutz Donnerhacke

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