Computer Science Canada array -> string |
Author: | Selfi [ Fri Jun 11, 2004 12:04 pm ] | ||
Post subject: | array -> string | ||
im trying to turn an array into a string, heres what i have so far, i just dont know how to put it into a string. in the program im coding i get the word from a file, which is why i have a get there. this is NOT the program that i am coding, i just need some help with an example, thanks.
|
Author: | aside [ Fri Jun 11, 2004 12:12 pm ] | ||
Post subject: | |||
i assume that you are trying to put each indivisual letter in an array back into a whole word?
this program will put word into an array and reverse the order they are in when they are put into newword. although you can do it another way. |
Author: | Selfi [ Fri Jun 11, 2004 12:25 pm ] |
Post subject: | |
thats the problem see, is that you need to declare the newword first to add to it, which is my dilemma |
Author: | Selfi [ Fri Jun 11, 2004 12:26 pm ] |
Post subject: | |
and your way prints them back in reverse lol |
Author: | Selfi [ Fri Jun 11, 2004 12:28 pm ] | ||
Post subject: | |||
this'll do it ![]()
|
Author: | naoki [ Fri Jun 25, 2004 4:18 pm ] |
Post subject: | |
of course, for efficiency reasons, you could put both in the same loop and assign newword as newword += word (i) letter (i) := word (i) |