C Tutorial/Language/Convention — различия между версиями
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
|
(нет различий)
|
Версия 17:21, 25 мая 2010
Clarity
<source lang="cpp">/* poor programming practice */
temp = box_x1; box_x1 = box_x2; box_x2 = temp; temp = box_y1; box_y1 = box_y2; box_y2 = temp;</source>
Indentation and Code Format
<source lang="cpp">while (! done) {
printf("Processing\n"); next_entry(); } if (total <= 0) { printf("You owe nothing\n"); total = 0; } else { printf("You owe %d dollars\n", total); all_totals = all_totals + total; }</source>