Board index » delphi » Parameters Getting changed to ''?

Parameters Getting changed to ''?

Hello all,

I've stepped through the code of this function (I posted an example but
doesn't see to have made it through) and first, the compiler is resetting
the string parameters to '' (null string), then it appears to just skip
entire parts of code (see where I set my break point below) from the break
point is set forward...when I step through the code.

Any Ideas?
Thanks so much,
Lee

**************************************************************************
Function Instr(Const StartPOS, ReturnLength: Integer; strString, strSearch:
String): Integer;
  Var
  TempString, strToLook, strToSearch: String;
  intX: Integer;

Begin

   strToLook := strSearch;
   strToSearch := strString;

  If StartPOS > 0 Then            //I set a break point here.
      Begin
      TempString := Copy(strString, StartPOS, ReturnLength );
      intX := POS(strString, strSearch);
      Result := intX
      End
  Else
      Result := POS(strString, strSearch);
End;
****************************************************************************
*

 

Re:Parameters Getting changed to ''?


Uh, I got it.

Thanks anyway.

lee

Other Threads