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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-Thread: f849b,b8d52151b7b306d2 X-Google-Attributes: gidf849b,public X-Google-ArrivalTime: 2004-01-05 14:03:52 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!mail.nartron.COM!not-for-mail From: iddw@hotmail.com (Dave Hansen) Newsgroups: comp.arch.embedded,comp.lang.ada Subject: Re: Certified C compilers for safety-critical embedded systems Date: Mon, 05 Jan 2004 22:08:11 GMT Message-ID: <3ff9df16.30249104@News.CIS.DFN.DE> References: <3fe00b82.90228601@News.CIS.DFN.DE> <5802069.JsgInS3tXa@linux1.krischik.com> <1072464162.325936@master.nyc.kbcfp.com> <1563361.SfB03k3vvC@linux1.krischik.com> <11LvOkBBXw7$EAJw@phaedsys.demon.co.uk> <3ff0687f.528387944@News.CIS.DFN.DE> <1086072.fFeiH4ICbz@linux1.krischik.com> <3ff18d4d.603356952@News.CIS.DFN.DE> <1731094.1f7Irsyk1h@linux1.krischik.com> <3ff1b8ef.614528516@News.CIS.DFN.DE> <3FF1E06D.A351CCB4@yahoo.com> <3ff20cc8.635997032@News.CIS.DFN.DE> NNTP-Posting-Host: mail.nartron.com (216.65.187.224) X-Trace: news.uni-berlin.de 1073340231 5696422 216.65.187.224 ([97677]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.arch.embedded:6769 comp.lang.ada:4128 Date: 2004-01-05T22:08:11+00:00 List-Id: On Wed, 31 Dec 2003 14:27:08 +0000 (UTC), Georg Bauhaus wrote: >In comp.lang.ada Dave Hansen wrote: Note: I'm reading from comp.arch.embedded. Just so you know where I'm coming from... >: while ( nextkey(&key) ) process(key); >: [... "&" operator signals "nextkey" might modify the value of the parameter ...] > >Ada solution that addresses both & and the while(1) issue: > >procedure p is > > function next_key (key_filled: access Character) return Boolean is separate; > > procedure process (the_key: in out Character) is separate; > > > key: aliased Character; > >begin > > while next_key (key'access) loop > process(key); > > end loop; > >end p; Thanks. I like it, if I understand it. ;-) Is the "'access" tag (or whatever you call it) _required_ on the call if a function is going to modify the parameter? I like it even better if that's true. Regards, -=Dave -- Change is inevitable, progress is not.