READ_ASCII truncating data [message #88012] |
Wed, 12 March 2014 05:36  |
Simon Mitchell
Messages: 6 Registered: October 2013
|
Junior Member |
|
|
Hi All,
I have an issue with READ_ASCII truncating data (IDL 8,01 Win7 64bit).
I am sure it is something to do with regional settings, the decimal place is set to "," instead of "."
The file that I am reading is space delimeter (HEX char 20) and my READ_ASCII statement reflects this (ie is default for the delimeter)
red_data = READ_ASCII(redfile, DATA_START = 6, COUNT = nl)
An example of the data from the input file is:
0,4571 1334,62 9,356
But when looking at the array after reading, the values are
0,0 1334,0 9,0
The same issue occurs if I include DELIMETER=string(20)
I do know that if I change the win7 regional settings to have the decimal place "." the data is read correctly without truncating.
But I do not want to change the settings as I have other software which does not work if it is changed.
Also, if the input file is changed to replace the "," with "." then the file is read correctly.
Would anyone have any idea as to why the READ_ASCII is behaving this way and have a solution?
Is it a mistake that I have made in the code, or is there some settings that need to be changed in IDL?
I cannot find any reference to this problem anywhere and there is nothing on regionalizing decimal place characters that I can find.
Many thanks in advance
SM
|
|
|