Subj : Re: Warning question To : borland.public.cpp.borlandcpp From : DKat Date : Mon Feb 07 2005 04:36 pm "Danzer" wrote in message news:420509ff$1@newsgroups.borland.com... > dkat wrote: >> >> AnsiString TMainForm::CheckString(AnsiString String) >> { >> AnsiString TempString; >> int d = 0; >> >> if(String=="")return String; >> TempString = String; >> >> char* cp= new char[ TempString.Length() + 1 ]; >> strcpy( cp, TempString.c_str() ); >> for( int s=0;s<=TempString.Length();++s) >> if(cp[s] < '0' || cp[s] > '9') >> {TempString.Delete(s+1-d,1); ++d; } >> if(cp)delete cp; >> return TempString; >> } >> > > I copied this exact code into a project of mine that has a form named > MainForm. I got no warning message about the value assigned to d never > being used. BCB 6.0 build 10.166. > Well that is reassuring.... I think. Thanks a lot for the effort. DK .