From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,af247e41be5f18ab X-Google-Attributes: gid103376,public From: tmoran@bix.com (Tom Moran) Subject: Re: simple question - how to emulate void * ? Date: 1998/10/23 Message-ID: <362fff27.42726442@SantaClara01.news.InterNex.Net>#1/1 X-Deja-AN: 404167985 References: <9v6hGdgMLuwN-pn2-Oc41W71Dq3U9@dt182n2f.tampabay.rr.com> Organization: InterNex Information Services 1-800-595-3333 Newsgroups: comp.lang.ada Date: 1998-10-23T00:00:00+00:00 List-Id: You might look into Ada.Streams. Alternatively, if you really want to send the bytes comprising the data (which would make little sense if they were pointers, say), you can either create an array of bytes, located at the same address as the data, or simply do an unchecked conversion from the data to an array of bytes of the appropriate size. type bytes is mod 256; for bytes'size use 8; type byte_array_type is array(natural range <>) of bytes; procedure send_bytes(b : in byte_array_type) is ..... procedure send(x : in some_record_type) is subtype x_byte_array_type is byte_array_type(1 .. x'size/8); for x_byte_array_type'size use x'size; function bytes_of is new Ada.Unchecked_Conversion(source=>some_record_type; target=>x_byte_array_type); begin send_bytes(bytes_of(x)); end send; (Typed in on the fly, but should give the general idea)