Today i want to show you a small way to add some better view to your code.
I often camed to the situation were i wroted some hundred lines of code and lost the trace wich file contains what and were in my script code is what function.
Some of you may used C# and know it when try to sort code into Regions to use the folder view\close to hide or see code.
This works in Pascal Script as well.
This Picture shows a sample of one of my Units , were dozen of Code is displayed (Nearly 1000 Lines of Code in 1 File )
You may coming in same Situation and think -> "Okay were is my Procedure XY"
The second Picture shows when i used Regions and folded Code...
So how it works?
First we need to declare where a Region Start by adding
{$Region Tutorial}
.
The Name Tutorial can be replaced with any kind of Text you like to describe the region.
Then we need to declare where a Region Ends by adding
{$Endregion}
You can pack Regions into Regions, Stealth Editor will display the region folding when right applied..
Sample :
Hope this will help you designing Pascal Scripts