It is currently Sat Dec 14, 2019 9:57 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Macros - nested definitions not supported
PostPosted: Fri Apr 19, 2019 7:04 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3717
Location: Berlin, Germany
I think it would make sense to mention in the official documentation of Macros, that PB does not support nested Macro definitions. Otherwise, pointless discussions and "bug reports" about this topic will keep coming up on the forum.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: Macros - nested definitions not supported
PostPosted: Fri Apr 19, 2019 4:23 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 13, 2010 3:45 pm
Posts: 946
+1

_________________
sorry for my bad english


Top
 Profile  
Reply with quote  
 Post subject: Re: Macros - nested definitions not supported
PostPosted: Fri Apr 19, 2019 5:25 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 502
Location: Germany / one of the fishheads
+1, but...

That would be good, but then the compiler should also output a meaningful error when trying to create a nested macro.

In one of the 'pointless discussions' you mentioned, it was discovered that the compiler actually is not prepared for this constellation and does not behave in a comprehensible way. (viewtopic.php?f=13&t=72669)

Counterexample:
If one currently try to assign a numeric value to a string variable, the compiler will tell you clearly WHAT exactly you just did wrong. But it doesn't do that in case of wrongly used macros.

_________________
PB 5.71 x64, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 51y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
 Post subject: Re: Macros - nested definitions not supported
PostPosted: Fri Apr 19, 2019 6:47 pm 
Offline
Addict
Addict

Joined: Fri Nov 09, 2012 11:04 pm
Posts: 1715
Location: Uttoxeter, UK
+1

_________________
DE AA EB


Top
 Profile  
Reply with quote  
 Post subject: Re: Macros - nested definitions not supported
PostPosted: Fri Apr 19, 2019 7:16 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3717
Location: Berlin, Germany
kurzer wrote:
+1, but...

That would be good, but then the compiler should also output a meaningful error when trying to create a nested macro.

I absolutely agree.
When the compiler encounters things that it does not support, it should generate meaningful error messages. That would make our lifes as programmers considerably easier. :-)

_________________
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  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 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