[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: converting to array

davidf@dfanning.com (David Fanning) wrote:

>Norbert Hahn (hahn@hrz.tu-darmstadt.de) writes:
>> This is the shortest solution. However, I would read these
>> values into a string, count the words there and then use
>> ReadS to retrieve the data from the string.
>Why, for Heaven's sake!?

There are several ways to read numeric data and the method
to read them should be base on how they are written.

1) If the data is written by a program that I can put my
   hand on, I usually read the data under format control.

2) If the data comes from some unknown source I prefer to
   read the data into a string at first and analyze that
   string. This is to prevent program breaks due to wrong

I prefer a program break and some meaningful messages 
over a quietly reading program that calmly digests wrong