[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with scalar structures

Brian Jackel <jackel@danlon.physics.uwo.ca> writes:
> Can anyone suggest a (simple, elegant) way to deal with 
> the generic command
>   test.x= test.x * a
> where "test.x" and "a" are arrays of length N, and N is 
> sometimes equal to 1?

I use the following, and it seems to work fine:

  test(*).x = test(*).x * a

It works under both IDL 4 and 5.  By the way, I think even "scalar"
structures are actually vectors of length one, so this notation should
always work.


Craig B. Markwardt, Ph.D.         EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response