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

Home » Public Forums » archive » Reading Values into Individual Array Elements
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Reading Values into Individual Array Elements [message #5927] Tue, 12 March 1996 00:00 Go to previous message
Rolando Raqueno is currently offline  Rolando Raqueno
Messages: 5
Registered: March 1996
Junior Member
Hello,

I am trying to read values into an idl array and ran into the following
behavior.

I tried reading directly into an array using the following steps

IDL> a=make_array(5)
IDL> print,a
0.00000 0.00000 0.00000 0.00000 0.00000
IDL> read,a
: 1 2 3 4 5
IDL> print,a
1.00000 2.00000 3.00000 4.00000 5.00000

Which works as I expected.

However, when I try to use a specific element in the array as an
argument to the READ statement, IDL no longer prompts me for the
value but returns value of the element as shown below.

IDL> read,a(3)
4.00000IDL>

A workaround would be to use a scalar temporary variable and then
assign it to the specific element, but that seemed a bit circuitous
and not unlike other languages.

Is there something I am missing in this situation?

Thanks

Rolando Raqueno
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: .gif files
Next Topic: A simple 'image frames' package

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

Current Time: Wed Oct 08 19:36:05 PDT 2025

Total time taken to generate the page: 0.00469 seconds