I was compiling my program when the compiler claimed (correctly) that there was an error in my code:
This message was correct, but instead of signaling the file name and the line where the error was present, it was showing the line number and the file name of where the function was defined!
It also messes with the line number, which corresponds to where the error happened, not where the function was defined. In my case, the error happened at line number 105 of player.bas, calling function FormatStr() defined in line number 39 of util.bas.
I think it would be better to expose both pieces of information, maybe this way:
Well, something like that.
Code:
util.bas:105: error: Function 'FormatStr' takes 3 parameters, not 1
It also messes with the line number, which corresponds to where the error happened, not where the function was defined. In my case, the error happened at line number 105 of player.bas, calling function FormatStr() defined in line number 39 of util.bas.
I think it would be better to expose both pieces of information, maybe this way:
Code:
player.bas: 105: error: Function 'FormatStr' takes 3 parameters, not 1
util.bas:39: error: Function 'FormatStr' defined here.
-- Baltasar