|
Post by J7M on Aug 19, 2021 13:45:12 GMT -6
I have a string with several characters and I want to replace one of the characters. For example
"ABCD" -> "ABXD"
According the the manual ReplaceSubstr should do the job. I tried the following:
A$ = "ABCD"
ReplaceSubstr$(A$, "B", 2) print(A$)
' or ' B$ = ReplaceSubstr$(A$, "B", 2) ' print(B$) But I always get an error message:
ERROR:Expected string expression for argument ^Could not evaluate expression
Error on Line 3 in test.bas: Expected string expression for argument ^Could not evaluate expression
Would be great if someone has a working example for me.
|
|
|
Post by n00b on Aug 19, 2021 14:27:41 GMT -6
Your example works for me.
Make sure you are using the latest version.
If you are still having issues, let me know what OS you are on and whether it is 32 or 64 bit.
|
|
|
Post by J7M on Aug 20, 2021 3:51:45 GMT -6
I updated to 3.14 and now it's working as expected. Thank you.
|
|