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

Username:   Password: 
 RegisterRegister   
 integer to string with an array as a value
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
x-ecutioner




PostPosted: Wed Nov 19, 2008 1:44 pm   Post subject: integer to string with an array as a value

hi,

im trying to convert an array from an integer to a string but it has a problem when i indicate which key in the array because it utilizes brackets. any ideas?
code:

%this is placed inside of a for statement
intstr (RLetters.whichletter(r))

thanks for any help possible.
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Wed Nov 19, 2008 3:42 pm   Post subject: RE:integer to string with an array as a value

Do you mean you are trying to convert an array of integers to an array of strings?

Also, post some code that can be placed in better context, it's hard to tell what the problem is from your description.
Insectoid




PostPosted: Wed Nov 19, 2008 4:49 pm   Post subject: RE:integer to string with an array as a value

don't you need to assign that conversion to a variable?

code:

for r: 1..x
    var  foo : int := intstr (RLetters.whichLetter(r))
end for
andrew.




PostPosted: Wed Nov 19, 2008 6:24 pm   Post subject: RE:integer to string with an array as a value

You want convert an array of integers to an array of strings? If so, it would be something like this:
code:
for i : 1..upper (integer_array)
    string_array (i) := intstr (integer_array (i))
end for


I believe that's how you would do it. I am not in Windows so I can't check.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: