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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,cd3701d5ec722b08 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!o21g2000vbl.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.ada Subject: Re: Lambda expressions? LINQ? Date: Fri, 18 Sep 2009 23:50:18 -0700 (PDT) Organization: http://groups.google.com Message-ID: <030adeb6-23c6-407e-8ac8-d0470fcbc3c0@o21g2000vbl.googlegroups.com> References: <9b330aae-2c83-4d1c-995b-192425cd1c52@m11g2000vbl.googlegroups.com> NNTP-Posting-Host: 86.154.213.155 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1253343018 30398 127.0.0.1 (19 Sep 2009 06:50:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 19 Sep 2009 06:50:18 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o21g2000vbl.googlegroups.com; posting-host=86.154.213.155; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.0.10, Ant.com Toolbar 1.3,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8390 Date: 2009-09-18T23:50:18-07:00 List-Id: On Sep 19, 3:33=A0am, "Steve D" wrote: [snip] > As Martin guessed it is one statement spread over a few lines. > > =A0 =A0 =A0 =A0 =A0 =A0 string[] names =3D xDoc.Descendants("Layer0Messag= e") > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 .SelectMany(n= ode =3D> > node.Attribute("To").Value.Split(' ',',').Where( st =3D> st.Length > 0 )) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 .Dist= inct().OrderBy(n=3D>n).ToArray(); > > There is an alternate way of formatting the query... more like SQL, but I > prefer the version that uses the dot notation. I'd prefer the other way myself :-) Could you perhaps post 'the other way' for a comparison? [snip] > I just wish my favoriate language had this feature. Me too - although I can't see how it could be :-( Cheers -- Martin