1. Re: subscripts (Long Post)
- Posted by Kat <gertie at PELL.NET> May 17, 2000
- 538 views
On 17 May 2000, at 8:54, Carl R. White wrote: Date sent: Wed, 17 May 2000 08:54:19 -0400 From: "Carl R. White" <cyrek at BIGFOOT.COM> Subject: Re: subscripts (Long Post) > On Wed, 17 May 2000 14:59:55 +1200, Jiri Babor <J.Babor at GNS.CRI.NZ> > wrote: > > >function fetch(object a, sequence b) > > integer i,len > > i = 1 > > len = length(b) > > while i <= len do > > a = a[b[i]] > > i += 1 > > end while > > return a > >end function > > Carl returns as today's cheeky pedant: > > function fetch(sequence a, object b) > if atom(b) then return a[b] end if > for i = 1 to length(b) do > a = a[b[i]] -- can't pick holes in this line Ok, but i don't understand how that line appends the selected sequences together for the return. Can someone explain that to me? Shouldn't it be something like: returnseq = returnseq & a[b[i]] ? > end for > return a > end function Kat