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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dbaf05888e191cb6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-15 18:18:06 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Re: Access to array slices? Date: 15 Jan 2003 18:18:05 -0800 Organization: http://groups.google.com/ Message-ID: <5ad0dd8a.0301151818.7931f6a3@posting.google.com> References: <5ad0dd8a.0301141717.2f1a9685@posting.google.com> <7teV9.60727$No.7357@sccrnsc04> NNTP-Posting-Host: 212.160.20.107 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1042683485 12454 127.0.0.1 (16 Jan 2003 02:18:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 16 Jan 2003 02:18:05 GMT Xref: archiver1.google.com comp.lang.ada:33069 Date: 2003-01-16T02:18:05+00:00 List-Id: Hi, > The first thing I would do is forget that the data comes from C structures, > since from what you have described that is unimportant. That's right. > You could also use Ada streams. Are they buffered or each 'Read and 'Input will result in a syscall? There is a highly optimized C reference implementation, and I don't want mine to stay much behind. Well, I will find out with strace RSN... > -- (...) > Do_Something_With_Data( name, value ); > -- (...) This "Something_With_Data" is many different things. This is why I wanted a function returning an array of access to Name_Value_Pair_Type, where name and value would be accesses to strings. Should I pass access to procedure there? Or declare this procedure generic? > In fact when dealing with a network I make it a point to put things > into network byte order. When it comes to network byte order, this is a good thing: http://www.ibpaus.de/downloads/AdaStreamsInNetworkByteOrder_020326.tar.gz I think that GNAT using this is still compatible with RM, because byte order for streams is not defined there. Correct? > I hope this helps, Yes, thanks! However, access to array slice would be something :-; Regards, Wojtek