Article View: borland.public.jbuilder.java.language
Article #15640double value to file text
From: Hungria Berbesi
Date: Tue, 18 May 1999 00:00
Date: Tue, 18 May 1999 00:00
61 lines
2214 bytes
2214 bytes
Hello!!
I speak a little english only.
Please help me!!
Who can help me??
I need use a text file. I use doubles values, an array of doubles
values, and I need write they into a text file.
How can I do it?
Here is a code make for me, but, my file text is bad, because
the values have a blanks in int.
Here is my code:
try{
dd=new Double(Efe_glo_i_d[time]);
s=dd.toString(Efe_glo_i_d[time]);
//s=String.valueOf(Efe_glo_i_d[time]);
output.writeChars(s); output.writeChar('\t');
s=String.valueOf(Efe_glo_pre[time]);
output.writeChars(s); output.writeChar('\t');
s=String.valueOf(Efe_glo_merc[time]);
output.writeChars(s); output.writeChar('\t');
output.writeChar('\n');
}
catch(Exception e){
System.out.println("Error al escribir en el archivo ");
System.err.println("Exception: " + e);
}
}
Why my text file has blank values inter numbers??
i need use 1.0008768173500533 no 1 . 0 0 0 8 7 6 8 1 7 3 5 0 0 5 3 3
Please help me..
My text file is this:
1 . 0 0 0 8 7 6 8 1 7 3 5 0 0 5 3 3 1 . 0 5 2 6 3 1 5 7 8 9 4 7 3 6
8
4 1 . 0 1 5 0 0 0 0 0 0 0 0 0 0 0 0 1 1 . 0 0 1 3 7 9 2 6 5
9
6 3 9 7 0 2 1 . 0 4 3 4 7 8 2 6 0 8 6 9 5 6 5 2 1 . 1 6 4 2 8 5
7
1 4 2 8 5 7 1 4 4 1 . 0 0 1 4 8 6 7 6 2 4 7 8 2 3 9 8 1 . 0 3
4
4 8 2 7 5 8 6 2 0 6 8 9 5 1 . 2 1 3 6 3 6 3 6 3 6 3 6 3 6 3 6
1 . 0 0 1 4 7 4 9 2 6 5 9 1 1 6 0 9 1 . 0 2 5 6 4 1 0 2 5 6 4 1 0 2
5
I need use 1.0008768173500533 no 1 . 0 0 0 8 7 6 8 1
7 3 5 0 0 5 3 3
Please help me..
thanks in advance
sincerely
hungria berbesi
Technical Details
Message-ID:
<37417137.69AF1A31@ing.ula.ve>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,e82beaabf6dbe49f X-Google-Attributes: gidf74b3,public From: Hungria Berbesi <hungria@ing.ula.ve> Subject: double value to file text Date: 1999/05/18 Message-ID: <37417137.69AF1A31@ing.ula.ve> X-Deja-AN: 479436216 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language