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,ccb21d128bf5f2ae X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!newsr1.ipcore.viaginterkom.de!news-peer1!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: Martin Dowie Newsgroups: comp.lang.ada Subject: Re: newbie - OOP in Ada Set and Get Methods Date: Wed, 29 Dec 2004 12:33:46 +0000 (UTC) Organization: BT Openworld Message-ID: References: <1104237673.373489.128290@z14g2000cwz.googlegroups.com> <1104251213.061878.187430@f14g2000cwb.googlegroups.com> <1104255406.015130.138150@z14g2000cwz.googlegroups.com> <1104314768.942556.71380@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: host81-152-56-142.range81-152.btcentralplus.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sparta.btinternet.com 1104323626 8641 81.152.56.142 (29 Dec 2004 12:33:46 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Wed, 29 Dec 2004 12:33:46 +0000 (UTC) In-Reply-To: <1104314768.942556.71380@z14g2000cwz.googlegroups.com> X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0RC1 (Windows/20041201) Xref: g2news1.google.com comp.lang.ada:7287 Date: 2004-12-29T12:33:46+00:00 List-Id: R wrote: > my compiler gnatmake Linux > gave me warnings in this function: > > function Set(this: rec1; s: Integer) return Integer is > begin > this.field := s; > return s; > end Set; > > 'in parameters cannot be modified inside function'(sth like this), > when I was using rec1_Typeas an access to rec1 > this warning never occured Remove 'rec1_Type' - you really don't need it in all probability. Cheers -- Martin