29 lines
671 B
Text
29 lines
671 B
Text
sub isPangram$(t$, l1$)
|
|
local lt, ll, r$, i, cc, ic
|
|
|
|
if numparams = 1 then
|
|
l1$ = "abcdefghijklmnopqrstuvwxyz"
|
|
end if
|
|
|
|
t$ = lower$(t$)
|
|
ll = len(l1$)
|
|
for i = 1 to ll
|
|
r$ = r$ + " "
|
|
next
|
|
lt = len(t$)
|
|
cc = asc("a")
|
|
|
|
for i = 1 to lt
|
|
ic = asc(mid$(t$, i, 1)) - cc + 1
|
|
if ic > 0 and ic <= ll then
|
|
mid$(r$, ic, 1) = chr$(ic + cc - 1)
|
|
end if
|
|
next i
|
|
|
|
if l1$ = r$ then return "true" else return "false" end if
|
|
|
|
end sub
|
|
|
|
print isPangram$("The quick brown fox jumps over the lazy dog.") // --> true
|
|
print isPangram$("The quick brown fox jumped over the lazy dog.") // --> false
|
|
print isPangram$("ABC.D.E.FGHI*J/KL-M+NO*PQ R\nSTUVWXYZ") // --> true
|