From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: Ada syntax questions
Date: Tue, 22 Dec 2020 05:48:43 -0800 (PST) [thread overview]
Message-ID: <81958f44-309d-4c72-b1cf-259ca34ccc53n@googlegroups.com> (raw)
In-Reply-To: <rrrgnc$9om$1@franka.jacob-sparre.dk>
Randy Brukardt schrieb am Dienstag, 22. Dezember 2020 um 02:04:46 UTC+1:
> "Keith Thompson" <Keith.S.T...@gmail.com> wrote in message
> news:87r1nkb...@nosuchdomain.example.com...
> ...
> > Function calls and array indexing can be substituted for one another
> > in *some* circumstances, but not it all. But they really are very
> > different things. A function call executes user-written code,
> > and may have side effects; an array indexing expression refers to
> > an object. An array indexing expression can appear on the LHS of
> > an assignment; a function call can't.
> This is false in modern languages with user-defined indexing (Ada and C++
> included), since what looks like array indexing can actually be implemented
> with a function call.
See http://www-staging.eu.adacore.com/adaanswers/gems/gem-123-implicit-dereferencing-in-ada-2012/
Here the LHS is a function call, looking like container Cont is indexed as an array:
Cont (My_Key) := Some_Element_Value;
next prev parent reply other threads:[~2020-12-22 13:48 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 22:39 Ada syntax questions DrPi
2020-12-17 23:18 ` Gabriele Galeotti
2020-12-18 8:26 ` Jeffrey R. Carter
2020-12-18 9:18 ` Dmitry A. Kazakov
2020-12-18 16:55 ` Mart van de Wege
2020-12-18 17:38 ` Björn Lundin
2020-12-18 19:35 ` Niklas Holsti
2020-12-20 21:59 ` Keith Thompson
2020-12-22 1:04 ` Randy Brukardt
2020-12-22 8:00 ` Dmitry A. Kazakov
2020-12-23 1:23 ` Randy Brukardt
2020-12-23 8:59 ` Dmitry A. Kazakov
2020-12-24 4:06 ` Randy Brukardt
2020-12-24 9:37 ` Dmitry A. Kazakov
2020-12-22 13:48 ` AdaMagica [this message]
2020-12-20 21:59 ` Keith Thompson
2020-12-21 8:08 ` Dmitry A. Kazakov
2020-12-18 23:09 ` Stephen Leake
2020-12-19 11:50 ` DrPi
2020-12-19 12:40 ` Dmitry A. Kazakov
2020-12-19 17:13 ` Andreas ZEURCHER
2020-12-19 17:49 ` Dmitry A. Kazakov
2020-12-19 18:40 ` Andreas ZEURCHER
2020-12-19 19:37 ` Dmitry A. Kazakov
2020-12-19 22:11 ` Andreas ZEURCHER
2020-12-20 8:47 ` Dmitry A. Kazakov
2020-12-20 16:53 ` Andreas ZEURCHER
2020-12-22 0:58 ` Randy Brukardt
2020-12-22 2:39 ` Andreas ZEURCHER
2020-12-22 10:05 ` Stéphane Rivière
2020-12-25 9:34 ` G.B.
2020-12-19 17:01 ` AdaMagica
2020-12-19 21:51 ` Stephen Leake
2020-12-19 22:20 ` Andreas ZEURCHER
2020-12-20 14:10 ` DrPi
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox