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

Home » Public Forums » archive » Re: write unix textfile with windows idl
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: write unix textfile with windows idl [message #37738 is a reply to message #37737] Thu, 22 January 2004 01:09 Go to previous messageGo to previous message
Klemens Barfus is currently offline  Klemens Barfus
Messages: 45
Registered: December 2002
Member
Hi Michael,
testing your code I got:

% "(%"%s\n")"
% ^
% Unexpected text in format.

I am not familar with C-style format code, any suggestions ?

Thanks in advance !

Klemens




Michael Wallace wrote:

>> A work-around is to use writeu in stead of printf and use the string
>> procedure to format the text, i.e. to write some text and a number, the
>> following code works
>>
>> writeu, 1, String( "Hello word, the year is", 2004), 10B
>>
>> but looks ugly. Any other ideas?
>
>
>
> You can use the format keyword of the string function to add a C-style
> control character to the string. For UNIX, just add \n (newline) to the
> end of your string. For Windows, add \r\n (carriage return and newline).
>
> ; UNIX version
> writeu, 1, string('Hello World', format = '(%"%s\n")')
>
> ; Windows version
> writeu, 1, string('Hello World', format = '(%"%s\r\n")')
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: again strsplit
Next Topic: Strange widget_info(FIND_BY_UNAME...) results

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

Current Time: Fri Oct 10 18:19:45 PDT 2025

Total time taken to generate the page: 1.52432 seconds