PDA

Click to See Complete Forum and Search --> : VB.NET - Morse code, 1337, and rot-13 translator


bobabot1
Jul 14th, 2006, 10:54 AM
I'm currently making a small program that allows the user to input text, choose a radio button, press convert, and it will be translated from english to morse code, 1337, or rot-13. This was just a test project in making a string replacer because in the future, I would like to make a small traveler's dictionary from english to german or spanish.

Here's the code: Oops. The code was too long so I will make it an attachment.


I'm just looking for comments on how I could make it run better/less lines of code. Also, The morse code decrypter doesn't seem to like me. It's just giving me the regular code back and I can't figure it out.

bobabot1
Jul 14th, 2006, 11:15 AM
OH! I forgot to mention that Swamo got me started with the groundwork of the code. Thanks Swamo!

bobabot1
Jul 17th, 2006, 10:36 AM
Well, 5 views 0 comments. Does anyone want to comment on my code? I'm really just starting but I'd like some constructive criticism.

Al42
Jul 17th, 2006, 01:53 PM
Aside from the fact that, in Morse decrypt, you have both -- and -. decoded as "m", it seems to work. (I had to change it around a bit to test it in VB6.)

1) It's code and decode, not encrypt and decrypt. This is straight encoding, not encrypting. (Just a monor nit pick.)

2) You could put the output characters into an array and use the ASCII value of the input character to index into the array - it would be a bit faster. Of course that wouldn't work for decoding Morse.

bobabot1
Jul 17th, 2006, 02:45 PM
Oops. :D

I sorta thought so. I couldn't remember the correct words so I went with what made me think of the idea.

Ok. I'll probably try that in the later releases.

Thanks for the feedback!