Enabling/Disabling Code in PrimalScript 2009

PrimalScript 2009 includes a nice new feature that helps out in the script development process. You can now select a block of code, right click, and choose Disable Code.

Picture 1

This option will do three things to the selected block: it will comment out the selection, wrap the block in a “Disabled Code” region and collapse that region.


The code block can easily be re-enabled by right clicking on the collapsed block region tag and selecting Enable Code.

Picture 1

Enabling/Disabling code in this way is much quicker that simply commenting out code. Enclosing the block in a region eliminates having to reselect the block to uncomment it. Also, folding the region makes the remaining code easier to read and debug.