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?