Re: READF: Input conversion error. [message #91316 is a reply to message #91314] |
Mon, 29 June 2015 08:58   |
Priyadarsini Sivaraj
Messages: 15 Registered: June 2015
|
Junior Member |
|
|
On Monday, 29 June 2015 11:49:58 UTC-4, David Fanning wrote:
> Priyadarsini Sivaraj writes:
>
>> Sry..The subject is OPENR: Expression must be a scalar or 1 element array in this context: FILENAME.
>
> Two things are wrong. Arrays in IDL are zero-based, so array indices go
> from 0 to n-1, not from 1 to n, as you have it here. And, string
> concatenation happens with a plus sign. You have:
>
> file=[filelocation,filename]
>
> Making "file" a two-element array (when it should be a scalar). You
> probably want something like this:
>
> file = filelocation + filename
>
> Or, perhaps this:
>
> file = filelocaton + PathSep() + filename
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Thank you so much sir!
But another error pops out saying,
READF: Input conversion error. Unit: 105,
How can I handle this..?
|
|
|