type of array element, type of assoz key?
dennis luehring
dl.soluz at gmx.net
Sun Aug 5 01:56:59 PDT 2007
Frits van Bommel schrieb:
> dennis luehring wrote:
>> how can i get the element type of an array at compiletime?
>>
>> example:
>> int test[5] --> int
>> double test[] --> double
>>
>> and what is the type of the key of an assoz. array?
>>
>> int test[char[]] --> int, char[]
>> double test[int] --> double, int
>
> (This sort of post is more appropriate in digitalmars.D.learn, followups
> set)
sorry and thanks
as a question: should the valuetype/keytype become a part of the array
type properties?
for example?
typeof(arr.keys[0]) --> arr.keytype
typeof(arr.values[0]) --> arr.valuetype
More information about the Digitalmars-d-learn
mailing list