home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!europa.asd.contel.com!emory!gwinnett!gwinnett!wafbox!bill
- From: bill@wafbox.UUCP (Bill Fulton)
- Newsgroups: comp.unix.questions
- Subject: Re: Associative arrays in [gn]awk --whynot! (long but interesting)
- Message-ID: <269@wafbox.UUCP>
- Date: 16 Aug 92 05:29:35 GMT
- References: <1992Aug13.063348.11691@news.acns.nwu.edu> <1992Aug14.173952.12112@mccc.edu> <1992Aug15.021954.27159@news.acns.nwu.edu>
- Reply-To: bill@wafbox.UUCP (Bill Fulton)
- Organization: Home
- Lines: 23
-
- In article <1992Aug15.021954.27159@news.acns.nwu.edu> navarra@casbah.acns.nwu.edu (John Navarra) writes:
- >In article <1992Aug14.173952.12112@mccc.edu> pjh@mccc.edu (Pete Holsberg) writes
- >>In article <1992Aug13.063348.11691@news.acns.nwu.edu> navarra@casbah.acns.nwu.edu (John Navarra) writes:
- >>=======================
- >>=Basically, associative arrays in gn[awk] are
- >>=unreliable (especially for a multi-field file).
- >>
- >>Unreliable? In what way?
- >
- > With respect to order being read in. Obviously, many of you know
- >that this is a well-known bug. Some do not.
-
- I thought that this was defined behaviour - from AWK book, page 51:
- "The order in which the subscripts are considered is implementation
- dependent."
-
- This would seem to allow the implementation latitude to arrange the elements
- in the most efficient method, e.g. for look-up (hashed lists, etc).
-
- --
- Bill Fulton (Home Alone) | Grab ..
- bill@wafbox.gwinnett.com | The ..
- OR ..!gatech!dcatla!wafbox!bill | Reins
-