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=-0.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,c7d533acec91ae16 X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Question for the folks who designed Ada95 Date: 1999/04/28 Message-ID: <7g7g3j$f95$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 471936649 References: <7g2qu4$ca4$1@usenet.rational.com> <7g3b5g$p92$1@nnrp1.dejanews.com> <7g4ae3$hjh2@ftp.kvaerner.com> <3725C49E.8106A44B@aasaa.ofe.org> <7g4mrs$v5n$1@nnrp1.dejanews.com> <7g72rf$hjh3@ftp.kvaerner.com> X-Http-Proxy: 1.0 x14.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Apr 28 17:22:00 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1999-04-28T00:00:00+00:00 List-Id: In article <7g72rf$hjh3@ftp.kvaerner.com>, "Tarjei Tj�stheim Jensen" wrote: > > Robert Dewar wrote : > > > >In other words: > > > > a(5) > > > >is a reference to a mapping, and you want the range value > >given the domain value 5. Whether this is implemented by > >an array or a function is an implementation detail that > >should not affect the syntactic form of reference. > > What would a(5) := 4; mean then? You cannot assign to a function as far as I > know. Which in my opinion voids the function opposition to the common > convention of using square brackets for array indices. A mapping is typically static, and would thus be represented by a *constant* array. Assigning to that is illegal as well. I have actually had this come in handy. I had a data structure that was a mapping implemented as a constant array that was used by about 10 other s/w engineers. Things got complicated and I had to reimplement it as a function. None of them had to change a line of code. -- T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own