Why doesn't this work?

BlitzMax Forums/BlitzMax Beginners Area/Why doesn't this work?

po(Posted 2007) [#1]
Local num$="12345678"
Replace$(num$,"1","0")
Print num$


Shouldn't that code replace the 1 at the front with 0?


Grey Alien(Posted 2007) [#2]
Replace is a function that returns a strin. The way you've called it, the return result is not used.

Try this:

num = replace(num, "1", "0")


po(Posted 2007) [#3]
Ah, thanks.