Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cuae2!ihnp4!inuxc!iuvax!ndmath!dean From: dean@ndmath.UUCP Newsgroups: comp.lang.c Subject: induction variable optimization Message-ID: <182@ndmath.UUCP> Date: Sun, 1-Feb-87 16:32:17 EST Article-I.D.: ndmath.182 Posted: Sun Feb 1 16:32:17 1987 Date-Received: Mon, 2-Feb-87 03:52:32 EST Organization: Math. Dept., Univ. of Notre Dame Lines: 14 Keywords: does this work? In a recent Newsletter from Microsoft in Byte, the following is given as an example of *induction variable optimization* : for(i=0;i<10;++i) j += i*7; evaluates to: for(i=0;i<70;i += 7) j += i; Now, I may not understand what "evaluates to" means here, but it seems to me that these statements are not equivalent, and following code which depends on the value of i may not work correctly. Am I misunderstanding something? Dean Alvis ( ...!ndmath!dean)