and I want to read it using fscanf, but I don't know the length. I try
but this fails with an error,
warning: fscanf: end of file reached before final conversion
error: value on right hand side of assignment is undefined
error: evaluating assignment expression near line 4, column 4
error: evaluating while command near line 3, column 1
error: called from `try' in file `/us0/theo/doron/tmp/try.m'
I found no way around this, even unwind_protect is no help inside a
function. What to do?
It seems fscanf behaves quite badly at eof. IMHO it should not fail,
but explicitly return  so that assignments don't crash.
P.S. This is just an example, so don't tell me there are other ways
to load this file!
Hi Eyal, the following code would give you the number of lines in the
file on a UNIX Machine. (Sorry, if you happen to work with a different OS)
Maybe this is of help? I know, this is not really satisfactory, but would
show a way, how to avoid reading beyond the EOF mark of a text-file.