Software Archive
Read-only legacy content
17061 Discussions

Error message

Intel_C_Intel
Employee
404 Views
My program opens several different text files for input. One particular file is returning a run-time error: severe (64): input conversion error. I've been trouble-shooting this for a while, and cannot find a solution. It's not a formatting problem, and the files opens as the first line is read and written out perfectly. Any suggestions would be greatly appreciated.
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
404 Views
The most frequent reason for such message is that RTL finds something
unexpected in F or I edit descriptor; of all those, the most frequent reason is that it's a tab (my bet) or EOF.

Try locating the exact line in your input (not source) file where the error happens. Then, try opening it in, say, Visual Studio and switch on "View Whitespace" (Ctrl+Shift+8). I'm pretty sure you'll find something unexpected there. Btw, I think that the tab characters (CHAR(9)) as default in both source and other file formats in VS are rather annoying .

Jugoslav
0 Kudos
Intel_C_Intel
Employee
404 Views
When dealing with input files created by others, a good safety play is to read each line of data as a character string and then analyse it. Like Jugoslav, I too dislike tabs - especially after I found them in the middle of numbers in one input file (The file had been put into Excel and back out again)

On analysing a line of data in the form of a character string, it depends on what I expect to find and what I need to read - sometimes I look for Tabs, sometimes I replace all non-printing characters by spaces (that one cures a lot of troublesome files), and sometimes I strip out all but numbers (but careful with numbers in exponent form).

I find that data files are, by and large, deteriorating in quality with the years, and I put this down to the increasing remotenesss of the users of high-level software from what they are producing.

I hope this gives you some general advice.

Bear of little brain
0 Kudos
Reply