[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: xml pull parser
- From: "Aaron Brown" <aaron-lua@...>
- Date: Mon, 21 Mar 2005 15:50:02 -0500
Rici wrote:
> By the way, I lied a little bit. You can actually specify
> the first iteration-key argument to the iterator function
> as well, but by convention iterator functions use nil as
> the "start of iteration" marker.
Here's an example that makes use of something other than
nil. The following code iterates through all two-member
subsets of the Beatles; the trick is that the inner loop
starts partway through the table.
Beatles = {
John = "rhythm",
Paul = "bass",
George = "lead",
Ringo = "drums"}
for p1, i1 in next, Beatles, nil do
for p2, i2 in next, Beatles, p1 do
print(p1, i1, p2, i2)
end -- for
end -- for
--
Aaron
"PHP combines the orthogonality of sh with the elegance
of <font color=ad0000> Fatal error: Cannot redeclare
quuxitate() (previously declared in -:4) in - on line 6
</font>
- References:
- xml pull parser, PA
- Re: xml pull parser, Adam D. Moss
- Re: xml pull parser, PA
- Re: xml pull parser, Javier Guerra Giraldez
- Re: xml pull parser, PA
- Re: xml pull parser, Javier Guerra
- Re: xml pull parser, PA
- Re: xml pull parser, Rici Lake
- Re: xml pull parser, PA
- Re: xml pull parser, Rici Lake