It is currently Tue Mar 09, 2021 9:09 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: PB 5.11-5.20 - Error shown on wrong line / in wrong file
PostPosted: Fri Aug 16, 2013 6:36 pm 
Offline
Addict
Addict

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3973
Location: Berlin, Germany
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

Code:
; File "test.pbi"

Procedure TestProc()
   Foo()
EndProcedure

Macro TestMacro()
   Foo()
EndMacro

Code:
; File "main.pb"

XIncludeFile "test.pbi"

TestProc()
TestMacro()

When I run "main.pb", the IDE opens "test.pbi", highlights the line inside the procedure TestProc(), and shows a MessageRequester that says:
Quote:
Line 4: Foo() is not a function, array, list, map or macro.


Problem

Now the previously shown error in my code is removed by commenting Foo() in the procedure:

Code:
; File "test.pbi"

Procedure TestProc()
   ; Foo()
EndProcedure

Macro TestMacro()
   Foo()
EndMacro

Code:
; File "main.pb"

XIncludeFile "test.pbi"

TestProc()
TestMacro()

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:
Quote:
Line 6: Foo() is not a function, array, list, map or macro.
and a "Macro Error" window that says:
Quote:
Foo()

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.
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?

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye