Find words which contains all the vowels: Difference between revisions

→‎{{header|RPL}}: emulator version capable to read input file
(add RPL)
(→‎{{header|RPL}}: emulator version capable to read input file)
Line 1,914:
 
=={{header|RPL}}==
The only way to use <code>unixdict.txt</code> as input is to convert it into a list of 25104 strings. Fortunately, emulators can handle such a big data structure in RAM.
As RPL is a language for calculators, it is not suitable for reading large text files.
{{works with|Halcyon Calc|4.2.7}}
« '''IF''' DUP SIZE 10 < '''THEN''' DROP 0 '''ELSE'''
≪ { }
→ w
«1 {UnixDict 5SIZE }'''FOR''' 0 CONj
1 w SIZE '''FOR''UnixDict' j GET
'''IF''' DUP SIZE w10 j< DUP'''THEN''' DROP SUB'''ELSE'''
{ '''IF'''5 "AEIOUaeiou"} SWAP0 POSCON '''THEN'''
LAST 1 -3 5PICK MODSIZE 1'''FOR''' +j
OVER DUP2j GETDUP 1 + PUTSUB
'''ENDIF''' "AEIOUaeiou" SWAP POS '''THEN'''
'''NEXT''' LAST 1 - 5 MOD 1 +
[ 1 1 1 1 DUP2 GET 1 ]+ PUT ==
» '''END'''
'''NEXT'''
» '<span style="color:blue">AEIOU?</span>' STO
« '''IF''' DUP[ SIZE1 101 <1 1 1 ] == '''THEN''' DROP 0+ '''ELSE''' DROP '''END'''
'''END NEXT'''
» '<span style="color:blue">AEIOU?</span>' STO
 
{{out}}
"Stupefaction" <span style="color:blue">AEIOU?</span> <span style="color:grey">@ returns 1 (true)</span>
<pre>
"Communication" <span style="color:blue">AEIOU?</span> <span style="color:grey">@ returns 0 (false)</span>
1: { "ambidextrous" "aureomycin" "bimolecular" "cauliflower" "colatitude" "communicable" "communicate" "consanguine" "consultative" "countervail" "denudation" "deputation" "exclusionary" "exhaustion" "exhumation" "exultation" "fluoridate" "gelatinous" "grandiloquent" "gregarious" "importunate" "incommutable" "incomputable" "insupportable" "loudspeaking" "malnourished" "mendacious" "mensuration" "oneupmanship" "pandemonium" "permutation" "persuasion" "perturbation" "portraiture" "praseodymium" "precarious" "precaution" "quasiorder" "refutation" "reputation" "stupefaction" "sulfonamide" "tambourine" }
"Sequoia" <span style="color:blue">AEIOU?</span> <span style="color:grey">@ returns 0 (false)</span>
</pre>
 
=={{header|Ruby}}==
1,150

edits