Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Array properties with variable number of indices

3 views
Skip to first unread message

Stephen Boyd

unread,
Jul 15, 2008, 3:47:52 PM7/15/08
to
I want to be able to create an array property with a variable number of
indices. The intention is to provide a dynamic array like property for
a class where the underlying data structure is not an array.

I have come up with this way of doing it:

property MyProp[idx: array of Integer]: Integer read GetMyProp;

This works fine, but the code to retrieve an instance of MyProp is a bit
cumbersome.

i := MyObject.MyProp[[1, 2, 3]];
// note the double brackets

I was wondering if anyone knew of a better way of doing this.

Remy Lebeau (TeamB)

unread,
Jul 15, 2008, 7:45:03 PM7/15/08
to

"Stephen Boyd" <sboy...@gmail.com> wrote in message
news:487cfedc$1...@newsgroups.borland.com...

> I was wondering if anyone knew of a better way of doing this.

Nope.


Gambit


0 new messages