about READ_ASCII format and PRINT a double array [message #61209] |
Wed, 09 July 2008 01:16 |
CL
Messages: 2 Registered: July 2008
|
Junior Member |
|
|
Dear all,
I have two troubles in IDL.
One is about READ_ASCII,
is there any method to read the "string" from some ascii file?
a test file is as follows,
-------------------------
1 A 30.123123123
2 B 40.123123123
-------------------------
test=read_ascii('test file')
col2=[test.field1[1,*]]
IDL will try to transform the format into float.
Is there any method to read that as a string?
The other trouble is about PRINT
as the test file above, if I want to print it out,
col3=[test.field1[2,*]]
it won't print the "30.123123123" correctly even though
I set the print format to "D."
And because the numbers are in an array, I cannot add "d" as
"30.123123123d."
Is there any method to print such array correctly?
Thanks a lot!
CL
|
|
|