Morse code: Difference between revisions
m
→{{header|EasyLang}}
Line 1,321:
<lang>txt$ = "sos sos"
#
chars$[] = str_chars "abcdefghijklmnopqrstuvwxyz "
#
while j < len abc$[] and abc$[j] <> c$▼
func morse ch$ . .
j += 1▼
.
if
sleep 0.4▼
▲ sleep 0.4
▲ write m$[j]
sleep 0.
▲ play_sound [ 440 0.6 ]
▲ sleep 0.8
▲ play_sound [ 880 0.6 ]
.
.
print ""
.
call morse ch$▼
▲mc$[] = [ ".-" "-..." "-.-." "-.." "." "..-." "--." "...." ".---" ".---" "-.-" ".-.." "--" "-." "---" ".--." "--.-" ".-." "..." "-" "..-" "...-" ".--" "-..-" "-.--" "--.." " " ]
▲ call morse
.</lang>
|