Pangram checker: Difference between revisions

Content added Content deleted
No edit summary
m (→‎{{header|REXX}}: elided saying a blank line from the output after the prompt.)
Line 2,154: Line 2,154:
@abc= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' /*a list of all (Latin) capital letters*/
@abc= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' /*a list of all (Latin) capital letters*/


do forever /*keep promoting 'til null (or blanks).*/
do forever; say /*keep promoting 'til null (or blanks).*/
say '──────── Please enter a pangramic sentence (or a blank to quit):'; say
say
say '──────── Please enter a pangramic sentence (or a blank to quit):'
say
pull y /*this also uppercases the Y variable.*/
pull y /*this also uppercases the Y variable.*/
if y='' then leave /*if nothing entered, then we're done.*/
if y='' then leave /*if nothing entered, then we're done.*/

absent= space( translate( @abc, , y), 0) /*obtain a list of any absent letters. */
absent= space( translate( @abc, , y), 0) /*obtain a list of any absent letters. */
if absent=='' then say "──────── Sentence is a pangram."

if absent=='' then say '──────── Sentence is a pangram.'
else say "──────── Sentence isn't a pangram, missing: " absent
else say "──────── Sentence isn't a pangram, missing: " absent
say
say
Line 2,172: Line 2,168:
<pre>
<pre>
──────── Please enter a pangramic sentence (or a blank to quit):
──────── Please enter a pangramic sentence (or a blank to quit):

The quick brown fox jumped over the lazy dog. ◄■■■■■■■■■■ user input.
The quick brown fox jumped over the lazy dog. ◄■■■■■■■■■■ user input.
──────── Sentence isn't a pangram, missing: S
──────── Sentence isn't a pangram, missing: S
Line 2,178: Line 2,173:


──────── Please enter a pangramic sentence (or a blank to quit):
──────── Please enter a pangramic sentence (or a blank to quit):

The quick brown fox JUMPS over the lazy dog!!! ◄■■■■■■■■■■ user input.
The quick brown fox JUMPS over the lazy dog!!! ◄■■■■■■■■■■ user input.
──────── Sentence is a pangram.
──────── Sentence is a pangram.