Pangram checker: Difference between revisions

Added Batch File code
(Added Batch File code)
Line 284:
IsPangram! = -1
END FUNCTION</lang>
 
{{out}}
<pre>
0 My dog has fleas.
-1 The quick brown fox jumps over the lazy dog.
-1 Jackdaws love my big sphinx of quartz.
0 What's a jackdaw?
</pre>
 
=={{header|Batch File}}==
<lang dos>@echo off
setlocal enabledelayedexpansion
 
%===The Main Thing===%
call :pangram "The quick brown fox jumps over the lazy dog."
call :pangram "The quick brown fox jumped over the lazy dog."
echo.
pause
exit /b 0
 
%===The Function===%
:pangram
set letters=abcdefgihjklmnopqrstuvwxyz
set cnt=0
set inp=%~1
set str=!inp: =!
 
:loop
set chr=!str:~%cnt%,1!
if "!letters!"=="" (
echo %1 is a pangram^^!
goto :EOF
)
if "!chr!"=="" (
echo %1 is not a pangram.
goto :EOF
)
call set letters=!letters:%chr%=!
set /a cnt+=1
goto loop</lang>
{{Out}}
<pre>"The quick brown fox jumps over the lazy dog." is a pangram!
"The quick brown fox jumped over the lazy dog." is not a pangram.
 
Press any key to continue . . .</lang>
 
=={{header|BBC BASIC}}==
535

edits