MID$ ISSUE
BlitzPlus Forums/BlitzPlus Beginners Area/MID$ ISSUE
| ||
Hello Why does the instruction: Mid$(H$,J-1,1)=Mid$(H$,J,1): not work? Is that a bug in BB? |
| ||
It isn't a bug - you just can't use Mid() to replace part of a string. |
| ||
Wow!! That syntax works in some other versions of basic. I'll have to rewrite it. |
| ||
H$ = Replace$(H$, Mid$(H$,j-1,1), Mid$(H$,j,1)) would do the job. |
| ||
If should be expressed like this:H$ = Left(H$, J - 1) + Mid(H$, J + 1, 1) + Mid(H$, J + 1) |
| ||
I never knew there was a replace command. |