Ross - Your suggestion for folding on syntax is fine but it
doesn't go far enough.  The mainstream development world
recognized what you're saying long ago, did it, and then improved
upon it again.  We're sort of two generations behind in this
discussion.

Yes, Visual Studio folds C++, C#, and VB.NET on language
structures.  NetBeans, Eclipse, and other IDEs fold Java, PHP,
and other languages like that too.  They all fold comments as
described in the OP.

But then there is the next step.  There is a major difference
between folding code exclusively based on syntactical stuctures
and folding based on logical/functional components.  In BASIC we
can have several labelled, internal subroutines, and UV
Functions, that are a part of a functional set.  But, we can't
put those into a block to get them out of our way while we're
working on other sections.

The way I've done this is by INCLUDING code and then using a
utility that imports and exports all included code when I need to
see it all in one block or for editing.  The mvToolBox editing
software from DM Consulting is the only product I know that does
this sort of visual "hydration and dehydration" of code stored in
different modules.

Your faith in programmers following standards is amusing.  There
are no "standards" to be followed here.  This is just a function
of the development environment, like comments.  Use it or don't
as it's convenient.  Other languages and IDEs support folding and
developers use this stuff every day - it's unnatural Not to have
it anymore.  Err, except for our (n)ever evolving Pick BASIC.

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Visit PickWiki.com!  Contribute!


> From:Ross Ferris 
> Whilst I appreciate the structural tags I'd suggest 
> that they are not needed. It doesn't take too much 
> thought to recognise the self-bounding regions
> 
> Label: --> return
> For --> next
> If --> else --> end
> Loop --> repeat
> Begin case --> case --> end case
> 
> There are some "funny" possibilities with read/locked|then|else
> 
> Whilst I appreciate the fine grained control your 
> suggestion provides, my faith in programmers generally 
> following this "standard" is low, and providing people 
> haven't employed a single, linear top-down approach to 
> their programming, I think most (all) of the 
> collapsible regions could be derived directly from the 
> code with minimal effort

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to