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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-09 06:10:14 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!newsfeed.wirehub.nl!newsfeed.frii.net!out.nntp.be!propagator-dallas!news-in-dallas.newsfeeds.com!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada,comp.lang.c++ From: Ted Dennison 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> Subject: Re: How Ada could have prevented the Red Code distributed denial Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Thu, 09 Aug 2001 09:10:02 EDT Organization: http://www.newsranger.com Date: Thu, 09 Aug 2001 13:10:02 GMT Xref: archiver1.google.com comp.lang.ada:11680 comp.lang.c++:81210 Date: 2001-08-09T13:10:02+00:00 List-Id: 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. >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. (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. :-) --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com