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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: time of update of new values for out mode parameters Date: Mon, 19 Mar 2018 13:10:57 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <4598be4c-7a4b-4bdd-8fd3-99b943e77823@googlegroups.com> Injection-Date: Mon, 19 Mar 2018 13:10:57 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="ceeec263b3c0de1f6ef6356d44d2d94a"; logging-data="25481"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/0Wo7i5I5MTMCV94wJlZQ6Qh98t4IGuc=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:81vSUQFvqSRTYI09Y7ZMtyM/GU4= Xref: reader02.eternal-september.org comp.lang.ada:51066 Date: 2018-03-19T13:10:57+00:00 List-Id: On 2018-03-19, Mehdi Saada <00120260a@gmail.com> wrote: > Hi. > > When are new values of out or in out mode parameters written in the actual > variable ? Is it instantaneous as I presume it is with access mode parameters, > or is it done at the end of the function/procedure/accept statement ? > It depends on when the compiler's generated code gets around to it. While that sounds flippant, it isn't and reflects the nature of writing code which is compiled by an optimising compiler. If this matters to you, have a look at the Volatile and Atomic pragmas. https://en.wikibooks.org/wiki/Ada_Programming/Pragmas/Volatile https://en.wikibooks.org/wiki/Ada_Programming/Pragmas/Atomic What is the underlying issue or problem you are trying to solve ? Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world