Syötteeksi pelkkä tekstiosuus.
Kannattaa koittaa omaa nickkiänsä ja hommata kyseinen puhelin numero itselleen.
Ja itse koodi:
Code: Select all
s$="microchip"
t$=TextToPuhnro(s)
Print "Syöte:"+s
Print "Tulos:"+t
WaitKey
'Tulos tallentuu tiedostoon mahdollista copypastea varten
f=OpenToWrite("muutos.txt")
WriteLine f,s
WriteLine f,t
CloseFile f
Function TextToPuhnro(b$)
Dim a$(9)
a(0)=" 0"
a(1)=".,?!-()@/_"
a(2)="abcäå"
a(3)="def"
a(4)="ghi"
a(5)="jkl£"
a(6)="mnoö"
a(7)="pqrs$"
a(8)="tuv"
a(9)="wxyz"
m$=Lower(b)
For e=0 To 9
For d=1 To Len(a(e))
w$=Mid(a(e),d,1)
m=Replace(m,w,""+e)
Next d
Next e
Return m
End Function