PB 5.11-5.20 - Error shown on wrong line / in wrong file
Posted: Fri Aug 16, 2013 6:36 pm
I've tested all following code with PB 5.11 and PB 5.20 beta 9 on Windows XP x86.
The first part shows expected behaviour, and the second part shows the problem.
Expected
When I run "main.pb", the IDE opens "test.pbi", highlights the line inside the procedure TestProc(), and shows a MessageRequester that says:
Now the previously shown error in my code is removed by commenting Foo() in the procedure:
When I run "main.pb" now, the IDE does not open "test.pbi", but it highlights the line which contains TestMacro() in "main.pb". It also shows a MessageRequester that says:
I know that the code inside the macro is copied to "main.pb", but if an error occurs the compiler or the IDE could "remember" that the code originated from that macro in "test.pbi", couldn't it?
The first part shows expected behaviour, and the second part shows the problem.
Expected
Code: Select all
; File "test.pbi"
Procedure TestProc()
Foo()
EndProcedure
Macro TestMacro()
Foo()
EndMacro
Code: Select all
; File "main.pb"
XIncludeFile "test.pbi"
TestProc()
TestMacro()
ProblemLine 4: Foo() is not a function, array, list, map or macro.
Now the previously shown error in my code is removed by commenting Foo() in the procedure:
Code: Select all
; File "test.pbi"
Procedure TestProc()
; Foo()
EndProcedure
Macro TestMacro()
Foo()
EndMacro
Code: Select all
; File "main.pb"
XIncludeFile "test.pbi"
TestProc()
TestMacro()
and a "Macro Error" window that says:Line 6: Foo() is not a function, array, list, map or macro.
Especially when a program has lots of include files, it would be way more helpful if the IDE would open "test.pbi", and highlight the line which contains Foo() inside the macro TestMacro(), like it did in the above example.Foo()
I know that the code inside the macro is copied to "main.pb", but if an error occurs the compiler or the IDE could "remember" that the code originated from that macro in "test.pbi", couldn't it?