Error messages and line numbers display



> Do you have a small example of the problem?

Yes, of course. In your example you get the error, together with the line 
number. You have defined the function foo, loaded test.mac and executed bar(). 
In this way, line numer is displayed.
But try to create a file with this simple command and load it:

if matrix_size(a)=1 then print("hello");

load("test.mac") gives the anonymous

The first argument of the function matrix_size must be a matrix
 -- an error.  To debug this try debugmode(true);

I have a .mac file (it's more than 1000 lines) with a lot of matrix_size 
checks, so I would appreciate if Maxima displayed line numbers. Anyway, as you 
said, debugmode could help me, but I don't see why I have to use a debugger if 
Maxima could tell me where is the error. I think such a feature could be 
really useful, especially to beginners, but convenient also for experienced 
users. I have been programming in Matlab for years, but I used the debugger 
only when necessary, not for these little problems.


Here's some other anonymous errors, in example:

stdin:23262:Incorrect syntax: FOR is not an infix operator
mit(K2,bk,inf)\n\tfor

stdin:23336:Incorrect syntax: Missing `then'
nnections[i,1]=5 do\n

stdin:23575:Incorrect syntax: Too many )'s
ucture is labile")\n)

Altough Maxima clearly explained which kind of error occurred, and even if 
their solution is very simple, a line number should be displayed. Moreover, 
only a little part of code is shown, making more difficult to find it. I think 
users have to be driven to the point where error is located without having to 
search for it. Moreover, typo errors could be easily solved, and without the 
debugger...


Stefano