You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The second-to-last paragraph in the C Style Guide Naming Conventions refers to missing examples of why loop variables shouldn't always be one letter. An adaptation of the Python examples might be:
No:
for {int x = 0; x < data_len; x++) {
// ...
// 10 lines of code
// ...
float y = m / 60;
// ...
// 50 lines of code
// ...
data[x] += y
}
Yes:
for {int student_index = 0; x < data_len; x++) {
// ...
// 10 lines of code
// ...
float hours_worked = m / 60;
// ...
// 50 lines of code
// ...
data[student_index] += hours_worked;
}
The text was updated successfully, but these errors were encountered:
Thanks, I've added the missing example (largely the one above, with some minor tweaks). I've also reformatted that section, as it was hard to tell that the section includes a list of (not entirely related) naming conventions.
The second-to-last paragraph in the C Style Guide Naming Conventions refers to missing examples of why loop variables shouldn't always be one letter. An adaptation of the Python examples might be:
No:
Yes:
The text was updated successfully, but these errors were encountered: