Cut and paste this into owlet:
F.F=F TOF S.F:READF$:F%=F*LENF$:P.F$,F%:N.
D.F
Then right click on one of the F variables in the code and select "Change All Occurrences", then type X. The program now looks like this:
X.X=X TOF S.X:READF$:X%=X*LENF$:P.X$,X%:N.
D.X
I'd expect it only to change uses of the variable F, but it's also changed:
F. is FOR abbreviated
F$ and F% are also matched when not preceded by a keyword
F in D.F is really a string constant not the variable F in this program (though if it were read into a numeric variable it would be a the variable F so this one more forgivable)
It's also failed to match variable F when preceded by a keyword (TOF). I guess it assumes C-like tokenisation rules.
I can see this feature would be handy for golfing code if it actually worked, but if it can't be persuaded to understand BBC BASIC tokenisation rules then perhaps it would be better turned off in owlet. When I first tried it on a real example it looked like it had worked, but actually it had missed a use of the variable, and so broke the code.
Cut and paste this into owlet:
Then right click on one of the
Fvariables in the code and select "Change All Occurrences", then typeX. The program now looks like this:I'd expect it only to change uses of the variable
F, but it's also changed:F.isFORabbreviatedF$andF%are also matched when not preceded by a keywordFinD.Fis really a string constant not the variableFin this program (though if it were read into a numeric variable it would be a the variableFso this one more forgivable)It's also failed to match variable
Fwhen preceded by a keyword (TOF). I guess it assumes C-like tokenisation rules.I can see this feature would be handy for golfing code if it actually worked, but if it can't be persuaded to understand BBC BASIC tokenisation rules then perhaps it would be better turned off in owlet. When I first tried it on a real example it looked like it had worked, but actually it had missed a use of the variable, and so broke the code.