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

Home » Public Forums » archive » Re: Proper use of assoc
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Proper use of assoc [message #33173] Fri, 13 December 2002 10:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Arthur (abbotta@annapolis.nscc.ns.ca) writes:

> Hi. I'm having a problem using associated i/o. I have a series of
> files that contain arrays of uints. I'm trying to use assoc to be
> able to access the arrays, but I so far have had no luck in getting
> it to work.
>
> The error that I'm getting is: "File expression not allowed in this
> context:<UINT FILE>". I get this error when I try to execute the
> assoc statement. I've checked for an error when the file is opened,
> but have detected none.
>
> Can anybody point out what I'm doing wrong?
>
> pro fileSet::createAssociation, filename,samples
>
> openu,1,filename, ERROR = err
> IF (err NE 0) then PRINTF, -2, !ERROR_STATE.MSG
> self.sonarData = assoc(1,uintarr(samples))
> end

The problem here is that whatever it is that ASSOC
returns, can't be stored in whatever type field
self.sonarData is. :-(

The return variable from ASSOC is a funny thing,
really. Not any type of IDL variable, as far as
I can see. Which pretty much eliminates it being
stored in any kind of a structure.

What I have done before is passed around the logical
unit number I want to have associated with the filename
(and maybe the filename itself) so that I can always
create a LOCAL associated variable in the program module
where I need it. I think that is the best you can do.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: Re: handling numbers
Next Topic: Re: Histogram indeterminate results

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

Current Time: Wed Oct 08 14:58:32 PDT 2025

Total time taken to generate the page: 0.00185 seconds