More Related Content
More from Hideki MACHIDA (8)
コーディングスタイル入門~人に伝えるプログラミング~
- 1. コーディングスタイル
入門
~人に伝えるプログラミング~
MACHIDA ‘matchy’ Hideki
@matchy2
- 4. 提 供
信州の良いもの全国へ!
八光興発アズシエル事業部
アノト・マクセル
- 9. K&Rスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error) {
do_correct();
} else {
do_usual();
}
}
}
※インデントは4桁のスペース
- 10. オールマンスタイル
int main()
{
while (x == y)
{
if (has_error)
{
do_correct();
}
else
{
do_usual();
}
}
※インデントは
} 4桁のスペース
- 11. オールマンスタイル
int main()
{
while (x == y)
{
if (has_error)
{
do_correct();
}
else
{
do_usual();
}
}
※インデントは
} 4桁のスペース
- 12. BSDスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error) {
do_correct();
} else {
do_usual();
}
}
}
※インデントは4桁の水平タブ(ソフトタブ)
- 13. BSDスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error) {
do_correct();
} else {
do_usual();
}
}
}
※インデントは4桁の水平タブ(ソフトタブ)
- 14. K&Rスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error) {
do_correct();
} else {
do_usual();
}
}
}
※インデントは4桁のスペース
- 15. K&Rスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error) {
do_correct();
} else {
do_usual();
}
}
}
※インデントは4桁のスペース
- 16. BSDスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error) {
do_correct();
} else {
do_usual();
}
}
}
※インデントは4桁の水平タブ(ソフトタブ)
- 17. GNUスタイル
int main()
{
while (x == y)
{
if (has_error)
{
do_correct ();
}
else
{
do_usual ();
}
}
※インデントは
} 2桁のスペース
- 18. GNUスタイル
int main()
{
while (x == y)
{
if (has_error)
{
do_correct ();
}
else
{
do_usual ();
}
}
※インデントは
} 2桁のスペース
- 19. ホワイトスミススタイル
int main()
{
while (x == y)
{
if (has_error)
{
do_correct();
}
else
{
do_usual();
}
} ※インデントは
} 4桁のスペース
- 20. ホワイトスミススタイル
int main()
{
while (x == y)
{
if (has_error)
{
do_correct();
}
else
{
do_usual();
}
} ※インデントは
} 4桁のスペース
- 21. Bannerスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error) {
do_correct();
}
else {
do_usual();
}
}
}
※インデントは4桁のスペース
- 22. Bannerスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error) {
do_correct();
}
else {
do_usual();
}
}
}
※インデントは4桁のスペース
- 23. Bannerスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error) {
do_correct();
}
else {
do_usual();
}
}
}
※インデントは4桁のスペース
- 24. Bannerスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error) {
do_correct();
}
else {
do_usual();
}
}
}
※インデントは4桁のスペース
- 25. Bannerスタイル (HTML)
<table>
<tr>
<td> lots of stuff...
more stuff
</td>
<td> alternate for short lines </td>
<td> etc. </td>
</tr>
</table>
- 26. Bannerスタイル (HTML)
<table>
<tr>
<td> lots of stuff...
more stuff
</td>
<td> alternate for short lines </td>
<td> etc. </td>
</tr>
</table>
- 27. Linuxスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error)
do_correct();
else
do_usual();
} ※インデントは
}
8桁の水平タブ
(ハードタブ)
- 28. Linuxスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error)
do_correct();
else
do_usual();
} ※インデントは
}
8桁の水平タブ
(ハードタブ)
- 29. Linuxスタイル
int main()
{
while (x == y) {
something();
anything();
if (has_error)
do_correct();
else
do_usual();
} ※インデントは
}
8桁の水平タブ
(ハードタブ)