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,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-09 16:57:17 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc2.on.home.com.POSTED!not-for-mail Message-ID: <3B732365.81CFD607@home.com> From: "Warren W. Gay VE3WWG" X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How Ada could have prevented the Red Code distributed denial References: <3b690498.1111845720@news.worldonline.nl> <9kbu15$9bj@augusta.math.psu.edu> <9kbvsr$a02@augusta.math.psu.edu> <3B69DB35.4412459E@home.com> <3B6F312F.DA4E178E@home.com> <23lok9.ioi.ln@10.0.0.2> <3B70AB15.35845A98@home.com> <3B70C665.BBC5F000@home.com> <3B721BC3.76A2161C@home.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 09 Aug 2001 23:57:16 GMT NNTP-Posting-Host: 24.141.193.224 X-Complaints-To: abuse@home.net X-Trace: news1.rdc2.on.home.com 997401436 24.141.193.224 (Thu, 09 Aug 2001 16:57:16 PDT) NNTP-Posting-Date: Thu, 09 Aug 2001 16:57:16 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:11724 Date: 2001-08-09T23:57:16+00:00 List-Id: Ted Dennison wrote: > In article <3B721BC3.76A2161C@home.com>, Warren W. Gay VE3WWG says... > >don't believe the LRM (Language Reference Manual [for Ada]) spells out > >what the implementation has to use for the various data types in > >question. I believe they tend to be similar: For example a string (which > >is a character array) is usually written out with the first subscript > >value, and last subscript value, followed by the characters in the > >array. However, the sizes of the lower and upper bounds might be 32 > >bits in one implementation, and say 16 bits on another. Yet another, > > Mostly true. However, the bounds (actually, just the length from what I've seen) > are only written out if 'Output is used. 'Write just writes out all the > characters in the string one-by-one. In that case it's up to the user to somehow > know how big the string is supposed to be when reading it back. Oh, yes-- quite right. I assumed a knowledge of the difference between 'Write and 'Output, and should have pointed that out here. > >even the integer representation could be different. So really, the > >answer is _no_, there is no portability guaranteed AFAIK for stream > >IO, for communication on different platforms. > > Right. > > >Ada's approach is different (for streams). Rather than create a whole > >new stream class, you simply customize the data type formats for the > >data types themselves. When they are put to the stream, your routines > >are called for the I/O for those data types, instead of the default > >ones. > > However, you can also create a whole new stream class, if you really want to. I did think about this when I wrote the last post. The problem is that depending upon what you mean by "whole new stream class", I don't think it would help in the Ada context. If you derived a new stream, the 'Write and 'Output attributes are still called as before. If you wrote your own stream from scratch, then I'm not certain that 'Write and 'Output would even be invoked (I've never tried to write a new stream from scratch :-) If those attributes are invoked, then you are back where you started =) Maybe you can elaborate on what you meant by this, or am I simply missing something here? > (Regaurding Annex E:) > >Well, XDR _might_ only be true for GNAT's implementation. I wouldn't > >necessarily "expect" it to be so everywhere else. However, where > > Well, when someone else *has* an implementation, perhaps we will find out. :-) What about AONIX and others? How do they implement it? Just curious. -- Warren W. Gay VE3WWG http://members.home.net/ve3wwg