Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
31
Task/Morse-code/EasyLang/morse-code.easy
Normal file
31
Task/Morse-code/EasyLang/morse-code.easy
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
txt$ = "sos sos"
|
||||
#
|
||||
chars$[] = strchars "abcdefghijklmnopqrstuvwxyz "
|
||||
code$[] = [ ".-" "-..." "-.-." "-.." "." "..-." "--." "...." ".." ".---" "-.-" ".-.." "--" "-." "---" ".--." "--.-" ".-." "..." "-" "..-" "...-" ".--" "-..-" "-.--" "--.." " " ]
|
||||
#
|
||||
proc morse ch$ . .
|
||||
ind = 1
|
||||
while ind <= len chars$[] and chars$[ind] <> ch$
|
||||
ind += 1
|
||||
.
|
||||
if ind <= len chars$[]
|
||||
write ch$ & " "
|
||||
sleep 0.4
|
||||
for c$ in strchars code$[ind]
|
||||
write c$
|
||||
if c$ = "."
|
||||
sound [ 440 0.2 ]
|
||||
sleep 0.4
|
||||
elif c$ = "-"
|
||||
sound [ 440 0.6 ]
|
||||
sleep 0.8
|
||||
elif c$ = " "
|
||||
sleep 0.8
|
||||
.
|
||||
.
|
||||
print ""
|
||||
.
|
||||
.
|
||||
for ch$ in strchars txt$
|
||||
call morse ch$
|
||||
.
|
||||
Loading…
Add table
Add a link
Reference in a new issue