On Friday, October 18, 2002, at 11:16 PM, Edwards, Waverly wrote: > > Both you and Peter Bancroft had exactly the > same idea, (he emailed me privately also). > > I had to sleep on the idea in order for it > to register. Now that the light bulb is > on, someone is home and the scales have > fallen off my eyes I cant believe how simple, > elegant and fast the solution is. > > Thanks Tedd & Peter > Thanks Peter & Tedd > > I see the light and I'm walking towards it. > > > W. > > Beware the oncoming light, for it is that of a freight train!!! Pete... (the other one) > -----Original Message----- > From: tedd [mailto:tedd@...] > Sent: Friday, October 18, 2002 8:48 AM > To: futurebasic@... > Subject: RE: [FB] better queue suggestion desired > > > W. > > I just though of another way to do what you want using a common array > -- it might be better for you. Please follow and consider: > > DIM a(999) > DIM gStart > gStart = 0 > > When you grab your first piece of data, place it in the array where > gStart directs and increment gStart. > > a(gStart) = data > gStart++ > IF gStart > 999 THEN gStart = 0 > > Repeat until there is no more data. > > When you're done and want to know what the sequence was, just start > at gStart +1 and travel to gStart. > > For example, if you had a total of 1010 entries. > > gStart would be equal to 9 (the last event value stored) and gStart + > 1 would be equal to 10 (the first of the last 1000 events value > stored). > > The sequence of events would be from gStart + 1 to 999 and 0 to > gStart -- a total of 1000 entries in FIFO order. > > tedd > -- > http://sperling.com/ > > -- > To unsubscribe, send ANY message to <futurebasic- > unsubscribe@...> > > -- > To unsubscribe, send ANY message to <futurebasic- > unsubscribe@...> > > >