Is it normal ??

Code: Select all
Debug FindString("a", "A", #PB_String_NoCase)
I have try v5.22 and 5.30 it's the same thingResult 0
If i remove #PB_String_NoCase that's works
Good day
Code: Select all
Debug FindString("a", "A", #PB_String_NoCase)
I have try v5.22 and 5.30 it's the same thingResult 0
Code: Select all
Debug FindString("a", "A",1, #PB_String_NoCase)
Well, in KCC's case #PB_String_NoCase (= 1) is the start position. The parameter "isn't specified" if something like FindString("a","a") is used.blueb wrote:The help file states: ' If this parameter isn't specified, the whole string is searched. '
KCC's results show that this is not the case.
Code: Select all
Debug FindString("a","A",,#PB_String_NoCase)
I doubt if that will solve anything. If you take PeekS for exampleFred wrote:May be a solution would be to change the constant values to negative one, so we could introduce a runtime debugger check to check this.
Length can both be positive or negative (-1).PeekS(*MemoryBuffer [, Length [, Format]])
Yes and not only in this case ... no special function ready at present ... but I often think, why is this Parameter at the end of 3 optional parameters, when it is the most important and has to be the first while the other parameters are not touched anyway ... you often have to look up what the default parameters are to fill them in, when you only need the last one changed.PB wrote:But if anything: maybe swap the start position and mode flags
True and an important aspect.skywalk wrote:Changing the order of parameters breaks lots of code.
I prefer the blank optional parameters request similar to netmaestro.