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.gegeweb.eu!gegeweb.org!fdn.fr!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp4-2.free.fr!not-for-mail Newsgroups: comp.lang.ada X-Mozilla-News-Host: news://news.free.fr:119 From: DrPi <314@drpi.fr> Subject: Ada syntax questions Date: Thu, 17 Dec 2020 23:39:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Message-ID: <5fdbde31$0$6455$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 17 Dec 2020 23:39:45 CET NNTP-Posting-Host: 82.65.30.55 X-Trace: 1608244785 news-3.free.fr 6455 82.65.30.55:51227 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:60876 List-Id: Hi, Ada claims to have a better syntax than other languages. I'm fine with with, but... 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. 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. For my knowledge, are there good reasons for these syntaxes ? Nicolas