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

Home » Public Forums » archive » Re: Reading and saving a 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: Reading and saving a file [message #74612 is a reply to message #74611] Thu, 27 January 2011 07:25 Go to previous messageGo to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Jan 27, 7:32 am, Giovanna <giovanna01.san...@gmail.com> wrote:
> On 26 jan, 18:42, Paolo <pgri...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>> On Jan 26, 1:19 pm, Giovanna <giovanna01.san...@gmail.com> wrote:
>
>>> On 26 jan, 13:37, Giovanna <giovanna01.san...@gmail.com> wrote:
>
>>>> On 26 jan, 13:22, Paulo Penteado <pp.pente...@gmail.com> wrote:
>
>>>> > On Jan 26, 12:48 pm, Giovanna <giovanna01.san...@gmail.com> wrote:
>
>>>> > > So, i'm reading a file, i need to extract data and save into another
>>>> > > file, but is coming with strange characters.
>>>> > > In what format I save so they do not come up with these strange
>>>> > > characters and that JAVA can also read??
>
>>>> > Where do you see the problem? In IDL, from what was read? In the file
>>>> > written by IDL? Which characters are creating the problem?
>
>>>> > Generally speaking, any text files made in IDL should be easy to read
>>>> > in Java, since IDL only natively does ASCII strings, and Java natively
>>>> > uses Unicode.
>
>>>> I'm reading this file for example:http://pastebin.com/ctHZC8wvand
>>>> when i save characters appear. See:http://pastebin.com/HsQse0uy
>
>>>> My code:http://pastebin.com/eiAVywr1
>
>>>> Thanks
>
>>> Hi all,
>
>>> I'm reading a file, i need to extract data and save into another
>>> file, but is coming with strange characters.
>>> I'm reading this file for example:http://pastebin.com/ZLgMjrH3and
>>> when i save characters appear. See:http://pastebin.com/NbwKhqAw
>
>>> My code:http://pastebin.com/kShggiSa
>
>>> I need to save in a format that is then recognized by JAVA.
>
>>> Understood?
>
>> The solution is not to use the "save" function.
>> Use "printf" to write the contents to the new
>> file.
>
>> Ciao,
>> Paolo
>
> How do i use the printF? So: printF, file, 'teste1.dat'
>
> ??

Basically you want to use openw to get a file unit:

openw, Unit, 'data.dat', /GET_LUN

then printf to write the contents

mydata=[1,2,3]

printf,unit,mydata

close,unit


Ciao,
Paolo
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: configuration file to go along with a virtual machine program
Next Topic: MATRIX LOGARITHM (and EXPONENTIAL)

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

Current Time: Wed Oct 08 17:28:06 PDT 2025

Total time taken to generate the page: 0.00466 seconds