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

Home » Public Forums » archive » Array elements as named variables?
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
Array elements as named variables? [message #2371] Mon, 27 June 1994 09:51
msegur is currently offline  msegur
Messages: 2
Registered: June 1994
Junior Member
Is it possible to used an element of an array as a named variable
in order for a procedure to store a value in it? When I try to do this, I
get an error telling me that the expression must be a named variable, but
it seems like a reasonable thing to want to do. I know that I can use a
dummy variable to store the value, but this seems awfully clumsy. Am I
missing something?
(In case my description didn't make sense, the following bit of
code:
d_name = make_array(glob.ndims, /STRING)
d_size = make_array(glob.ndims, /LONG)
ncdf_diminq, cdfid, i, d_name(i), d_size(i)

produces the error:

% NCDF_DIMINQ: Expression must be named variable in this context: <STRING
('')>.
% Execution halted at NCDF_CAT2 <ncdf_cat2.pro( 17)> (NCDF_DIMINQ).

Any help appreciated.
--
Matt Segur | "Life is pain, Highness. Anyone who says
-----------------------------| differently is selling something."
msegur@colorado.edu |
| -- The Princess Bride
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: [Q] routines for calculating radius by 3 points
Next Topic: Re: Emacs mode for IDL: where?

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

Current Time: Wed Oct 08 13:36:08 PDT 2025

Total time taken to generate the page: 0.00672 seconds