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 #74643 is a reply to message #74640] Wed, 26 January 2011 06:48 Go to previous messageGo to previous message
Giovanna is currently offline  Giovanna
Messages: 12
Registered: January 2011
Junior Member
On 26 jan, 11:52, Gray <grayliketheco...@gmail.com> wrote:
> On Jan 26, 8:25 am, Giovanna <giovanna01.san...@gmail.com> wrote:
>
>> Hi all,
>
>> I need to read and save a file using IDL, but my code is reading and
>> saving only the first line. Please, see my code:
>
>> PRO READ_FILE
>> OpenR, lun, 'C:\Documents and Settings\Web\IDLWorkspace\Projeto_Estudo
>> \dados.dat', /Get_lun
>> file = ''
>> ReadF, lun, file
>> SAVE, FILENAME=('C:\Documents and Settings\Web\IDLWorkspace
>> \Projeto_Estudo\teste1.dat')
>
>> ;print,file
>> END
>
> It reads in the first line because "file" is a string, and not a
> string array.  If you want the whole thing you need:
>
> file = strarr(file_lines(...))
> readf, lun, file


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??

Thanks
[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 19:29:41 PDT 2025

Total time taken to generate the page: 0.00552 seconds