home *** CD-ROM | disk | FTP | other *** search
- (*
- THIS PROGRAM IS COPYRIGHT 1989 NILS MCCARTHY
- ALL RIGHTS RESERVED INCLUFING THAT OF MODIFYING
- THIS PROGRAM WITHOUT THE AUTHOR'S CONSENT.
-
- THIS PROGRAM MAY BE FREELY DISTRIBUTABLE PROVIDED
- THIS HEADER IS KEPT WITH IT.
-
- Please send any and all comments to mtymp01@ux.acss.umn.edu,
- if user mtymp01 unknown, please send to mccarthy@ux.acss.umn.edu
- with subject 'To Nils', because that isn't my account.
-
- *)
- program genmorse(input,output);
- var
- let : char;
- begin
- repeat
- read(let);
- case let of
- 'a' : write('.- ');
- 'b' : write('-... ');
- 'c' : write('-.-. ');
- 'd' : write('-..');
- 'e' : write('. ');
- 'f' : write('..-.');
- 'g' : write('--.');
- 'h' : write('....');
- 'i' : write('..');
- 'j' : write('.---');
- 'k' : write('-.-');
- 'l' : write('.-..');
- 'm' : write('--');
- 'n' : write('-.');
- 'o' : write('---');
- 'p' : write('.--.');
- 'q' : write('--.-');
- 'r' : write('.-.');
- 's' : write('...');
- 't' : write('-');
- 'u' : write('.--');
- 'v' : write('...-');
- 'w' : write('.--');
- 'x' : write('-..-');
- 'y' : write('-.--');
- 'z' : write('--..');
- '1' : write('.----');
- '2' : write('..---');
- '3' : write('...--');
- '4' : write('....-');
- '5' : write('.....');
- '6' : write('-....');
- '7' : write('--...');
- '8' : write('---..');
- '9' : write('----.');
- '0' : write('-----');
- '.' : write('.-.-.-');
- ',' : write('--..--');
- '?' : write('..--..');
- ':' : write('---...');
- ';' : write('-.-.-.');
- else
- write(chr(10));
- end;
- write(' ');
- until EOF(input);
- writeln('.-.-.')
- end.
-