Content deleted Content added
Tag: Disambiguation links added |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 19:
=== Indentation ===
Indentation style can assist a reader in various
For example, formatted in a commonly
<syntaxhighlight lang="c">
Line 74:
===== Python =====
{{Further|Python (programming language)}}
'''Python''' relies on the ''[[off-side rule]]'', using indenting to indicate and implement control structure, thus eliminating the need for bracketing (i.e., <code>{</code> and <code>}</code>). However, copying and pasting indented code can cause problems, because the indent level of the pasted code may not be the same as the indent level of the target line. Such reformatting by hand is tedious and error prone, but some [[text editor]]s and [[integrated development environment]]s (IDEs) have features to do it automatically. There are also problems when indented code is rendered unusable when posted on a forum or web page that removes whitespace, though this problem can be avoided where it is possible to enclose code in whitespace-preserving tags such as "<pre> ... </pre>" (for [[HTML]]), "[code]" ... "[/code]" (for [[bbcode]]), etc.
|