well, the easiest way to find out whats fastest is to write a test app (all of 5 lines of code).. looping 1 billion times (which is what it takes to get a reasonable answer), length(str)=0 is 3 times slower than str=''.
not only that, but -you've doubled the number of characters you need to read -youve added an extra level of brackets -and now if someone else goes to read it, they'll wonder why you've done it that way.. and now myles has given the asm too :-) --- Neven MacEwan <[EMAIL PROTECTED]> wrote: > Hi All > > Whats the fastest way to test for an empty string > I just get the feeling that String = '' is not good practice > > Regards Neven > N.K. MacEwan B.E. E&E > Ph 649 621 0001 > Fax 649 621 0400 > [EMAIL PROTECTED] > > --------------------------------------------------------------------------- > New Zealand Delphi Users group - Delphi List - > [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/