Computer Science Canada Morse code to english |
Author: | chalcids [ Thu May 31, 2012 11:36 am ] |
Post subject: | Morse code to english |
What is the best way to convert Morse code to English? I tried a for loop but i get the error of to many characters but it converts it well but i don't like the error. Any help? |
Author: | Dreadnought [ Thu May 31, 2012 11:48 am ] |
Post subject: | Re: Morse code to english |
I'm not sure why you are getting an error for too many characters, you should be able to translate the Mores code letter by letter into English. (When I say a letter in Morse code, I mean a sequence of dots and dashes separated by a space equivalent to 3 dots) Also, the use of a for loop is questionable unless you know in advance how long the message will be. |
Author: | Amarylis [ Thu May 31, 2012 2:53 pm ] |
Post subject: | RE:Morse code to english |
I'm not entirely sure how morse code works, so my general suggestion would be: Make a that converts 1 "morse string" into a letter Define what the space between words would be (i.e. make it be a / or something) run it on a conditional loop translating it character by character then adding the character into a string, or just displaying the characters themselves |