Re: Access array elements with String [message #61349] |
Mon, 14 July 2008 13:17  |
humanumbrella
Messages: 52 Registered: June 2008
|
Member |
|
|
On Jul 14, 3:44 pm, Jean H <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
wrote:
>> b=INDGEN(s(3))
>> print, a[c,c,b]
>
>> might be more efficient - dunno, haven't tested.
>
> You would have to reformat (i.e. repeat the value) c so it has the same
> size as b.
>
> Jean
Thanks Bob,
In my particular application, it was difficult to use the solution
involving the range, because I had to put ':' in the dataset access
function. I do not know how many dimensions are in advance, so I
would need to switch on the number of dimensions in order to put the
right number of ':' in. I could be missing something,
Thanks Jean for the caution on the execute command, and I will check
out the help menu.
Thanks again everyone.
Cheers.
--Justin
|
|
|