Strings

BlitzMax Forums/BlitzMax Beginners Area/Strings

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

It doesn't really seem to be documented anywhere, but apparently you can access strings like this?

A$ = StringName$[0]

To get the first character in the string.

But this does not work!

Test$ = "Blah"
Test[0] = "b"
Print Test$

I get the error "Expression must be a variable".

This seems inconsistent to me. Why do strings seem to be some special case array which I can't write to? I even tried writing ints to it in case attempting to write the string was the issue, but no dice. I wanted an easy way to replace a character at a certain position in a string.