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!aioe.org!pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org.POSTED!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Ada syntax questions Date: Fri, 18 Dec 2020 15:09:19 -0800 Organization: Aioe.org NNTP Server Message-ID: <86im8ylnj4.fsf@stephe-leake.org> References: <5fdbde31$0$6455$426a74cc@news.free.fr> NNTP-Posting-Host: pBWEO6hi52oGFheO/GY5ag.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 (windows-nt) Cancel-Lock: sha1:wvSf0P1mu4lg88up6FHbYZBMTWA= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:60885 List-Id: DrPi <314@drpi.fr> writes: > 1) What about array indexing ? > In some other languages, arrays are indexed using square brackets. In > Ada, parentheses are used for function calls and for array indexing. > In the code "status := NewStatus(some_var);", you can't tell if > NewStatus is a function or an array. This is true. You seem to be implying this is bad; why? > 2) In Ada, a function without arguments is called without any parentheses. > In the code "status := NewStatus;", you can't tell if NewStatus is a > function or a variable. This is true. You seem to be implying this is bad; why? > For my knowledge, are there good reasons for these syntaxes ? Yes. See the Ada Rationale: http://ada-auth.org/standards/rationale12.html -- -- Stephe