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