In a moment of madness, I wondered what would happen if I declared a property as an extent. Well, slap me with a kipper, it worked !
[1,2,3,4,5][p_Index]
Was this documented anywhere ?? It's a great feature
The question has to be asked: Are there any other little hidden gems that have not been documented thus far ?
Glad it's working for you. This was implemented in 102a, so you didn't have it prior to the beta.
Glad it's working for you. This was implemented in
102a, so you didn't have it prior to the beta.
Yeah, I tried it in 10.1B and then 10.1C when I upgraded. I just tried it again on the off-chance And it worked !
cue celebrations ...
Myself, I'd prefer to eat the kipper, but each to their own taste, I guess ...
The question is, why did you want to do it? What do you do with arrays?
Myself, I'd prefer to eat the kipper, but each to
their own taste, I guess ...
Mine's the salmon, then ..
The question is, why did you want to do it? What do
you do with arrays?
In this case, I was trying to get / set the properties of the nth entry in the colour table. Rather than having to hard-code the max number of entries, and having to manually define Colour1, Colour2, Colour3 etc, I wanted to do it with less code .. this way I can say
[x]
instead of
Yes, I could do this with a method, but I don't like having to use methods instead of properties, and the code looks better
Arrgh. the [] doesn't like an i
Message was edited by:
Julian Lyndon-Smith
Was this documented anywhere ?? It's a great feature
Looks cool. Does this work with variable length arrays as well?
Looks cool. Does this work with variable length
arrays as well?
Looks like it does
[1,2,3,4,5][p_Index]
def var a as experimental.array.
a = new experimental.array().
a:FooSize = 5.
message a:foo[1]]>
]]>