May I ask the group the following: (Again, alas , from K&R)
This is part of a function:
while ( ( array1[i++] = array2 [k++]) != '\0' ); /* etc etc */
Is this the order that this is evaluated?
-> array2[k] is assigned to array1[i] ....???? the reason being it is
within parenthesis ???
-> array1[i] is tested for non-equality to '\0'
-> if TRUE array1[i] is incremented to array1[i+1]
-> if TRUE array2[k] is incremented to to array2[k+1]
-> if FALSE exit loop and neither k nor i is incrmented.
Thank you for your indulgence....a nd also thank you all for making this
so pleasurable.
This is part of a function:
while ( ( array1[i++] = array2 [k++]) != '\0' ); /* etc etc */
Is this the order that this is evaluated?
-> array2[k] is assigned to array1[i] ....???? the reason being it is
within parenthesis ???
-> array1[i] is tested for non-equality to '\0'
-> if TRUE array1[i] is incremented to array1[i+1]
-> if TRUE array2[k] is incremented to to array2[k+1]
-> if FALSE exit loop and neither k nor i is incrmented.
Thank you for your indulgence....a nd also thank you all for making this
so pleasurable.
Comment