> guess from a strict computer science POV, that it is not a good idea to do a
> case select on a string - its not efficient & matching strings gets dodgy if
> you need to consider case & spaces etc.
>
> My approach is to drop the strings & use a enum type...ie:
>
> type
> TResponseTypes = ( rtHello, rtGoodBye );
I would hope that everyone would always avoid string comparison unless strictly
necessary as it certainly isn't very processor friendly - although in this case a
comparison using comparemem might be faster than using normal string
comparisons since an exact equality or inequality is all that's needed rather than
Less than or greater than... Of course the gain in this will be drastically offset by
how similar the strings are since a true string comparison short circuits at first
difference...
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
- Re: [DUG]: VB Like Case statement Matt Powell
- Re: [DUG]: VB Like Case statement Aaron Scott-Boddendijk
- RE: [DUG]: VB Like Case statement Dennis Chuah
- Re: [DUG]: VB Like Case statement Aaron Scott-Boddendijk
- RE: [DUG]: VB Like Case statement Dennis Chuah
- RE: [DUG]: VB Like Case statement McKenzie, Paul
- Re: [DUG]: VB Like Case statement Aaron Scott-Boddendijk
- Re: [DUG]: VB Like Case statement Aaron Scott-Boddendijk
- RE: [DUG]: VB Like Case statement Grant Black
- Re: [DUG]: VB Like Case statement Nic Wise
- RE: [DUG]: VB Like Case statement Aaron Scott-Boddendijk
- RE: [DUG]: VB Like Case statement David O'Brien
- RE: [DUG]: VB Like Case statement Carl Reynolds
- RE: [DUG]: VB Like Case statement Carl Reynolds
- RE: [DUG]: VB Like Case statement Stacey Verner
- Re: [DUG]: VB Like Case statement Neven MacEwan
- Re: [DUG]: VB Like Case statement Aaron Scott-Boddendijk
- [DUG]: BDE 5.11 Kerry Sainsbury
- Re: [DUG]: VB Like Case statement Neven MacEwan
- Re: [DUG]: VB Like Case statement Aaron Scott-Boddendijk
- RE: [DUG]: VB Like Case statement Myles Penlington
