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,9d929352a358ccab X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Message-ID: <43D7FAA9.1617F97F@fakeaddress.nil> Date: Wed, 25 Jan 2006 23:24:41 +0100 From: Gautier Write-only X-Mailer: Mozilla 4.8 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada to C++ translator References: <1138132539.577082.206380@g43g2000cwa.googlegroups.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 81.62.13.111 X-Original-NNTP-Posting-Host: 81.62.13.111 X-Trace: news.bluewin.ch 1138227899 81.62.13.111 (25 Jan 2006 23:24:59 +0100) Organization: Bluewin AG Complaints-To: abuse@bluewin.ch X-Original-NNTP-Posting-Host: 127.0.0.1 Path: g2news1.google.com!news1.google.com!news4.google.com!news2.volia.net!solnet.ch!solnet.ch!news-zh.switch.ch!switch.ch!news.ip-plus.net!newsfeed.ip-plus.net!news.bluewin.ch!not-for-mail Xref: g2news1.google.com comp.lang.ada:2636 Date: 2006-01-25T23:24:41+01:00 List-Id: Also, one point where a translation could look more like a compilation is Ada's possibility of nesting subprograms or packages into other subprograms or packages. E.g. what is the C++ equivalent of the following (silly, but correct) code ? with Ada.Text_IO; procedure Nest_Test is procedure P1(s1: String) is procedure P2(s2: String) is begin if s2'Length > 0 then declare generic content: String; package K1 is procedure Spit; end K1; package body K1 is procedure Spit is begin Ada.Text_IO.Put(content(content'First)); P1(content(content'First+1..content'Last)); end Spit; end K1; package my_K1 is new K1( content=> s2 ); begin my_K1.Spit; end; end if; end P2; begin P2(s1); end P1; begin P1("A very silly way to display a string!"); end Nest_Test; _______________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/index.htm Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm GLOBE_3D -- http://www.mysunrise.ch/users/gdm/g3d.htm NB: For a direct answer, e-mail address on the Web site!