comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » problem with arrays of structures
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
problem with arrays of structures [message #10603] Wed, 07 January 1998 00:00
Theo Brauers is currently offline  Theo Brauers
Messages: 58
Registered: November 1997
Member
Hi.

I was trying to copy the contents of an array to an
element of an array of structures:

FUNCTION test2, str
r = { a: '', b:1.}
i=n_elements(str)
r2 = replicate(r, i)
help, r2, r2.a
r2.a=str
r2.b=float(str)
return, r2
END

works fine with
x=test2('100')
x=test2(['100', '101'])

but fails with
x=test2(['100'])

Whats am I doing wrong? Or does IDL wrong with
array of one element?

Thanks

----------------------------------------------
Theo Brauers
Institut fuer Atmosphaerische Chemie (ICG-3)
Forschungszenrum Juelich
52425 JUELICH, Germany
Tel. +49-2461-61-6646 Fax. +49-2461-61-5346
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Does TRIANGULATE return vertices in counter-clockwise order?
Next Topic: IDL 4,5 change in MAP_SET behaviour?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 14:59:52 PDT 2025

Total time taken to generate the page: 1.67969 seconds