Function MorseSound(code$) For every character in code if character is "-" then SystemBeep(freq, dash) else SystemBeep(freq, dot) end if Delay(50) nextend Function
temp$ = Right(Left(PreMsg,i),1)
temp$ = Upper(Right(Left(PreMsg,i),1))
if temp = "a" or temp = "A"
if temp = "A"
Dim Morse$(37)Function InitMorse() Restore MorseData For i = 0 To 36 : Read v$ : Morse(i)=v : NextEnd FunctionFunction MorseConvert$(msg$) Local temp$="",I%=0,V%=0 For I = 1 To Len(msg) V=Asc(Upper(Mid(msg,I,1))) If V>=65 And V<=90 ; "A" to "Z" temp$=temp + Morse(V-65)+" " ElseIf V=32 ; Space temp$=temp+Morse( 26 ) ElseIf V>=48 And V<=57 ; 0 to 9 temp$=temp+Morse( V-21 )+" " EndIf Next Return tempEnd Function.MorseData; A to ZData ".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--"Data "-.","---",".--.","--.-",".-.","...","-","..-",".--",".--..","-..-","-.--","--..";Space then 0 to 1Data "|","-----",".----","..---","...--","....-",".....","-....","--...","---..","----."Graphics 400,300,0,2SetBuffer BackBuffer()Local Msg$="",Quit%=FalseInitMorse()Repeat Cls Color 150,200,255 : Locate 000,024 : Print MorseConvert(Msg) Color 000,200,000 : Locate 015,280 : Print "<Exit> To Quit." Color 255,200,050 : Locate 000,000 : Msg$=Input(">:") If Upper(Msg)="EXIT" Exit Flip ForeverEnd