Basic Morse code support. https://en.wikipedia.org/wiki/Morse_code
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=5), | private, | parameter | :: | morse_table(36) | = | ['.- ', '-... ', '-.-. ', '-.. ', '. ', '..-. ', '--. ', '.... ', '.. ', '.--- ', '-.- ', '.-.. ', '-- ', '-. ', '--- ', '.--. ', '--.- ', '.-. ', '... ', '- ', '..- ', '...- ', '.-- ', '-..- ', '-.-- ', '--.. ', '-----', '.----', '..---', '...--', '....-', '.....', '-....', '--...', '---..', '----.'] |
This function receives a string and returns its Morse code translation. The input string can contain only alphabetic characters in upper or lower case, digits 0..9 and spaces. All other characters will be considered as spaces. Characters inside words are separated by one space, and words by two spaces.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string |
Adds on the specified track a Morse code translation of the string, starting at time t1. The frequency f must correspond to a high tone, for example 880 Hz.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tape_recorder), | intent(inout) | :: | tape | |||
integer, | intent(in) | :: | track | |||
real(kind=wp), | intent(in) | :: | t1 | |||
real(kind=wp), | intent(in) | :: | f | |||
real(kind=wp), | intent(in) | :: | Amp | |||
character(len=*), | intent(in) | :: | string |