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,df03e50c9b0ea255 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-26 18:29:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!wn4feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: Subject: Re: On functions and access types. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: NNTP-Posting-Host: 12.225.227.101 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc01 1025141386 12.225.227.101 (Thu, 27 Jun 2002 01:29:46 GMT) NNTP-Posting-Date: Thu, 27 Jun 2002 01:29:46 GMT Organization: AT&T Broadband Date: Thu, 27 Jun 2002 01:29:47 GMT Xref: archiver1.google.com comp.lang.ada:26730 Date: 2002-06-27T01:29:47+00:00 List-Id: "Caffeine Junky" wrote in message news:eFrS8.4786$Uu2.750@sccrnsc03... [snip] > Now the compiler tells me that I cannot assign to an 'in' parameter. > However, as I understand it, a function can only take an 'in' parameter. > I can copy S to a stack which is local to the function, but results in > the function only returning the last item in the stack. ... > If I use a procedure, it works fine. But I run into problems whenever I > try to use similiar acess types into a function. > > I'm definitely overlooking something here. Probably something obvious. > I'll continue to search through my book for an answer, but any pointers > or references would be appreciated. The only thing you're overlooking is the philosophy that functions should not change the state of the system. By modifying their parameters for example. The concept of not permitting "out" or "in out" parameters to functions has been debated in this group many times. > > Now, eventually I changed this to a procedure for the sake of expediancy. > But I'm continuing to work on the problem. > That's the right answer anyway. SteveD > > Thanks for your patience. > > Staple