[DUG] Why use a set when a string will work OK (and less code )?
Alister Christie
alister at salespartner.co.nz
Mon May 14 09:42:26 NZST 2007
I believe the refactoring engine has problems with "with" statements.
Which is probably in itself enough of a reason for me to stop using them.
Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington
Ross Levis wrote:
> I tend to do this as well when it is obviously quite safe and saves a lot of
> typing. The problem is debugging. The debugger (in D7 anyway) will not
> resolve the variables unless they are fully qualified on the line. I have
> always found this very annoying. Code Insight resolves everything fine in
> the IDE, just the debugger is the problem.
>
> Ross.
>
> -----Original Message-----
> From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
> Behalf Of John Bird
> Sent: Friday, 11 May 2007 19:16
> To: 'NZ Borland Developers Group - Delphi List'
> Subject: RE: [DUG] Why use a set when a string will work OK (and less code
> )?
>
> I thought using "with" with a single argument, not nested, would be a clean
> and elegant practice, like:
>
> with stringgrid1 do
> begin
> cells[5,tcgmax]:=uline;
> cells[6,tcgmax]:=uline;
> nextstrgrdMaTC;
> cells[3,tcgmax]:='Totals';
> cells[5,tcgmax]:=inttostr(trntotu);
> cells[6,tcgmax]:=xfformat('deitos','',trntot,10,2);
> end;
>
> It doesn't confuse the Code Insight either (something Malcolm Groves said is
> a disadvantage of using it....)
>
> John
> h Subject: unsubscribe
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>
>
>
More information about the Delphi
mailing list