#133393 - 2005-02-07 09:53 AM
Re: SetOption('CaseSensitivity','on')
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
I think generally the guideline should be something like:
- Submitted UDFs may be written to assume that case sensitivity is "OFF" and need not advertise this as a requirement.
- Submitted UDFs which require case sensitivity to be "ON" may change the setting within the UDF, but only if the setting is guaranteed to revert to it's previous state on exit in all cases.
- Use of the case sensitive operator "==" to explicitly mark case sensitive comparisons is encouraged.
Having case sensitivity "ON" is such an unusual state that I think it is reasonable to require "ON" scripts to reset the state before calling UDFs where the coder wants the UDF to behave as case insensitive.
|
|
Top
|
|
|
|
#133399 - 2005-02-10 09:28 AM
Re: SetOption('CaseSensitivity','on')
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
This then leads back to my first question about "best practice". Do we convert case with LCase()/UCase() to be safe, save/set/restore CaseSensitivity, warn users that we ignore it, or just turn a blind eye to it?
I refer m'learned friend to my first reply, post#3, which preserves the status quo.
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|