From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 18 Aug 93 16:40:02 GMT From: cis.ohio-state.edu!magnus.acs.ohio-state.edu!csn!news.den.mmc.com!iplmail !jcrigler@ucbvax.Berkeley.EDU (Jim Crigler) Subject: Re: Data Overlays Message-ID: <1993Aug18.164002.5298@iplmail.orl.mmc.com> List-Id: Bill Lee (bill@leeweyr.sccsi.com) wrote: : In article <1993Aug13.124835.18422@iplmail.orl.mmc.com> : rgilbert@orl.mmc.com writes: : > : >Many times I have wanted to create two different types to look at the : >same object. : : O.k., Here's my problem: : I have a system which receives "messages" from a number of other : systems. The messages come via POSIX queues. On any one queue, I : can receive a number of different messages, mostly with record : structures defined by the C code where the message originated. : I do not know a priori what the next message will be. I have to : "receive" the message into a Byte_Array. Once I have the message, : I can access a standard header and extract a message identifier, : which then tells me what kind of message I've just received. What about a variant record? Language Lawyer question (my LRM is at home): are rep. specs allowed on variant records? If so (and if you have a single tag at any level that determines what the message is at that level), use an address clause to store the data on the Byte_Array, then use the variant to figure out what you've got. Jim Crigler ----------------------------------------------------------------------- It has been rumored that the U. S. Government has secretly deveolped near light-speed space travel and is even now sending emmissaries through the near parts of the galaxy to teach (American) English. It is estimated that the mission will be complete by the mid-23rd century.