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

Home » Public Forums » archive » Re: Can IDL create a plain text file?
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: Can IDL create a plain text file? [message #51865 is a reply to message #51864] Thu, 14 December 2006 14:40 Go to previous messageGo to previous message
Matt[1] is currently offline  Matt[1]
Messages: 23
Registered: December 2006
Junior Member
Thanks for the helpful responses and great leads. I'll give it a go.

Matt
www.landcover.org



On Dec 14, 5:24 pm, Christopher Thom <c...@oddjob.uchicago.edu> wrote:
> Hmmmm. Well, printing the stuff to the file is easy
>
> opewn, lun, 'myfile', /get_lun
> printf, lun, '"string in quotes"'
> free_lun, lun
>
> To append a parameter, say the contents of a variable myvar, you could
> use:
>
> str = '"string in quotes"'+strtrim(string(myvar),2)
> printf, lun, str
>
> the string() function converts myvar to a string, and strtrim() with the
> ",2" parameter trims the whitespace from the front and back. There are
> file_* routines that can help you construct the list of file -- see the
> help docs for those.
>
> cheers
> chris
>
> Quoth Matt:
>
>> I'm sorry david, it's not a trick question. I'm a geographer, not a
>> programmer, and one with about 2 months of IDL experience under my belt
>> to boot (and no other programming/scripting exposure at all). I think
>> I'm learning quickly, considering, and am finishing preparations to
>> process 4TB of satellite imagery. Nothing super high end, i'm sure, but
>> challenging nonetheless (at least to me).
>
>> A colleague mentioned that I should be able to create a text file in
>> IDL. Thie file will then be used as a paramater file for an ERDAS
>> Imagine script, which is called from IDL using SPAWN. Like I said
>> before, I've seen this done with PERL but given my deadlines I don't
>> have the time to go exploring PERL while still trying to learn IDL.
>
>> Silly question, I'm sure, but a real one nonetheless...
>
>> :-( indeed
>
>> Matt
>
>> On Dec 14, 4:13 pm, David Fanning <n...@dfanning.com> wrote:
>>> Matt writes:
>>>> Question - can IDL create a plain text file of a filelist following
>>>> user specifications? By this I mean that I'd like a text file listing
>>>> files in a directory, but would like to enclose file names in quotes
>>>> and add additional text to it. I imagine that this can be done by
>>>> calling a PERL script but I'm wondering if IDL can do it internally.This has GOT to be a trick question. I just can't
>>> see it though. :-(
>
>>> Cheers,
>
>>> David
>
>>> --
>>> David Fanning, Ph.D.
>>> Fanning Software Consulting, Inc.
>>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Coincident values of string and numbers in 2 arrays..
Next Topic: Zipped Files

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

Current Time: Fri Oct 10 18:41:31 PDT 2025

Total time taken to generate the page: 0.88148 seconds