From: fredex AT fcshome DOT stoneham DOT ma DOT us Message-Id: <199606151114.HAA09131@fcshome.stoneham.ma.us> Subject: Re: Is post-increment a pre-increment? To: grendel AT ananke DOT amu DOT edu DOT pl (Mark Habersack) Date: Sat, 15 Jun 1996 07:14:57 -0400 (EDT) Cc: djgpp AT delorie DOT com In-Reply-To: from "Mark Habersack" at Jun 12, 96 09:39:52 pm Content-Type: text Content-Length: 1234 Thinking furiously, Mark Habersack wrote: > default: > len += CharWidth(*walker++, curFont); // Here, the walker variable has > // been everytime incremented > // TWICE, not ONCE as it was > // meant to be - what is wrong? > } > > Later on I changed the offending line to > len += CharWidth(*walker, curFont); > walker++; > and everything worked just fine. Where lies the error - is it my ignorance or > a bug or side effect? Is CharWidth a macro? I so, it's probably referring to it's first parameter two (or more) times, thereby causing the postincrement to happen multiple times. Fred -- ------------------------------------------------------------------------------- .---- Fred Smith / Office: fred AT computrition DOT com ( /__ ,__. __ __ / __ : / 508-663-2524 / / / /__) / / /__) .+' Home: fredex AT fcshome DOT stoneham DOT ma DOT us / / (__ (___ (__(_ (___ / :__ 617-438-5471 -------------------------------- Jude 1:24,25 ---------------------------------