By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,644 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,644 IT Pros & Developers. It's quick & easy.

Converting decimal to ASCII in array

P: 5

I've got probably a basic problem, I need to convert decimal numbers from an array to their equivalent ASCII to another array. So far I've used this code:

For index = 0 To 29
Header(index) = Asc(HeaderInt(index))
Next index
For index = 0 To ((Len(BinaryMessage) - 232) / 7)
Message(index) = Asc(MessageInt(index))
Next index

And I get the output from Header() as 535252525252... etc. It is always an alternation between 52 and 53 but its not always the same.
I get the output from the Message() as 1423 all the time.

I've never been able to get my Asc function to work properly, so if there's something basic which I'm doing wrong can anyone point it out to me?

__________________________________________________ ____

Never mind, I worked it out. I forgot to convert dec to ASCII you have to use Chr not Asc. Another silly mistake =)
Dec 7 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.