FindString() is currently defined like this:
Code: Select all
Position = FindString(String$, StringToFind$, StartPosition)
Code: Select all
Position = FindString(String$, StringToFind$ [, StartPosition]) ;StartPosition = 1 if not specified
Code: Select all
Position = FindString(String$, StringToFind$, StartPosition)
Code: Select all
Position = FindString(String$, StringToFind$ [, StartPosition]) ;StartPosition = 1 if not specified
Code: Select all
Macro Instr (_source_, _search_, _p_=1)
FindString(_source_, _search_, _p_)
EndMacro
Code: Select all
Procedure fFindstring(string.s,stringtofind.s,startposition=1)
ProcedureReturn FindString(string,stringtofind,startposition)
EndProcedure
Doing a wrapper with a procedure will give you extra overhead, Little John’s version with a macro is more efficient.Suirad wrote:why dont you just wrap it in another procedure
If you require the 1, then you break all existing code. That's a lot of work. Maybe not all for PB, but for all of its users.Suirad wrote:how hard is it to add ", 1" to the end of a command?
why dont you just wrap it in another procedure if its that much of a hastle?
Code: Select all
onErrorGoto(?Fred)
No!PB wrote:Most apps don't use ,1 at all. Mine certainly don't! It depends on the app. The suggestion to drop it will break my sources just because you don't use it. Why is your code more important than mine? Use a simple macro and be done with it.