BBC BASIC for Windows
Programming >> Libraries >> How to use FNfindreplace
http://bb4w.conforums.com/index.cgi?board=libraries&action=display&num=1387584557

How to use FNfindreplace
Post by yshua on Mar 15th, 2012, 01:06am

Dear Richard:
After the, "INSTALL @lib$+"STRINGLIB.BBC"" line, the following lines,
text$ = "The quick brown fox"
num% = FNfindreplace(text$, "brown", "silver", 0)
PRINT text$,
gave the following error,
"NO SUCH FN/PROC".

am still learning the BBC BASIC ropes, without many programming examples of how to use PROC's and FN's with libraries....

Please avoid stressing over such a minor question,
Yshua smiley
Re: How to use FNfindreplace
Post by admin on Mar 15th, 2012, 09:04am

on Mar 15th, 2012, 01:06am, yshua wrote:
Code:
        num% = FNfindreplace(text$, "brown", "silver", 0) 

gave the following error "NO SUCH FN/PROC".

The function name includes an underscore:

FN_findreplace()

Although it's not a universal rule, PROC and FN names in libraries frequently begin with an underscore to reduce the likelihood of 'clashing' with a user function.

Richard.