Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Code folding
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Token-based=== Token-based folding points are specified using special [[delimiter]]s that serve no other purpose in the text than to identify the boundaries of folding points. This convention can be compared to indentation-based folding points, where printable characters are used instead of whitespace. The most common delimiter tokens are <code>{{{</code> to begin the folded section, and <code>}}}</code> to end it. Another notable token is <code>[http://msdn.microsoft.com/en-us/library/9a1ybwek.aspx #region]</code> ([http://msdn.microsoft.com/en-us/library/ed8yd1ha.aspx C# directives]), respectively <code>[http://msdn.microsoft.com/en-us/library/sd032a17.aspx #Region]</code> ([http://msdn.microsoft.com/en-us/library/7ah135z7.aspx Visual Basic directives]), used in [[Microsoft Visual Studio]] [[Microsoft Visual Studio#Code editor|Code Editor]]. These are treated syntactically as [[Directive (programming)|compiler directives]], though they do not affect compilation. As a manual method, token-based folding allows discretion in grouping code based on arbitrary criteria, such as "functions related to a given task", which cannot be inferred from syntactic analysis. Token-based folding requires in-band signalling, with folding tokens essentially being structured comments, and unlike other methods, are present in the source code and visible to other programmers. This allows them to be shared, but also requires their use (or preservation) by all programmers working on a particular file, and can cause friction and maintenance burden.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)