Sign in to follow this  
Followers 0
random42

#region - what is it

5 posts in this topic

I was looking to convert a numeric month into the word and came across Valik's code (link below) to do so. In looking at it I see he uses #region and #endregion which I hadn't heard of. I naturally clicked the word and pressed F1 to read the help file. Nothing. Not the first time though so I switched to the search tab. Still nothing useful for my imediate purposes. I did learn a little about pixel regions though. Next I came here and searched for #region and #endregion. I don't see any obvious posts in regards to these other than the standard JokesII post that comes up with every search. Apparently this forum can even make jokes about #region - which is really quite impressive... or twisted... or both. Either way at this point I wouldn't get the joke. Can someone direct me to the appropriate location to find info about #region?

http://www.autoitscript.com/forum/index.ph...;hl=month++name

Thanks!

Share this post


Link to post
Share on other sites



It is for code folding.

Open Valik's code within the SciTE editor and click on the minus sign between the line number and the line with #region on it for a demo* of code folding.

* I do not know if "SciTE-Lite" folds code - I have the "full version" of SciTE4AutoIt3.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Mine folds the code. I just thought it might do more than that. Not that being able to format in SciTE isn't useful enough.

So it is simply to make it more readable? It doesn't provide any functionality beyond formating?

Share this post


Link to post
Share on other sites

Mine folds the code. I just thought it might do more than that. Not that being able to format in SciTE isn't useful enough.

So it is simply to make it more readable? It doesn't provide any functionality beyond formating?

Its very handy when you have a real big script to section the code in regions that easily fold and unfold.....

The Folding is part of SciLexer.dll used by all versions of SciTE.... :whistle:


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0