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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9464f7990925623f,start X-Google-Attributes: gid103376,public From: "Raymond C. Rawa" Subject: Attempting to modify a function result Date: 1999/07/22 Message-ID: <3797103C.4FD5@nospam.boeing.com>#1/1 X-Deja-AN: 503995279 Content-Transfer-Encoding: 7bit Sender: nntp@news.boeing.com (Boeing NNTP News Access) X-Nntp-Posting-Host: mac-herbert.he.boeing.com Content-Type: text/plain; charset=us-ascii Organization: The Boeing Company Mime-Version: 1.0 Reply-To: Raymond.C.Rawa@nospam.boeing.com Newsgroups: comp.lang.ada Date: 1999-07-22T00:00:00+00:00 List-Id: I've encountered a "feature" of Ada83 or the VADS compiler that I don't understand. I discovered this little feature while unit testing a package that contained a typo. package Foo is Display_Type is record a : integer; b : float; end record; function Display return Display_Type; procedure Huh; end Foo; package body Foo is The_Display : Display_Type; --% internal object function Display return Display_Type is begin return The_Display; end Display; procedure Huh is begin Display.a := 5; -- I mean't to type: The_Display.a := 5; end Huh; end Foo; The procedure Foo.Huh compiles and executes without error. As a side note, The_Display is unchanged by this procedure. Can someone please explain what's going on here?