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,5bc4be576204aa20 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail From: "jimmaureenrogers@worldnet.att.net" Newsgroups: comp.lang.ada Subject: Re: Buffer overflow Article - CACM Date: 1 Jan 2006 19:37:06 -0800 Organization: http://groups.google.com Message-ID: <1136173025.947352.25110@g44g2000cwa.googlegroups.com> References: <43783810.6080808@obry.net> <0f4ef.1413$s14.1261@newsread2.news.pas.earthlink.net> <5Fpif.25167$Zv5.13092@newssvr25.news.prodigy.net> <6ktjf.8048$ea6.3571@news-server.bigpond.net.au> <9hhkf.10004$ea6.5952@news-server.bigpond.net.au> <3klkf.25509$dO2.19240@newssvr29.news.prodigy.net> <4626568.XPZCFmT196@linux1.krischik.com> NNTP-Posting-Host: 69.170.70.49 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1136173030 20954 127.0.0.1 (2 Jan 2006 03:37:10 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 2 Jan 2006 03:37:10 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g44g2000cwa.googlegroups.com; posting-host=69.170.70.49; posting-account=SqOfxAwAAAAkL81YAPGH1JdBwpUXw9ZG Xref: g2news1.google.com comp.lang.ada:2410 Date: 2006-01-01T19:37:06-08:00 List-Id: robin wrote: > "Martin Krischik" wrote in message > news:4626568.XPZCFmT196@linux1.krischik.com... > > > PL/I can compile and execute the following source. Can Ada do the same > > > for PL/I? > > > > > > Mixed: procedure options (main); > > > ... > > > ADA( > > > StringReverse (S: Text) return Text is > > > begin > > > if Length(S) <= 1 > > > then return S; > > > else return StringReverse(Tail(S)) & Head(S); > > > end StringReverse; > > > ); > > > end mixed; > > > > > > [I have not written here the PL/I code for TAIL and HEAD, > > > nor the declarations for the variables corresponding > > > to S and Text.] > > > > From the top of my head > > > > package PL_1 > > > > function String_Reverse (S : in String) return String is > > begin > > if S'Lenght <= 1 then > > return S; > > else > > return String_Reverse (Tail(S)) & Head(S); > > end if > > end String_Reverse; > > end PL_1; > > This is Ada code, not PL/I code. I already supplied > Ada code in the PL/I source example above. I was just as confused as Martin. Your "Ada" code is not correct Ada code. There is no standard Ada type named "text". Your Ada example will not compile under any Ada compiler as written. You indicate that TAIL and HEAD are PL/I routines. They will not compile in any Ada compiler given the code segment you presented. Where is the Length function defined? It is certainly not defined in any of the code you present. If your example compiles in a PL/I compiler with the assumption that it is Ada code, then I marvel at the usefulness. Why would you want a compiler that does not identify serious syntax errors? Jim Rogers