comp.lang.ada
 help / color / mirror / Atom feed
* Of Empty Records
@ 1988-05-05 15:00 Black Adder
  0 siblings, 0 replies; only message in thread
From: Black Adder @ 1988-05-05 15:00 UTC (permalink / raw)



    I have a problem when using empty records. Here is the sample type
    declaration that I use:

      type EMPTY_TYPE is
        record
          null;
        end record;

    now, I would like to declare a constant of that type, i.e.

      EMPTY : constant EMPTY_TYPE := ??? ;

    but it seems there is no way I could specify a value of type
    EMPTY_TYPE. One solution would be to declare a variable of that type,
    without any initial value. It does work on my compiler, behaves as a
    constant, but I don't "like" it.

    Is there another solution? did the language designers simply ignore
    this problem?

    Thanks,

      Magnus Kempe
      CS Dept.
      Swiss Federal Institute of Technology, Lausanne

      kempe@elma.epfl.ch (not always, avoid stormy days...)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1988-05-05 15:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1988-05-05 15:00 Of Empty Records Black Adder

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