Re: reading lines with trailing white spaces



Coming from a C,C++ background I have been told to avoid GOTO like hell.
But, I guess, it is more of a choice/style ...


No offense taken :) I checked my code (the textstream one), it
contains
a single goto in a routine of approximately 20 lines. I guess I could
have
used the value of an IOSTAT= variable (-2 indicates end-of-line) but I
was
probably too lazy to do it :).

Anyway:

Even in C gotos can be very useful, just as in Fortran: to avoid
cluttering
the source code that deals with the ordinary case with error handling
code
directly after the detection of the error. I have seen source code
that
aggressively tries to avoid that - as it was reading a file, after
every
read statement, several tens of them, you would see a check on
possible
I/O errors and if there was an error, the file would be closed and the
routine would return ... I leave the conclusion to you :)

Regards,

Arjen

.