[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with scalar structures
- Subject: Re: Problems with scalar structures
- From: Craig Markwardt <craigmnet(at)astrog.physics.wisc.edu>
- Date: 26 May 1998 10:50:58 -0500
- Newsgroups: comp.lang.idl-pvwave
- Organization: U. Wisc. Madison Physics -- Compact Objects
- References: <6kd63v$u1o@ds2.acs.ucalgary.ca>
- Reply-To: craigmnet(at)astrog.physics.wisc.edu
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:11047
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
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------