Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2006 Sep : Looks weird, but is it "wrong"?

www.cryer.info
Managed Newsgroup Archive

Looks weird, but is it "wrong"?

Subject:Looks weird, but is it "wrong"?
Posted by:"Clay Shannon" (blac..@redgreen.com)
Date:Wed, 27 Sep 2006 18:03:23

Anything wrong with this? (this is at the end of a function that returns an
Integer)


. . .
  sInterimResult := cdsGenericQuery.Fields[0].AsString;
  if TryStrToInt(sInterimResult, Result) then
    Result := Result
  else
    Result := 0;

--or is this better:

   . . .
  sInterimResult := cdsGenericQuery.Fields[0].AsString;
  if TryStrToInt(sInterimResult, iInterimResult) then
    Result := iInterimResult
  else
    Result := 0;

--
Download my historical nonfiction and/or satirical (etc.) fiction books free
from here:
http://www.lulu.com/blackbirdcraven

Replies:

www.cryer.info
Managed Newsgroup Archive