
-----------------------------------
ynotpeace
Mon Feb 22, 2010 6:04 pm

String to char array conversion help.
-----------------------------------
What is it you are trying to achieve?
If I get a string is there a possible way to convert that into a char array???

Thanks in advance ^.^

-----------------------------------
ynotpeace
Mon Feb 22, 2010 6:44 pm

Re: String to char array conversion help.
-----------------------------------
Pls Respond soon I'm trying to study for CCC tomorrow T.T

-----------------------------------
Turing_Gamer
Mon Feb 22, 2010 6:58 pm

Re: String to char array conversion help.
-----------------------------------
There are only a few commands that can convert data:
 - intstr
 - strint
 - realint (One of
 - intreal  the two)
 - etc.

I think I know what you are trying to make... Word Scrambler
At least it sounds like it since you need to make the string convert into a char array.
Can't help you, in this case but this post may help the people who are helping you.

-----------------------------------
ynotpeace
Mon Feb 22, 2010 7:03 pm

Re: String to char array conversion help.
-----------------------------------
I was thinking more of a for loop then storing each character of the string to a char array.
is that possible???

-----------------------------------
ynotpeace
Mon Feb 22, 2010 7:04 pm

Re: String to char array conversion help.
-----------------------------------
is there a command that can get to a specific char in a string???

-----------------------------------
TheGuardian001
Mon Feb 22, 2010 7:06 pm

Re: String to char array conversion help.
-----------------------------------
As far as I know, Turing doesn't have any built in command to convert from one to the other (but I could be wrong, checking the help docs would be worth a shot,) so I think you'd have to do it the old fashioned way.

Basically, use a for loop to go through each character in the string and manually store it into your array. 

in case you don't know, You can access a specific character in a string by calling the name of the string with the index of the character you want in brackets, IE:


var s : string := "hello"

put s(3)


will output "l", since it's the third character in "hello"

-----------------------------------
ynotpeace
Mon Feb 22, 2010 7:13 pm

Re: String to char array conversion help.
-----------------------------------
Thank you so much guys!!!
T.T my savoir
