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,ce0900b60ca3f616 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-06 01:31:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!news.dotcom.fr!not-for-mail From: tgingold@pc204.ipricot.fr Newsgroups: comp.lang.ada Subject: Re: Side-Effects in Functions [Rosen Trick] Date: 6 Nov 2001 09:31:50 GMT Organization: DotCom Network Message-ID: <9s8am6$v9$1@st520.dotcom.fr> References: <9rti6v$hcu$1@news.huji.ac.il> <1EyE7.10050$xS6.13527@www.newsranger.com> <9rue9f$j4t$1@nh.pace.co.uk> <9ruiet$kqg$1@nh.pace.co.uk> <3BE3235D.E292B890@boeing.com> <3BE35498.9F6381A2@acm.org> <9s230d$107b5a$2@ID-25716.news.dfncis.de> <5ee5b646.0111040507.5ca7ea23@posting.google.com> <9s3tl3$111hco$1@ID-25716.news.dfncis.de> <5ee5b646.0111041846.93f3e07@posting.google.com> <9s5eub02j61@drn.newsguy.com> <3be666fe.6426140@News.CIS.DFN.DE> <9s5skb09lv@drn.newsguy.com> <3be6a7a3.22977140@News.CIS.DFN.DE> <3be6b6c9.26855093@News.CIS.DFN.DE> <3BE6CF73.2020705@home.com> <3be79e7c.551796@News.CIS.DFN.DE> NNTP-Posting-Host: tgingold.fr.ipricot.com User-Agent: slrn/0.9.7.2 (Win32) Xref: archiver1.google.com comp.lang.ada:15907 Date: 2001-11-06T09:31:50+00:00 List-Id: In article <3be79e7c.551796@News.CIS.DFN.DE>, Dmitry A. Kazakov wrote: > On Mon, 05 Nov 2001 17:42:14 GMT, "Warren W. Gay VE3WWG" > wrote: > >>I think one of the issues at stake here is that Ada was meant to be >> >>easy to read. If you allow procedures to return values, then it is >>no longer a valid assumption that what looks like a function call, >>does not produce side effects (ie. you cannot assume that the arguments >>are not modified, without looking at the declaration). Just for your information, VHDL-93 has PURE and IMPURE keyword. Such a declaration: pure function sum (a,b : integer) return integer; means that SUM has no side effects (and therefore is expected to return the same result when the set of argument is the same). However, INOUT and OUT mode are not allowed in IMPURE FUNCTION. Note also that return a value is *VERY* different from an OUT parameter, since the return type can be unconstrained. Tristan.