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 X-Google-Thread: 103376,a4cc6fdc99d3fe2a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-29 02:19:58 PST Message-ID: <3B1368CA.E5AD8884@amsjv.com> Date: Tue, 29 May 2001 10:15:54 +0100 From: Philip Anderson Organization: Alenia Marconi Systems ISD X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: package body functionality References: <9eoeiv$h8$1@eol.dd.chalmers.se> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: cwmwkn0612.cwmbran.gecm.com X-Trace: 29 May 2001 10:07:34 GMT, cwmwkn0612.cwmbran.gecm.com Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!dispose.news.demon.net!demon!btnet-peer0!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!cwmwkn0612.cwmbran.gecm.com Xref: archiver1.google.com comp.lang.ada:7835 Date: 2001-05-29T10:15:54+01:00 List-Id: Ken Garlington wrote: > > If you're asking "are these different," the only difference I can think of > is that a given compiler *might* optimize them differently, up to and > including eliminating the variable altogether! There could be other differences because of the order of actions, e.g. package body A is variable: some_type:=call_some_function_outside_A; V2 : some_type := variable; end A; & package body B is variable: some_type; V2 : some_type := variable; -- default/uninitialised value of variable begin variable:=call_some_function_outside_B; end B; The second option also allows you to include an exception handler to catch any exception raised by function outside B -- hwyl/cheers, Philip Anderson Alenia Marconi Systems Cwmbr�n, Cymru/Wales