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 #74707 is a reply to message #74612] Thu, 27 January 2011 08:24 Go to previous message
Giovanna is currently offline  Giovanna
Messages: 12
Registered: January 2011
Junior Member
On 27 jan, 13:25, Paolo <pgri...@gmail.com> wrote:
> 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


Hi,

This error is occurring when running:

Error -
OPENR: All available logical units are currently in use.
% Execution halted at: READ_FILE 3 read_file.pro
% $MAIN$

This error is occurring this line: OpenR, lun, 'dados.dat', /Get_lun

What could be??

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: Sat Oct 11 08:45:49 PDT 2025

Total time taken to generate the page: 1.12269 seconds