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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5c1d89373343bef8 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Nick Roberts Newsgroups: comp.lang.ada Subject: Re: Unchecked_Conversion help needed Date: Wed, 22 Dec 2004 03:29:31 +0000 Message-ID: Content-Type: text/plain; charset=us-ascii X-Trace: individual.net xrplJ8mAtSbSCQDtVyaXfAaiIa46KmvfC/uIOVJvqJtUK4/h4= X-Orig-Path: not-for-mail User-Agent: Gemini/1.45d (Qt/3.3.2) (Windows-XP) Xref: g2news1.google.com comp.lang.ada:7139 Date: 2004-12-22T03:29:31+00:00 List-Id: "rcarnesiii" wrote: > I meant I have two apps talking to each other. This is a problem that may be addressed (pardon the pun) by Annex E of the Ada 95 Reference Manual (RM95). I believe there is an Open Source implementation, but I forget the name. Alternatively, some Object Request Broker (ORB) system might be what you need. In any case, the essence of communication between two Ada programs (or partitions) usually involves using streams and serialisation -- see RM95 section 13.13 -- to perform what is called 'marshalling' of data. Values of a type T are serialised and deserialised by the T'Write and T'Read procedures or the T'Output procedure and T'Input function, as described in the RM95. To transfer a set of values from one program to another, the source program marshalls (serialises) the values into a stream (using T'Write or T'Output), then the stream is transferred from the source program to the target program (how this is done depends on a lot of things), then the values are unmarshalled (deserialised) into variables (using T'Read or T'Input) in the target program. A stream which represents a shared file or shared memory area may be used to effect the transfer of data. In the case of programs which are running on different machines, a stream which represents a (buffered) network channel between the machines may be used. For some types (typically limited and access types), you will need to write your own serialisation code (you then use a 'use' clause to declare them as the implementations of T'Write and T'Read and/or T'Output and T'Input). Please reply if you need more help. -- Nick Roberts