From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!news.szaf.org!news.uzoreto.com!aioe.org!XKkOg2NWh5z4wmge2MDKgw.user.gioia.aioe.org.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Record initialisation question Date: Thu, 14 Jan 2021 21:32:39 +0000 Organization: Aioe.org NNTP Server Message-ID: References: <5ff9779d$0$24281$426a74cc@news.free.fr> <5ffb2e50$0$24253$426a74cc@news.free.fr> <2ed4c7a5-59a0-41a1-8e68-30f22bcdb5a4n@googlegroups.com> <13d2ea86-f9a4-4015-8171-9e7c0f7c80a4n@googlegroups.com> NNTP-Posting-Host: XKkOg2NWh5z4wmge2MDKgw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) Cancel-Lock: sha1:UQueGQL7NeWIERWGswmgAJTkAN4= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:61133 List-Id: Shark8 writes: > On Tuesday, January 12, 2021 at 4:38:24 AM UTC-7, Simon Wright wrote: >> Shark8 writes: >> >> >> I'll try it but I've just faced another problem where a component of >> >> another record is the address of the record itself. >> > >> > Type Example; >> > Function To_Address( Input : Access Example ) return System.Address >> > with Inline; >> > >> > Type Example is limited record >> > Addr : System.Address := To_Address(Example'Access); >> > End record; >> > >> > Package Cvt is new System.Address_To_Access_Conversions(Example); >> > Function To_Address( Input : Access Example ) return System.Address is >> > ( Cvt.To_Address( Input.all'Access ) ); >> (what is it with this weird casing "convention" you use? makes the code >> quite hard to read ...) > Really? > How so? Just looking at the first line, I see Type Example; and I don't recognise it as Ada; I think that this is a textual comment saying that this is an example relating in some way to types. Similar, but a little less distracting, with other keywords throughout. What is the convention? Is it perhaps that the first word on a line gets capitalised? but then, in the second line, we have ... Input : Access Example ) return ... and the third line starts with "with". So it's just some keywords that get capitalised. Basically, I find it jarring and distracting. We would disagree about spacing round parentheses as well. De gustibus ...!