Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 String to char array conversion help.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ynotpeace




PostPosted: Mon Feb 22, 2010 6:04 pm   Post subject: 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 ^.^
Sponsor
Sponsor
Sponsor
sponsor
ynotpeace




PostPosted: Mon Feb 22, 2010 6:44 pm   Post subject: Re: String to char array conversion help.

Pls Respond soon I'm trying to study for CCC tomorrow T.T
Turing_Gamer




PostPosted: Mon Feb 22, 2010 6:58 pm   Post subject: 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




PostPosted: Mon Feb 22, 2010 7:03 pm   Post subject: 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




PostPosted: Mon Feb 22, 2010 7:04 pm   Post subject: Re: String to char array conversion help.

is there a command that can get to a specific char in a string???
TheGuardian001




PostPosted: Mon Feb 22, 2010 7:06 pm   Post subject: 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:

Turing:

var s : string := "hello"

put s(3)


will output "l", since it's the third character in "hello"
ynotpeace




PostPosted: Mon Feb 22, 2010 7:13 pm   Post subject: Re: String to char array conversion help.

Thank you so much guys!!!
T.T my savoir
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: