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,3a1c64628a09855b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news2.google.com!news.glorb.com!newscon02.news.prodigy.net!prodigy.net!newsdst01.news.prodigy.net!prodigy.com!postmaster.news.prodigy.com!newssvr27.news.prodigy.net.POSTED!cfe18fef!not-for-mail From: Gary Scott Organization: Home User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Lack of formal syntax undermines Ada References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 68.94.3.156 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr27.news.prodigy.net 1208020615 ST000 68.94.3.156 (Sat, 12 Apr 2008 13:16:55 EDT) NNTP-Posting-Date: Sat, 12 Apr 2008 13:16:55 EDT X-UserInfo1: FKPO@SZETRRACPD[MZHLN\TDFZ\@@FXLM@TDOCQDJ@_@FN@ANVUEAE[YETZPIWWI[FCIZA^NBFXZ_D[BFNTCNVPDTNTKHWXKB@X^B_OCJLPZ@ET_O[G\XSG@E\G[ZKVLBL^CJINM@I_KVIOR\T_M_AW_M[_BWU_HFA_]@A_A^SGFAUDE_DFTMQPFWVW[QPJN Date: Sat, 12 Apr 2008 17:16:55 GMT Xref: g2news1.google.com comp.lang.ada:20892 Date: 2008-04-12T17:16:55+00:00 List-Id: Robert A Duff wrote: > John McCabe writes: > > >>Robert A Duff wrote: >> >> >>>John McCabe writes: >>> >>> >>>>As I understand it, that was deliberate; Ada's feature that functions >>>>may not have side-effects ... >>> >>>Ada functions can have side effects. >> >>Bugger - where did I get that idea from then (have to admit, it's been >>a while since I paid a lot of attention to Ada!) > > > Perhaps from the fact that 'in out' and 'out' parameters are illegal for > functions. As Robert Dewar likes to point out, the effect of this rule > is that functions can have side effects, so long as they are not > properly documented. ;-) Sorry, non-Ada nube type question: How is inter-language calling of functions that do allow inout and out arguments handled (say calling a C API)? I assume the restriction only applies to intra-language calls. It seems like could create some messiness if the compiler always assumed only IN arguments in functions. > > Functions can modify global variables if they are visible. > Functions can also modify data via pointers. > > - Bob -- Gary Scott mailto:garylscott@sbcglobal dot net Fortran Library: http://www.fortranlib.com Support the Original G95 Project: http://www.g95.org -OR- Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html If you want to do the impossible, don't hire an expert because he knows it can't be done. -- Henry Ford