Array elements as named variables? [message #2371] |
Mon, 27 June 1994 09:51 |
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
|
|
|