News:IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).

(I apologise in advance if I'm not using the correct terminology here, I'm neither a programmer nor a statistician)

I'd find a vector-type attribute useful: ie. a single directional array of numbers/strings, such that $MyNumber(n) that holds the nth value of $MyNumber for each note.

It's quite possible that this can be done already; in fact I'm sure that it could be achieved with lists in some way, but as far as I can tell lists have to be written sequentially. Also, a dedicated attribute type would have the advantage of retaining its structure if data were accidentally deleted.

As .at() gets but can't set a value the operator might better be thought of as a read-only property of TB lists or sets.

TB doesn't have arrays. All 'arrays' are lists which are strings with TB. The value returned from a list is always a string but by passing it into an attribute of the right type a data type is set. TB will coerce data accordingly.

"As .at() gets but can't set a value the operator might better be thought of as a read-only property of TB lists or sets."

So is there a simple way to write to the nth item in $MyList, where the list in question may have >300 items on it?

I can see that there is a close similarity with list.at, and can usually use that to the same effect; what I'm suggesting is really a more structured subset of lists - with the ability to write directly to any point on that list.

I'm currently analysing some sports results across a twenty year period (50,000 fixtures and counting..) I can use agents to collect running totals for goals, points, etc for each club, then use those lists to calculate league position and therefore track the progress of each club. List.at(n) works perfectly for this.

I suppose I'm slightly nervous that one tweak to an agent might result in 'misaligned' data, where some lists have fewer items then others and the comparisons are no longer valid - an array type attribute initially comprising a defined number of <empty> items might make it easier to be certain.

I expect people would have a container with notes for each entry, so the 231st child of /Seasons has scalar values for $Goals, $Penalties, etc.

We don't currently have a really good primitive for picking out the nth child in a container, as one is usually more interested in the edge cases -- first, last -- and summary values like max, min, any, every, and sum. When needed, of course, you can use find() to get the nth child, though this isn't very efficient. I'd welcome a use case argument (to info@eastgate.com) if you think nthChild would be widely used.