I'm currently experimenting with string manipulation in blitz. I was wondering, let's say that I have a string with a number in front of it (eg: 3say, 4must). I can parse out the number using left$(), but how do I change the string to a value? Thanks!
how to convert text to value?
Blitz3D Forums/Blitz3D Beginners Area/how to convert text to value? heh! I thought int was only for numbers! but anyone, thanks so much, gfk!
You don't actually need the Int() - B% = A$ will work just the same. However, using Int() will keep your code more readable.
:) Thanks for clarifying things for me. cheers
Use different variables to convert from string to int. A and B have already been defined as strings when you declared them with a$="003" and b$="005". Change the code to c=Int(a$) and d=Int(b$) and e=c+d and it works fine.
Aaah!
I knew it would be an easy fix! :)
The simplest things can be soooo hard to find!
Thanks!
I knew it would be an easy fix! :)
The simplest things can be soooo hard to find!
Thanks!