Anonymous user
Morse code: Difference between revisions
m
→{{header|bash}}
No edit summary |
|||
Line 440:
alpha2morse() {
local -A alpha_assoc=( [A]='.-' [B]='-...' [C]='-.-.' [D]='-..' [E]='.' \
[F]='..-.' [G]='--.' [H]='....' [I]='..' [J]='.---' \
[K]='-.-' [L]='.-..' [M]='--' [N]='-.' [O]='---' \
[P]='.--.' [Q]='--.-' [R]='.-.' [S]='...' [T]='-' \
[U]='..-' [V]='...-' [W]='.--' [X]='-..-' [Y]='-.--' [Z]='--..' \
[0]='-----' [1]='.----' [2]='..---' [3]='...--' [4]='....-' \
[5]='.....' [6]='-....' [7]='--...' [8]='----..' [9]='----.' )
if [[ "${#}" -lt "1" ]]; then
echo -ne "Usage: ${FUNCNAME[0]} arguments...\n
${FUNCNAME[0]} is an IMC transmitter. \n \
It'll transmit your messages to International Morse Code.\n" >&2
return 1
fi
|