dinodod Posted January 22, 2007 Share Posted January 22, 2007 Just curious, does #region do anything useful or does it simply 'group' blocks of code for easier reading? I'm using comments in my code and was wondering what method I could use that would be best for adding comments to my code about blocks of code. I see uses for #region but I grew up since the days of DOS 1.0 and always used comments in my code. Is there another way that is preferred? Thanks. Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
herewasplato Posted January 22, 2007 Share Posted January 22, 2007 If you have large blocks of code, you can use #region/#endregion along with SciTE's code folding to hide sections or regions of you code to make scrolling easier. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Shevilie Posted January 22, 2007 Share Posted January 22, 2007 Have a look in the UDF's thay are often well commented - So you might wanna do as they do Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
dinodod Posted January 22, 2007 Author Share Posted January 22, 2007 If you have large blocks of code, you can use #region/#endregion along with SciTE's code folding to hide sections or regions of you code to make scrolling easier.I like the code folding in SCITE. Very nice option. But for me, it doesn't keep the folds after I close the file. I also have another issue with the folds. I need to customize what it sees to fold. It like to fold all sorts of things but I want to trim the fat from the fold and have a select list of things to have it fold.Any thoughts on that? Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
herewasplato Posted January 22, 2007 Share Posted January 22, 2007 ...I need to customize what it sees to fold...I would not know how to do that - but, as mentioned above, UDFs are another way to make the code easier to look at :-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Developers Jos Posted January 22, 2007 Developers Share Posted January 22, 2007 (edited) I like the code folding in SCITE. Very nice option. But for me, it doesn't keep the folds after I close the file. I also have another issue with the folds. I need to customize what it sees to fold. It like to fold all sorts of things but I want to trim the fat from the fold and have a select list of things to have it fold.Any thoughts on that?SciTE doesn't remember the last folding state, only thing you can do is set the initial folding state of all folds.Have no idea what you mean with the rest of your post .... "sees to fold" , "trim the fat from the fold " ? Edited January 22, 2007 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
dinodod Posted January 23, 2007 Author Share Posted January 23, 2007 What I meant is that if you look at the folds in SCITE, it 'sees' a lot of pieces that it wants to be able t fold. For instance, it reconizes CASE statements and makes a option to fold it. I do not want it to 'see' CASE statements as an option to fold (Hence trimming the fold ) And yes, I have thus far alone in the beginning of my project over 350 lines of UDF's and rapidly growing Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
Developers Jos Posted January 23, 2007 Developers Share Posted January 23, 2007 (edited) What I meant is that if you look at the folds in SCITE, it 'sees' a lot of pieces that it wants to be able t fold. For instance, it reconizes CASE statements and makes a option to fold it. I do not want it to 'see' CASE statements as an option to fold (Hence trimming the fold )Still don't understand the Folding issue...Yes it does recognise each If-endif select-case-endselect etc as folding points but it is up to you to fold on it. Edited January 23, 2007 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
dinodod Posted January 23, 2007 Author Share Posted January 23, 2007 Still don't understand the Folding issue...Yes it does recognise each If-endif select-case-endselect etc as folding points but it is up to you to fold on it.That is what I do not want it to reconize. I only want it to reconize #Region, not Select or some other commands. I don't want Select to have an option to fold. basically, I want to have it skipped. As I look at the folds, it becomes very cumberson to use since it 'see' so many things it wants to allow you to fold. I need to implify it. Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
Developers Jos Posted January 23, 2007 Developers Share Posted January 23, 2007 That is what I do not want it to reconize. I only want it to reconize #Region, not Select or some other commands. I don't want Select to have an option to fold. basically, I want to have it skipped. As I look at the folds, it becomes very cumberson to use since it 'see' so many things it wants to allow you to fold. I need to implify it.No options for that other than to write your own lexer version, but I wouldn't want it like that. It makes it easier to read the code in my opinion . SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now