Hi
The function mid$(a$,n)=c$ doesn't exist.
Once upon a time I wrote a 'user-defined' function.
Maybe it can be useful for you:
midassign$(a$,n,b$) is almost equivalent to: mid$()=...
a$=midassign$("abcdefg",3,"xxx")
yields a$="abxxxfg"
a$=midassign$("abcdefg",5,"xxx")
yields a$="abcdxxx"
a$=midassign$("abcdefg",7,"xxx")
yields a$="abcdefxxx"
sub midassign$(zz$,z,zy$)
zz=len(zz$)
zy=len(zy$)
zx$=zz$
if zz>=z and zy>0 and z>0
zz$=left$(zz$,z-1)+zy$
if (z+zy-1)<zz
zz$=zz$+mid$(zx$,z+zy)
endif
midassign$=zz$
endif
end sub.
HTH
G.
This and other 'user-defind functions' can be found in my yBasic
reference listdb in the Files section
BTW: There is no need for line numbers. (unless you're using the
scratchpad ).