29-01-2021, 11:06 AM
Hello,
6-5-4 says "The loop-counter shall be modified by one of: --, ++, - = n, or + = n; where n remains constant for the duration of the loop"
Should this code below raise 6-5-4?
int main() {
int k = 8;
for (int j = 0; j < 10; j += k + 3) {
}
}
If 'n' concerns variable only, I would say 'Yes'.
If 'n' concerns expressions, I would say 'No'.
What do you think?
Thanks in advance for your help.
Nadège
6-5-4 says "The loop-counter shall be modified by one of: --, ++, - = n, or + = n; where n remains constant for the duration of the loop"
Should this code below raise 6-5-4?
int main() {
int k = 8;
for (int j = 0; j < 10; j += k + 3) {
}
}
If 'n' concerns variable only, I would say 'Yes'.
If 'n' concerns expressions, I would say 'No'.
What do you think?
Thanks in advance for your help.
Nadège