Interactive conditional compilation

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Interactive conditional compilation

Post by Lunasole »

Hi. The idea is to extend/adopt code folding functionality allowing it to affect compiler input.

There is a way to hide code blocks using ;{ and ;} for example, would be nice to have also ability of including/excluding such regions of code to compiler input.

That would be very useful in debugging, as it is much more reliable than redefining conditional compilation constants/conditions everytime manually. Also It should be made as session-only feature (like debugger breakpoints: without storing settings).

Code: Select all

;{ Some code }

	Define A
	
	;{ Code part 1 }
		; doing something with A
		While Not A
			A-~A
		Wend
	;}
	
	Debug A
;}
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Interactive conditional compilation

Post by skywalk »

CompilerIf :idea:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Interactive conditional compilation

Post by Lunasole »

skywalk wrote:CompilerIf :idea:
> it is much more reliable than redefining conditional compilation constants/conditions everytime manually
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
Post Reply