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

Home » Public Forums » archive » Printf
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: Printf [message #91792 is a reply to message #91791] Thu, 27 August 2015 02:26 Go to previous messageGo to previous message
Yngvar Larsen is currently offline  Yngvar Larsen
Messages: 134
Registered: January 2010
Senior Member
This probably means that your variable XX is an array (possibly with one element). Try

filename = 'maks'+strcompress(xx[0])+'.txt'
File1 = filepath(filename,subdirectory = ['Final'])
openw,lun,File1,/get_lun


As a side note:

IDL> print, filepath('somefile',subdirectory = ['Final'])
/usr/local/exelis/idl82/Final/somefile

Are you sure you really want to write to the default IDL root directory? If not, you can do something like this:

IDL> root_dir = '/my/data/directory/'
IDL> print, filepath('somefile',subdirectory = ['Final'], root_dir=root_dir)
/my/data/directory/Final/somefile


On Thursday, 27 August 2015 11:08:40 UTC+2, Dete van Eeden wrote:
> This makes No sense to me. I have the following:
>
>
> filename = 'maks'+strcompress(xx)+'.txt'
>
> File1 = filepath(filename,subdirectory = ['Final'])
>
> openw,lun,File1,/get_lun
>
> then I get the error OPENW: Expression must be a scalar or 1 element array in this context: FILE1.
>
> before even getting to the printf part.
>
> thanks
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Google Earth Curtain Plot
Next Topic: help with WHERE( ) function

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

Current Time: Wed Oct 08 15:10:16 PDT 2025

Total time taken to generate the page: 0.00445 seconds