Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Pangram-checker/SNOBOL4/pangram-checker.sno
Normal file
18
Task/Pangram-checker/SNOBOL4/pangram-checker.sno
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
define('pangram(str)alfa,c') :(pangram_end)
|
||||
pangram str = replace(str,&ucase,&lcase)
|
||||
alfa = &lcase
|
||||
pgr_1 alfa len(1) . c = :f(return)
|
||||
str c :s(pgr_1)f(freturn)
|
||||
pangram_end
|
||||
|
||||
define('panchk(str)tf') :(panchk_end)
|
||||
panchk output = str
|
||||
tf = 'False'; tf = pangram(str) 'True'
|
||||
output = 'Pangram: ' tf :(return)
|
||||
panchk_end
|
||||
|
||||
* # Test and display
|
||||
panchk("The quick brown fox jumped over the lazy dogs.")
|
||||
panchk("My girl wove six dozen plaid jackets before she quit.")
|
||||
panchk("This 41-character string: it's a pangram!")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue