hcl-bot
February 2, 2006, 12:09pm
1
seems @Contains has a bug in R6.5.5 (Nov. 30, 2005):
If you want to determine whether @Newline or @Char (0) is stored within a string, @Contains returns true, if the string contains ascii characters above chr(127).
e.g.
Subject: Bug in R6.5.5 with @Contains
Michael, I can duplicate your bug on 6.5.5. Version 7.0 is ok.
(of course, this isn’t the proper way to report bugs to Lotus, but at least we can ask other customers to duplicate)
Subject: Bug in @Contains
This is not fixed in 7.0.2
@Contains (s1 ; s2) returns wrong results under certain conditions e.g.:
s1 and s2 beginning with the same characters
s1 and s2 containing wraps
s1 containing a special character
EXAMPLE:
s1 := {ab
ä};
s2 := {a
c};
@If (@Contains (s1 ; s2) ; @Prompt ([ok] ; “Test” ; “containing”) ; @Prompt ([ok] ; “Test” ; “not containing”)) ;
Test it! It is crazy!
A use case could be the scan of an postal address for a name. Finding that bug took me much time. In Notes R5 this code worked correctly.
So you have to avoid @Contains in some cases. Use @Right or @Left instead which seem to work better, e.g.
not @Contains (s1 ; s2);
but @Right (s1 + “~”; s2) != “”
greatings!
Bert