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=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!fx04.iad.POSTED!not-for-mail From: Hubert User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to use read-only variables? References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 150103-1, 01/03/2015), Outbound message X-Antivirus-Status: Clean Message-ID: X-Complaints-To: abuse@newsdemon.com NNTP-Posting-Date: Sun, 04 Jan 2015 01:50:27 UTC Organization: http://www.NewsDemon.com Date: Sat, 03 Jan 2015 17:50:27 -0800 X-Received-Bytes: 1590 X-Received-Body-CRC: 892412509 Xref: number.nntp.giganews.com comp.lang.ada:191639 Date: 2015-01-03T17:50:27-08:00 List-Id: Here is my guess, and I want to stress that I am by no means an Ada expert. So maybe it's completely wrong but here it goes anyway: When you call that function with the IN OUT parameter, you probably make the mistake of thinking this is like a C++ reference, but I would think that the variable you use for the Access attribute is indeed a local one. Perhaps the compiler copies it when you call the function and then copies it again back when you leave the function, thus rec.nv'Access; would refer to a local object inside the function and the pointer would become invalid when you leave the function. My guess, I would be glad if it was right :) --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com