翻訳と辞書
Words near each other
・ Indemnity Act, 1977
・ Indemnity Act, Bangladesh
・ Indemnity and Oblivion Act
・ Indemnity Only
・ Inden
・ Inden, Switzerland
・ Indene
・ Indeni (company)
・ Indeni FC
・ Indenolol
・ Indenone
・ Indenor
・ Indent
・ Indent (album)
・ Indent (Unix)
Indent style
・ Indentation
・ Indentation (typesetting)
・ Indentation force-deflection
・ Indentation hardness
・ Indented Head, Victoria
・ Indenter tectonics
・ Indenture
・ Indentured servant
・ Indentured servitude in Pennsylvania
・ Indentured servitude in the Americas
・ Indentured servitude in Virginia
・ Indenyl effect
・ Indeo
・ Indeogwon Station


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Indent style : ウィキペディア英語版
Indent style

In computer programming, an indent style is a convention governing the indentation of blocks of code to convey the program's structure. This article largely addresses the free-form languages, such as C programming language and its descendants, but can be (and frequently is) applied to most other programming languages (especially those in the curly bracket family), where whitespace is otherwise insignificant. Indent style is just one aspect of programming style.
Indentation is not a requirement of most programming languages, where it is used as secondary notation. Rather, programmers indent to better convey the structure of their programs to human readers. In particular, indentation is used to show the relationship between control flow constructs such as conditions or loops and code contained within and outside them. However, some programming languages (such as Python and occam) use the indentation to determine the structure instead of using braces or keywords; this is known as the off-side rule, and in these languages indentation is meaningful to the compiler, not just a matter of style.
This article uses "brackets" to refer to what are known as "parentheses" in American English, and "braces" to refer to what are known as "curly brackets" in American English.
== Placement of braces ==

The main difference between indent styles lies in the placement of the
braces of the compound statement () that often follows
a control statement (if, while,
for...). The table below shows this placement for all the
styles discussed in this article. Note that, for consistency, the indent
depth has been kept constant at 4 spaces, irrespective of the preferred
indent depth of each style.

| Allman
|-
| style="padding: 0 4px" |
while (x == y)


| GNU
|-
| style="padding: 0 4px" |
while (x == y)


| Whitesmiths
|-
| style="padding: 0 4px" |
while (x == y)

| Horstmann
|-
| style="padding: 0 4px" |
while (x == y)

| Pico
|-
| style="padding: 0 4px" |
while (x == y)

| Ratliff
|-
| style="padding: 0 4px" |
while (x == y)

| Lisp
|}

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Indent style」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.