Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!samsung!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!NORTHSTAR.DARTMOUTH.EDU!tobeye From: tobeye@NORTHSTAR.DARTMOUTH.EDU (Anthony Edwards) Newsgroups: comp.soft-sys.andrew Subject: ctext bug with Rename Identifier menu option Message-ID: <0bnG2DS1eVXq1FE5hF@northstar.dartmouth.edu> Date: 28 Feb 91 15:23:59 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 33 I just wrote this piece of code: for (runner= 0; buff[runner]; runner++) { if (buff[runner]=='"') { /* double quoted string token */ i++; while (buff[i] && buff[i] !='"') i++; } } I pasted the underlined code block into place (note block starts just after the '{' of the if() line). I need the variable 'runner' in place of the 'i' in this block, so I selected Rename Identifier from the C-text menu card. When I'm done, I notice that the very last 'i' was not changed: for (runner= 0; buff[runner]; runner++) { if (buff[runner]=='"') { /* double quoted string token */ runner++; while (buff[runner] && buff[runner] !='"') i++; } } I've actually been bitten by this bug before, having assumed that all the identifiers had been changed as implied. This is just a bug report for your information and for the Andrew community to watch out for. - Anthony