comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Representing data differently
Date: Sun, 23 Feb 2003 21:59:40 GMT
Date: 2003-02-23T21:59:40+00:00	[thread overview]
Message-ID: <gvb6a.232887$be.212225@rwcrnsc53> (raw)
In-Reply-To: q5di5v0623163ejjvpjtm8e9hheo810dfo@4ax.com

>>In C I can represent the same data multiple ways using structs and
>>unions.  How and can I do this in Ada?
  Sometimes the item that tells which part of the union to use is
actually nearby, and you can just use a straight Ada discriminated
record.  Another possibility is to use a discriminated record where
a case statement on the discriminant tells which of several pointers
to use to point to the actual C data.



      reply	other threads:[~2003-02-23 21:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-07 14:15 Representing data differently Daniel Allex
2003-02-07 18:07 ` tmoran
2003-02-09  4:39   ` Craig Carey
2003-02-10 12:47     ` Colin Paul Gloster
2003-02-13 17:21       ` Craig Carey
2003-02-08  0:24 ` Wojtek Narczynski
2003-02-12 18:52 ` Martin Krischik
2003-02-22 19:09   ` Robert A Duff
2003-02-23 13:06     ` Martin Krischik
2003-02-23 21:09 ` Craig Carey
2003-02-23 21:59   ` tmoran [this message]
replies disabled

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