I
Ian Collins
Why would you want a signed loop index for a zero to unsigned range?jacob said:Because that int is used in many other contexts later, for instance
comparing it with other integers.
int len = strlen(str);
for (i=0; i<len; i++) {
/// etc
}
I may sound pedantic, but keeping signed and unsigned quantities apart
avoids nasty bugs.