funky little program - word to morse converter!

This is a discussion on funky little program - word to morse converter! within the A Brief History of Cprogramming.com forums, part of the Community Boards category; The attached zip contains the source and the executable to a program I wrote a few minutes ago. It converts ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220

    funky little program - word to morse converter!

    The attached zip contains the source and the executable to a program I wrote a few minutes ago.

    It converts the inputted string (badly) into morse code and plays(on the pc speaker) and prints the result.

    note:
    this version does not like spaces or symbols
    123hello is okay
    123 hello is not okay
    123-hello is not okay either

    maybe someone can improve it so it CAN accept spaces and symbols (a conversion table is included in the source).

    oh and goddamn...capital letters don't work. I'll have to fix that.

    compiling has only been tested in DJGPP so it may not work with your compiler
    Attached Files Attached Files
    Last edited by Brian; 01-18-2002 at 11:42 AM.

  2. #2
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    Code:
    /*
    A  .-          N  -.          1  .----       .  .-.-.-
    B  -...        O  ---         2  ..---       ,  --..--
    C  -.-.        P  .--.        3  ...--       ?  ..--..
    D  -..         Q  --.-        4  ....-       (  -.--.
    E  .           R  .-.         5  .....       )  -.--.-
    F  ..-.        S  ...         6  -....       -  -....-
    G  --.         T  -           7  --...       "  .-..-.
    H  ....        U  ..-         8  ---..       _  ..--.-
    I  ..          V  ...-        9  ----.       '  .----.
    J  .---        W  .--         0  -----       :  ---...
    K  -.-         X  -..-        /  -..-.       ;  -.-.-.
    L  .-..        Y  -.--        +  .-.-.       $  ...-..-
    M  --          Z  --..        =  -...-
    */

  3. #3
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    I made one that will go both ways. Works fine. Morse doesn't have any capital letters so I wouldn't worry about that.

  4. #4
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    showoff
    Originally posted by taylorguitarman
    I made one that will go both ways.

  5. #5
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    I was bored this summer at work and I wanted to sent large text messages to friends of mine. And get back at a particular one for doing the same thing to me.
    The decoder is simple once you have the encoder.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 10
    Last Post: 11-18-2008, 10:52 PM
  2. help me out Unrgent wit a cross word program
    By rags in forum C Programming
    Replies: 4
    Last Post: 05-14-2008, 11:12 AM
  3. Problem with my morse code program
    By justin87 in forum C++ Programming
    Replies: 1
    Last Post: 10-21-2007, 05:23 PM
  4. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  5. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21