View Single Post
Old 12-01-2006, 01:05 PM   #10 (permalink)
n0nsensical
Junkie
 
Location: San Francisco
Quote:
Originally Posted by Rekna
if this is a homework question then the school needs to find a new teacher. Using pre and post increment operators like that is very bad form. The only exception would be if the professor was trying to show that such a statement is bad form. Pre and post increment operators should only be used in simple statements to avoid obscure equations like above. Such an equation is a nightmare for debugging and code maintenance.
Yes let this be a lesson... instead of writing stupid crazy expressions that you need the C standard in front of you to figure out, write TOTALLY UNAMBIGUOUS READABLE CODE and then you don't have to WORRY about it. This isn't PERL. But that goes for Perl too! And this problem could still be useful for figuring out other programmers' totally ambiguous unreadable code...
n0nsensical is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46